Wikipedia
kajwiki
https://kaj.wikipedia.org/wiki/A%CC%B1gba%CC%B1dang_Ka%CC%B1zzu
MediaWiki 1.47.0-wmf.13
first-letter
Ka̱zzu nkkang
A̱nyan di
Ba̱ryat
A̱byi
Ba̱ryat a̱byi
Wikipedia
Ba̱ryat Wikipedia
Fayil
Ba̱ryat nfayil
MediaWiki
Ba̱ryat MediaWiki
Ka̱zzuan
Ba̱ryat ka̱zzuan
Brang
Ba̱ryat brang
Ka̱srong
Ba̱ryat ka̱srong
TimedText
TimedText talk
Kkwan
Ba̱ryat nkkwan
Event
Event talk
Kkwan:Navbar
828
30
28807
75
2026-08-01T15:39:12Z
Kambai Akau
17
Imported from https://en.wikipedia.org/wiki/Module:Navbar by StarterKit infobox tool (content under CC BY-SA)
28807
Scribunto
text/plain
local p = {}
local cfg = mw.loadData('Module:Navbar/configuration')
local function get_title_arg(is_collapsible, template)
local title_arg = 1
if is_collapsible then title_arg = 2 end
if template then title_arg = 'template' end
return title_arg
end
local function choose_links(template, args)
-- The show table indicates the default displayed items.
-- view, talk, edit, hist, move, watch
-- TODO: Move to configuration.
local show = {true, true, true, false, false, false}
if template then
show[2] = false
show[3] = false
local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6,
talk = 2, edit = 3, hist = 4, move = 5, watch = 6}
-- TODO: Consider removing TableTools dependency.
for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do
local num = index[v]
if num then show[num] = true end
end
end
local remove_edit_link = args.noedit
if remove_edit_link then show[3] = false end
return show
end
local function add_link(link_description, ul, is_mini, font_style)
local l
if link_description.url then
l = {'[', '', ']'}
else
l = {'[[', '|', ']]'}
end
ul:tag('li')
:addClass('nv-' .. link_description.full)
:wikitext(l[1] .. link_description.link .. l[2])
:tag(is_mini and 'abbr' or 'span')
:attr('title', link_description.html_title)
:cssText(font_style)
:wikitext(is_mini and link_description.mini or link_description.full)
:done()
:wikitext(l[3])
:done()
end
local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style)
local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace)
if not title then
error(cfg.invalid_title .. title_text)
end
local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or ''
-- TODO: Get link_descriptions and show into the configuration module.
-- link_descriptions should be easier...
local link_descriptions = {
{ ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template',
['link'] = title.fullText, ['url'] = false },
{ ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template',
['link'] = talkpage, ['url'] = false },
{ ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template',
['link'] = 'Special:EditPage/' .. title.fullText, ['url'] = false },
{ ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template',
['link'] = 'Special:PageHistory/' .. title.fullText, ['url'] = false },
{ ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template',
['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true },
{ ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template',
['link'] = title:fullUrl('action=watch'), ['url'] = true }
}
local ul = mw.html.create('ul')
if has_brackets then
ul:addClass(cfg.classes.brackets)
:cssText(font_style)
end
for i, _ in ipairs(displayed_links) do
if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end
end
return ul:done()
end
function p._navbar(args)
-- TODO: We probably don't need both fontstyle and fontcolor...
local font_style = args.fontstyle
local font_color = args.fontcolor
local is_collapsible = args.collapsible
local is_mini = args.mini
local is_plain = args.plain
local collapsible_class = nil
if is_collapsible then
collapsible_class = cfg.classes.collapsible
if not is_plain then is_mini = 1 end
if font_color then
font_style = (font_style or '') .. '; color: ' .. font_color .. ';'
end
end
local navbar_style = args.style
local div = mw.html.create():tag('div')
div
:addClass(cfg.classes.navbar)
:addClass(cfg.classes.plainlinks)
:addClass(cfg.classes.horizontal_list)
:addClass(collapsible_class) -- we made the determination earlier
:cssText(navbar_style)
if is_mini then div:addClass(cfg.classes.mini) end
local box_text = (args.text or cfg.box_text) .. ' '
-- the concatenated space guarantees the box text is separated
if not (is_mini or is_plain) then
div
:tag('span')
:addClass(cfg.classes.box_text)
:cssText(font_style)
:wikitext(box_text)
end
local template = args.template
local displayed_links = choose_links(template, args)
local has_brackets = args.brackets
local title_arg = get_title_arg(is_collapsible, template)
local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle())
local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style)
div:node(list)
if is_collapsible then
local title_text_class
if is_mini then
title_text_class = cfg.classes.collapsible_title_mini
else
title_text_class = cfg.classes.collapsible_title_full
end
div:done()
:tag('div')
:addClass(title_text_class)
:cssText(font_style)
:wikitext(args[1])
end
local frame = mw.getCurrentFrame()
-- hlist -> navbar is best-effort to preserve old Common.css ordering.
return frame:extensionTag{
name = 'templatestyles', args = { src = cfg.hlist_templatestyles }
} .. frame:extensionTag{
name = 'templatestyles', args = { src = cfg.templatestyles }
} .. tostring(div:done())
end
function p.navbar(frame)
return p._navbar(require('Module:Arguments').getArgs(frame))
end
return p
0iwrh6fwqy52ve4qubv886e6mqvyrcq
Ba̱ryat a̱byi:Kambai Akau
3
1307
28803
28802
2026-08-01T15:38:10Z
Kambai Akau
17
/* Appreciating your feedback on the Starter Kit Dashboard */ Shim
28803
wikitext
text/x-wiki
== Invitation to try the Starter Kit tool and share your feedback ==
Hello @[[A̱byi:Kambai Akau|Kambai Akau]],
As one of the editors who set up the Jju Wikipedia, the [[mw:Language_Onboarding_and_Development|Language Onboarding and Development]] initiative invites you to use the Starter Kit to configure and customize Jju Wikipedia homepage.
Main page customization is one of the first features of the starter kit which will help you improve your main page's layout and mobile responsiveness, and structure your content with ease using pre-built templates. It will also help us evaluate how well it can improve the onboarding experience of administrators on your Wikipedia, so we can further use the learnings to improve the experience for new wikis graduating from the incubator. Visit [[mw:Language_Onboarding_and_Development/Starter_kit|this page]] to learn more about the Starter kit.
'''Here's how to get started:'''
* Access the Starter Kit here: https://starterkit.toolforge.org/
* Use the tool as illustrated in the screen record below to customize your main page.
[[//to.wikipedia.org/wiki/File:Starter_kit_main_page_customization_feature_demo.webm|699x699px|Starter kit main page customization feature demo]]
* When you are done, share your feedback on [[mw:Talk:Language_Onboarding_and_Development/Starter_kit|this page]] on the following:
** The time it took to configure and customize your Wikipedia initially, and the time it took now with the Kit.
** The things you find most useful while configuring it.
** Tell us anything important to your language Wikipedia or your community's goals that you felt the configured main page templates were able to or unable to capture.
** The step in the configuration process where you felt stuck, confused, or unsure what to do next.
The configurations can be reverted like an edit from the “view history”, so don't be afraid to try it several times.
We would appreciate it if you could submit your feedback by the 11th of May 2026 so we can start adding more features based on it. If you have any questions or need assistance, let me know.
Thank you so much for your contributions to your Wikipedia and for helping us shape this tool for new Wikipedias. We will keep you updated on any additional things added to the starter kit in the future.
Best regards, [[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]] ([[Ba̱ryat a̱byi:UOzurumba (WMF)|Ryyat]]) 18:43, 29 Hywan Naai 2026 (WAT)
:Greetings @[[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]], thanks for reaching out. I have tried to create the Jju Wikipedia homepage using this link [[https://starterkit.toolforge.org/preview https://starterkit.toolforge.org]] but whenever I get to '''Step 3: Review & Save''', the but the Homepage Preview doesn't show despite refreshing multiple times. Even after clicking on '''Save & Create Templates''', nothing seem to happen. I have refreshed the Jju Wikipedia homepage multiple times as well. But it doesn't seem responsive. I don't know what the problem could be. Thanks and warm regards, [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 22:50, 29 Hywan Naai 2026 (WAT)
::@[[A̱byi:Kambai Akau|Kambai Akau]], sorry about this. You need to have admin rights to go past that level. I can also see that there is currently no admin in Jju Wikipedia who can try it out. Is applying for an admin rights for Jju Wikipedia something you can consider? [[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]] ([[Ba̱ryat a̱byi:UOzurumba (WMF)|Ryyat]]) 23:40, 29 Hywan Naai 2026 (WAT)
:::@[[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]]: Okay. I see. I should, but I don't think I may anytime soon. But can this same tool be applied in the Tyap Wikipedia where I am an admin and a home page had been a challenge to build on that site? Can this also function in Wikipedias still in the Incubator? [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 00:05, 30 Hywan Naai 2026 (WAT)
::::Sure, you can apply it in Tyap and provide your feedback. Thank you! [[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]] ([[Ba̱ryat a̱byi:UOzurumba (WMF)|Ryyat]]) 00:20, 30 Hywan Naai 2026 (WAT)
:::::@[[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]], thanks! It is already working in the Tyap Wikipedia. I will provide feedback as soon as I am done. But I may not finish this tonight. For the Jju Wikipedia, I will let the community know so that someone can apply for adminship before me to have it employed right here as well. [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 00:44, 30 Hywan Naai 2026 (WAT)
::::::Hi @[[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]], I have successfully published the Main page for the Tyap Wikipedia (https://kcg.wikipedia.org/wiki/Main_Page). Thanks a lot. I will, however, want to customize this main page to have elements of the existing banner (https://kcg.wikipedia.org/wiki/Ta%E2%80%8C%CC%B1mpi%E2%80%8C%CC%B1let:A%CC%B1tsak_wat_wu_2). I hope I am permitted to do that? [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 21:08, 3 Hywan Pfon 2026 (WAT)
:::::::@[[A̱byi:Kambai Akau|Kambai Akau]] Thanks a lot for taking the time to try the Starter Kit tool and for sharing your feedback and thoughts! And kudos for being able to successfully publish the main page.
:::::::You can also add any elements from the previous source to the main page. If you want to use just the old content, you can copy-paste it from the previous templates into the newly created templates by the Starter Kit tool.
:::::::The new templates are here: https://kcg.wikipedia.org/wiki/Sa:Nta%CC%B1mpi%CC%B1let_starter_kit. Let us know if you need any help. [[A̱byi:SSethi (WMF)|SSethi (WMF)]] ([[Ba̱ryat a̱byi:SSethi (WMF)|Ryyat]]) 21:29, 4 Hywan Pfon 2026 (WAT)
::::::::Thanks @[[A̱byi:SSethi (WMF)|SSethi (WMF)]]! I will work on completing the work on the Tyap Wikipedia's home page soon. I am [https://kaj.wikipedia.org/wiki/Wikipedia:Ka%CC%B1wwai_sot_ba%CC%B1nyet#Neutral:~:text=Adminship%20request%20for%20the%20Jju%20Wikipedia,-A%CC%B1shyim%20shim%3A in the process of applying for admin rights] in the Jju Wikipedia. When that is done, I should endeavor to do the same in the Jju Wikipedia as well. [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 00:18, 5 Hywan Pfon 2026 (WAT)
:::::::::Hello @[[A̱byi:Kambai Akau|Kambai Akau]]! I recently noticed that the final changes were published to a new main page: https://kcg.wikipedia.org/wiki/Main_Page, while the original main page remains unchanged: [[A̱gba̱dang Ka̱zzu|https://kaj.wikipedia.org/wiki/A̱gba̱dang_Ka̱zzu]]. I confirmed with the engineers that this is a software bug.
:::::::::While we work on fixing this for the next release, I wanted to suggest a temporary workaround: once you are done making changes to the Main_Page, you can copy the source content from there and paste it into the source of A̱gba̱dang_Ka̱zzu to replace the existing content. Let us know if you need any help with this. [[A̱byi:SSethi (WMF)|SSethi (WMF)]] ([[Ba̱ryat a̱byi:SSethi (WMF)|Ryyat]]) 22:37, 7 Hywan Pfon 2026 (WAT)
::::::::::@Hi @[[A̱byi:SSethi (WMF)|SSethi (WMF)]], yes, the main page of the Tyap Wikipedia remained unchanged because I was busy doing some other things, but I am in the process of changing and deploying it fully to the main space. Meanwhile, for the Jju Wikipedia, are you suggesting I copy the templates for the Tyap Wikipedia's homepage (starter kit version) and create it in the Jju Wikipedia? It so, that is easy. I can do that soon. [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 22:50, 7 Hywan Pfon 2026 (WAT)
:::::::::::For Jju, once the software bug is fixed, we can inform you and then you can try building the main page from scratch using the starter kit :) [[A̱byi:SSethi (WMF)|SSethi (WMF)]] ([[Ba̱ryat a̱byi:SSethi (WMF)|Ryyat]]) 22:56, 7 Hywan Pfon 2026 (WAT)
::::::::::::Okay, thanks! I will be expecting your feedback. [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 23:09, 7 Hywan Pfon 2026 (WAT)
:::::::::::::Hello @[[A̱byi:Kambai Akau|Kambai Akau]]! The main page issue I mentioned earlier in the thread is now resolved. So if you try out the tool now for Jju wiki, the final changes will be published directly to the original main page. I also noticed the changes you made to the original main page of Tyap wiki - the new updates are looking really nice :) [[A̱byi:SSethi (WMF)|SSethi (WMF)]] ([[Ba̱ryat a̱byi:SSethi (WMF)|Ryyat]]) 07:05, 13 Hywan Pfon 2026 (WAT)
::::::::::::::Hi @[[A̱byi:SSethi (WMF)|SSethi (WMF)]]. Thanks a lot. I will work on the Jju wiki later today. For the Tyap wiki, thanks! It won't have been possible without you. [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 09:56, 13 Hywan Pfon 2026 (WAT)
:::::::::::::::Greeting @[[A̱byi:SSethi (WMF)|SSethi (WMF)]]. I am [https://starterkit.toolforge.org/preview still unable] to create the main page in the Jju Wikipedia. But I have submitted [https://meta.wikimedia.org/wiki/Steward_requests/Permissions#Requests:~:text=%5Breply%5D-,Kambai%20Akau%40kaj.wikipedia,-%5Bedit%5D a request for adminship] in the Jju Wikipedia on Meta. Once it gets approved, I will proceed with the Starter Kit tool. [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 02:56, 14 Hywan Pfon 2026 (WAT)
::::::::::::::::@[[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]] and @[[A̱byi:SSethi (WMF)|SSethi (WMF)]], I have been able to create the [https://kaj.wikipedia.org/wiki/A%CC%B1gba%CC%B1dang_Ka%CC%B1zzu Jju Wikipedia homepage]. I have reached out to the community to support in the translation of the content to Jju. [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 00:12, 16 Hywan Pfon 2026 (WAT)
== Invitation to try the Starter Kit Dashboard and share your feedback ==
Hello @[[A̱byi:Kambai Akau|Kambai Akau]]
Apologies this message is not in your native language.
As an admin in the Jju Wikipedia, you are invited by the [[mw:Language_Onboarding_and_Development|Language Onboarding and Development]] initiative to use the Starter Kit Dashboard. This tool will help you perform essential tasks such as importing infoboxes, tracking your Wikipedia’s activity and growth and connecting with members of the broader Wikimedia community for technical guidance.
Starter Kit Dashboard organizes essential setup tasks, making it easy for you to complete them so contributors can begin editing and learning quickly. As an admin, you can also use the Dashboard to track your Wikipedia’s progress and growth. Using this tool will help us evaluate how it can improve the onboarding experience for administrators, and the insights you provide will be used to enhance the experience for new wikis graduating from the incubator. Visit [[mw:Language_Onboarding_and_Development/Starter_kit|this page]] to learn more about the Starter Kit.
Here's how to get started:
* Access the Starter Kit Dashboard here: [http://starterkit.toolforge.org/ http://starterkit.toolforge.org]
* Login with your wiki credentials, enter the target wiki url (e.g., https://hi.wikipedia.org
* Follow the steps shown in the video below to use the tool.
[[Fayil:Wikipedia_Starter_Kit_Dashboard_MVP_Demo_Video.webm|812x812px|Wikipedia Starter Kit Dashboard MVP Demo Video]]
* After exploring the Dashboard, please share your feedback on [[mw:Talk:Language_Onboarding_and_Development/Starter_kit|this page,]] focusing on the following questions:
** The parts of the starter kit you expect to use most often, and how you plan to use them.
** The essential tasks you tried, and how easy or difficult they were to complete.
** The wiki tasks you would like the starter kit to guide you through or automate in the future.
Most of the tasks that will result in edits on the wiki can be reverted like an edit from the “view history”, so don't be afraid to try them several times.
We would appreciate it if you could submit your feedback by June 26, 2026, so we can begin analyzing it to identify areas for improvement. If you have any questions or need assistance, please let me know.
Thank you so much for your contributions to your Wikipedia and for helping us shape this tool for new and small Wikipedias. We will keep you updated on any additional things added to the starter kit in the future.
Best regards, [[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]] ([[Ba̱ryat a̱byi:UOzurumba (WMF)|Ryyat]]) 20:44, 11 Hywan A̱kutat 2026 (WAT)
:Thanks for the invite, @[[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]]. [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 01:44, 13 Hywan A̱kutat 2026 (WAT)
===Appreciating your feedback on the Starter Kit Dashboard ===
Dear [[A̱byi:Kambai Akau|Kambai Akau]],
Thank you for taking the time to explore the [http://starterkit.toolforge.org/ Starter kit dashboard] and for sharing your thoughtful feedback. Your insights are invaluable to us, and we truly appreciate your continued commitment to the Wikipedia community.
We are currently working on the feedback we received. You can view the tasks we are currently working on here: https://phabricator.wikimedia.org/maniphest/?project=PHID-PROJ-jry4odhdvqbzs7ptr3vw&statuses=open()&group=none&order=newest#R
The next phase of our work will be to share the tool broadly with various communities in the movement.
If you haven't yet had the chance to submit your feedback, you're still welcome to share your thoughts on [[mw:Talk:Language Onboarding and Development/Starter kit|the feedback page]].
Best regards,
[[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]] ([[Ba̱ryat a̱byi:UOzurumba (WMF)|Ryyat]]) 04:52, 31 Hywan A̱tu̱yring 2026 (WAT)
:Thanks @[[A̱byi:UOzurumba (WMF)|UOzurumba (WMF)]]. I will share the tool broadly with as many communities as possible in the movement. Warm regards, [[A̱byi:Kambai Akau|Kambai Akau]] ([[Ba̱ryat a̱byi:Kambai Akau|Ryyat]]) 16:38, 1 Hywan A̱ninai 2026 (WAT)
r4abdzsvjb9xv0qua95v93ibc1d3fg6
Kkwan:Infobox
828
1359
28804
2026-08-01T15:39:02Z
Kambai Akau
17
Imported from https://en.wikipedia.org/wiki/Module:Infobox by StarterKit infobox tool (content under CC BY-SA)
28804
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
Kkwan:Infobox/styles.css
828
1360
28805
2026-08-01T15:39:05Z
Kambai Akau
17
Imported from https://en.wikipedia.org/wiki/Module:Infobox/styles.css by StarterKit infobox tool (content under CC BY-SA)
28805
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
Kkwan:Italic title
828
1361
28806
2026-08-01T15:39:09Z
Kambai Akau
17
Imported from https://en.wikipedia.org/wiki/Module:Italic_title by StarterKit infobox tool (content under CC BY-SA)
28806
Scribunto
text/plain
-- This module implements {{italic title}}.
require('strict')
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg
local yesno = require('Module:Yesno')
--------------------------------------------------------------------------------
-- ItalicTitle class
--------------------------------------------------------------------------------
local ItalicTitle = {}
do
----------------------------------------------------------------------------
-- Class attributes and functions
-- Things that belong to the class are here. Things that belong to each
-- object are in the constructor.
----------------------------------------------------------------------------
-- Keys of title parts that can be italicized.
local italicizableKeys = {
namespace = true,
title = true,
dab = true,
}
----------------------------------------------------------------------------
-- ItalicTitle constructor
-- This contains all the dynamic attributes and methods.
----------------------------------------------------------------------------
function ItalicTitle.new()
local obj = {}
-- Function for checking self variable in methods.
local checkSelf = libraryUtil.makeCheckSelfFunction(
'ItalicTitle',
'obj',
obj,
'ItalicTitle object'
)
-- Checks a key is present in a lookup table.
-- Param: name - the function name.
-- Param: argId - integer position of the key in the argument list.
-- Param: key - the key.
-- Param: lookupTable - the table to look the key up in.
local function checkKey(name, argId, key, lookupTable)
if not lookupTable[key] then
error(string.format(
"bad argument #%d to '%s' ('%s' is not a valid key)",
argId,
name,
key
), 3)
end
end
-- Set up object structure.
local parsed = false
local categories = {}
local italicizedKeys = {}
local italicizedSubstrings = {}
-- Parses a title object into its namespace text, title, and
-- disambiguation text.
-- Param: options - a table of options with the following keys:
-- title - the title object to parse
-- ignoreDab - ignore any disambiguation parentheses
-- Returns the current object.
function obj:parseTitle(options)
checkSelf(self, 'parseTitle')
checkType('parseTitle', 1, options, 'table')
checkTypeForNamedArg('parseTitle', 'title', options.title, 'table')
local title = options.title
-- Title and dab text
local prefix, parentheses
if not options.ignoreDab then
prefix, parentheses = mw.ustring.match(
title.text,
'^(.+) %(([^%(%)]+)%)$'
)
end
if prefix and parentheses then
self.title = prefix
self.dab = parentheses
else
self.title = title.text
end
-- Namespace
local namespace = mw.site.namespaces[title.namespace].name
if namespace and #namespace >= 1 then
self.namespace = namespace
end
-- Register the object as having parsed a title.
parsed = true
return self
end
-- Italicizes part of the title.
-- Param: key - the key of the title part to be italicized. Possible
-- keys are contained in the italicizableKeys table.
-- Returns the current object.
function obj:italicize(key)
checkSelf(self, 'italicize')
checkType('italicize', 1, key, 'string')
checkKey('italicize', 1, key, italicizableKeys)
italicizedKeys[key] = true
return self
end
-- Un-italicizes part of the title.
-- Param: key - the key of the title part to be un-italicized. Possible
-- keys are contained in the italicizableKeys table.
-- Returns the current object.
function obj:unitalicize(key)
checkSelf(self, 'unitalicize')
checkType('unitalicize', 1, key, 'string')
checkKey('unitalicize', 1, key, italicizableKeys)
italicizedKeys[key] = nil
return self
end
-- Italicizes a substring in the title. This only affects the main part
-- of the title, not the namespace or the disambiguation text.
-- Param: s - the substring to be italicized.
-- Returns the current object.
function obj:italicizeSubstring(s)
checkSelf(self, 'italicizeSubstring')
checkType('italicizeSubstring', 1, s, 'string')
italicizedSubstrings[s] = true
return self
end
-- Un-italicizes a substring in the title. This only affects the main
-- part of the title, not the namespace or the disambiguation text.
-- Param: s - the substring to be un-italicized.
-- Returns the current object.
function obj:unitalicizeSubstring(s)
checkSelf(self, 'unitalicizeSubstring')
checkType('unitalicizeSubstring', 1, s, 'string')
italicizedSubstrings[s] = nil
return self
end
-- Renders the object into a page name. If no title has yet been parsed,
-- the current title is used.
-- Returns string
function obj:renderTitle()
checkSelf(self, 'renderTitle')
-- Italicizes a string
-- Param: s - the string to italicize
-- Returns string.
local function italicize(s)
assert(type(s) == 'string', 's was not a string')
assert(s ~= '', 's was the empty string')
return string.format('<i>%s</i>', s)
end
-- Escape characters in a string that are magic in Lua patterns.
-- Param: pattern - the pattern to escape
-- Returns string.
local function escapeMagicCharacters(s)
assert(type(s) == 'string', 's was not a string')
return s:gsub('%p', '%%%0')
end
-- If a title hasn't been parsed yet, parse the current title.
if not parsed then
self:parseTitle{title = mw.title.getCurrentTitle()}
end
-- Italicize the different parts of the title and store them in a
-- titleParts table to be joined together later.
local titleParts = {}
-- Italicize the italicizable keys.
for key in pairs(italicizableKeys) do
if self[key] then
if italicizedKeys[key] then
titleParts[key] = italicize(self[key])
else
titleParts[key] = self[key]
end
end
end
-- Italicize substrings. If there are any substrings to be
-- italicized then start from the raw title, as this overrides any
-- italicization of the main part of the title.
if next(italicizedSubstrings) then
titleParts.title = self.title
for s in pairs(italicizedSubstrings) do
local pattern = escapeMagicCharacters(s)
local italicizedTitle, nReplacements = titleParts.title:gsub(
pattern,
italicize
)
titleParts.title = italicizedTitle
-- If we didn't make any replacements then it means that we
-- have been passed a bad substring or that the page has
-- been moved to a bad title, so add a tracking category.
if nReplacements < 1 then
categories['Pages using italic title with no matching string'] = true
end
end
end
-- Assemble the title together from the parts.
local ret = ''
if titleParts.namespace then
ret = ret .. titleParts.namespace .. ':'
end
ret = ret .. titleParts.title
if titleParts.dab then
ret = ret .. ' (' .. titleParts.dab .. ')'
end
return ret
end
-- Returns an expanded DISPLAYTITLE parser function called with the
-- result of obj:renderTitle, plus any other optional arguments.
-- Returns string
function obj:renderDisplayTitle(...)
checkSelf(self, 'renderDisplayTitle')
return mw.getCurrentFrame():callParserFunction(
'DISPLAYTITLE',
self:renderTitle(),
...
)
end
-- Returns an expanded DISPLAYTITLE parser function called with the
-- result of obj:renderTitle, plus any other optional arguments, plus
-- any tracking categories.
-- Returns string
function obj:render(...)
checkSelf(self, 'render')
local ret = self:renderDisplayTitle(...)
for cat in pairs(categories) do
ret = ret .. string.format(
'[[Category:%s]]',
cat
)
end
return ret
end
return obj
end
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
local function getArgs(frame, wrapper)
assert(type(wrapper) == 'string', 'wrapper was not a string')
return require('Module:Arguments').getArgs(frame, {
wrappers = wrapper
})
end
-- Main function for {{italic title}}
function p._main(args)
checkType('_main', 1, args, 'table')
local italicTitle = ItalicTitle.new()
italicTitle:parseTitle{
title = mw.title.getCurrentTitle(),
ignoreDab = yesno(args.all, false)
}
if args.string then
italicTitle:italicizeSubstring(args.string)
else
italicTitle:italicize('title')
end
return italicTitle:render(args[1])
end
function p.main(frame)
return p._main(getArgs(frame, 'Template:Italic title'))
end
function p._dabonly(args)
return ItalicTitle.new()
:italicize('dab')
:render(args[1])
end
function p.dabonly(frame)
return p._dabonly(getArgs(frame, 'Template:Italic dab'))
end
return p
i5073gly55g6ltjgvutoqvgvumtx9fc
Kkwan:Navbar/configuration
828
1362
28808
2026-08-01T15:39:15Z
Kambai Akau
17
Imported from https://en.wikipedia.org/wiki/Module:Navbar/configuration by StarterKit infobox tool (content under CC BY-SA)
28808
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
Kkwan:Navbar/styles.css
828
1363
28809
2026-08-01T15:39:20Z
Kambai Akau
17
Imported from https://en.wikipedia.org/wiki/Module:Navbar/styles.css by StarterKit infobox tool (content under CC BY-SA)
28809
sanitized-css
text/css
/* {{pp|small=yes}} */
.navbar {
display: inline;
font-size: 88%;
font-weight: normal;
}
.navbar-collapse {
float: left;
text-align: left;
}
.navbar-boxtext {
word-spacing: 0;
}
.navbar ul {
display: inline-block;
white-space: nowrap;
line-height: inherit;
}
.navbar-brackets::before {
margin-right: -0.125em;
content: '[ ';
}
.navbar-brackets::after {
margin-left: -0.125em;
content: ' ]';
}
.navbar li {
word-spacing: -0.125em;
}
.navbar a > span,
.navbar a > abbr {
text-decoration: inherit;
}
.navbar-mini abbr {
font-variant: small-caps;
border-bottom: none;
text-decoration: none;
cursor: inherit;
}
.navbar-ct-full {
font-size: 114%;
margin: 0 7em;
}
.navbar-ct-mini {
font-size: 114%;
margin: 0 4em;
}
/* not the usual @media screen, we simply remove navbar in @media print */
html.skin-theme-clientpref-night .navbar li a abbr {
color: var(--color-base) !important;
}
@media (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .navbar li a abbr {
color: var(--color-base) !important;
}
}
@media print {
.navbar {
display: none !important;
}
}
a68rpqs0zynjjfzlunkhpdlpnoe6c82
Kkwan:Exponential search
828
1364
28810
2026-08-01T15:39:20Z
Kambai Akau
17
Imported from https://en.wikipedia.org/wiki/Module:Exponential_search by StarterKit infobox tool (content under CC BY-SA)
28810
Scribunto
text/plain
-- This module provides a generic exponential search algorithm.
require[[strict]]
local checkType = require('libraryUtil').checkType
local floor = math.floor
local function midPoint(lower, upper)
return floor(lower + (upper - lower) / 2)
end
local function search(testFunc, i, lower, upper)
if testFunc(i) then
if i + 1 == upper then
return i
end
lower = i
if upper then
i = midPoint(lower, upper)
else
i = i * 2
end
return search(testFunc, i, lower, upper)
else
upper = i
i = midPoint(lower, upper)
return search(testFunc, i, lower, upper)
end
end
return function (testFunc, init)
checkType('Exponential search', 1, testFunc, 'function')
checkType('Exponential search', 2, init, 'number', true)
if init and (init < 1 or init ~= floor(init) or init == math.huge) then
error(string.format(
"invalid init value '%s' detected in argument #2 to " ..
"'Exponential search' (init value must be a positive integer)",
tostring(init)
), 2)
end
init = init or 2
if not testFunc(1) then
return nil
end
return search(testFunc, init, 1, nil)
end
jqqi8l27tb73lglksbukg2g3bzt3fmv
Ka̱zzuan:Infobox
10
1365
28811
2026-08-01T15:39:44Z
Kambai Akau
17
Imported from https://en.wikipedia.org/wiki/Template:Infobox by StarterKit infobox tool (content under CC BY-SA)
28811
wikitext
text/x-wiki
{{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude>
{{documentation}}
<!-- Categories go in the /doc subpage, and interwikis go in Wikidata. -->
</noinclude>
f4hgwrnr11ahhwyo266vcd10dpi92pe
Ka̱zzuan:Template other
10
1366
28812
2026-08-01T15:39:44Z
Kambai Akau
17
Imported from https://en.wikipedia.org/wiki/Template:Template_other by StarterKit infobox tool (content under CC BY-SA)
28812
wikitext
text/x-wiki
{{#switch:
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"-->
| {{#ifeq:{{NAMESPACE}}|{{ns:Template}}
| template
| other
}}
}}
| template = {{{1|}}}
| other
| #default = {{{2|}}}
}}<!--End switch--><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
0tcssjmltwl7y5v3f5wj2kqciaabqly