<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="he">
	<id>https://chabadpedia.co.il/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3ACoronaTable</id>
	<title>יחידה:CoronaTable - היסטוריית גרסאות</title>
	<link rel="self" type="application/atom+xml" href="https://chabadpedia.co.il/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3ACoronaTable"/>
	<link rel="alternate" type="text/html" href="https://chabadpedia.co.il/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:CoronaTable&amp;action=history"/>
	<updated>2026-04-19T18:34:32Z</updated>
	<subtitle>היסטוריית הגרסאות של הדף הזה בוויקי</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://chabadpedia.co.il/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:CoronaTable&amp;diff=804397&amp;oldid=prev</id>
		<title>מ. רובין: יצירת דף עם התוכן &quot;local Localization = require(&#039;Module:CoronaTable/local&#039;) local headers = Localization.headers local i18nTeritory = Localization.i18nTeritory -- optional. set to nil if not translated, adn use lua log to get the generated translation local i18nSum = Localization.sum or &#039;&#039; -- optional local editLabel = Localization.editLabel or &#039;Edit&#039; -- optional  function translateTeritory(enName, teritoriesWikidata) 	if i18nTeritory~=nil and i18nTeritory[enName] then 		retu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://chabadpedia.co.il/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:CoronaTable&amp;diff=804397&amp;oldid=prev"/>
		<updated>2025-09-30T13:43:41Z</updated>

		<summary type="html">&lt;p&gt;יצירת דף עם התוכן &amp;quot;local Localization = require(&amp;#039;Module:CoronaTable/local&amp;#039;) local headers = Localization.headers local i18nTeritory = Localization.i18nTeritory -- optional. set to nil if not translated, adn use lua log to get the generated translation local i18nSum = Localization.sum or &amp;#039;&amp;#039; -- optional local editLabel = Localization.editLabel or &amp;#039;Edit&amp;#039; -- optional  function translateTeritory(enName, teritoriesWikidata) 	if i18nTeritory~=nil and i18nTeritory[enName] then 		retu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;דף חדש&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local Localization = require(&amp;#039;Module:CoronaTable/local&amp;#039;)&lt;br /&gt;
local headers = Localization.headers&lt;br /&gt;
local i18nTeritory = Localization.i18nTeritory -- optional. set to nil if not translated, adn use lua log to get the generated translation&lt;br /&gt;
local i18nSum = Localization.sum or &amp;#039;&amp;#039; -- optional&lt;br /&gt;
local editLabel = Localization.editLabel or &amp;#039;Edit&amp;#039; -- optional&lt;br /&gt;
&lt;br /&gt;
function translateTeritory(enName, teritoriesWikidata)&lt;br /&gt;
	if i18nTeritory~=nil and i18nTeritory[enName] then&lt;br /&gt;
		return i18nTeritory[enName]&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- fallback to wikidata&lt;br /&gt;
	if teritoriesWikidata[enName]~=nil then&lt;br /&gt;
			local label = teritoriesWikidata[enName]&lt;br /&gt;
			mw.logObject(mw.ustring.format(&amp;#039;[\&amp;#039;%s\&amp;#039;]=\&amp;#039;%s\&amp;#039;,&amp;#039;, enName, label))&lt;br /&gt;
			return label&lt;br /&gt;
	end&lt;br /&gt;
	local entityId = mw.wikibase.getEntityIdForTitle( enName, &amp;#039;enwiki&amp;#039; )&lt;br /&gt;
	if entityId then&lt;br /&gt;
		local label =  mw.wikibase.getLabel( entityId )&lt;br /&gt;
		mw.logObject(mw.ustring.format(&amp;#039;[\&amp;#039;%s\&amp;#039;]=\&amp;#039;%s\&amp;#039;,&amp;#039;, enName, label))&lt;br /&gt;
		return label&lt;br /&gt;
	end&lt;br /&gt;
	-- otherwise - use the source&lt;br /&gt;
	return enName&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function showTable(frame)&lt;br /&gt;
	local data = mw.ext.data.get(&amp;quot;2019–20 coronavirus outbreak.tab&amp;quot;)&lt;br /&gt;
	local CoronavirusOutbreak1920WikidataId = &amp;#039;Q81068910&amp;#039;&lt;br /&gt;
	local teritoriesWikidata = mw.wikibase.getBestStatements( CoronavirusOutbreak1920WikidataId, &amp;#039;P17&amp;#039; )&lt;br /&gt;
	local teritoriesWikidataDict = {}&lt;br /&gt;
	if i18nTeritory == nil then&lt;br /&gt;
		mw.logObject(&amp;#039;Generating teritory translation from wikidata! please consider to set i18nTeritory by copy the Lua log to Module:CoronaTable/local&amp;#039;)&lt;br /&gt;
		for k,v in pairs(teritoriesWikidata) do&lt;br /&gt;
			local enLabel = mw.wikibase.getLabelByLang(v.mainsnak.datavalue.value.id ,&amp;#039;en&amp;#039;)&lt;br /&gt;
			local label = mw.wikibase.getLabel(v.mainsnak.datavalue.value.id)&lt;br /&gt;
			if v.qualifiers and v.qualifiers[&amp;#039;P805&amp;#039;] then&lt;br /&gt;
				local relatedArticleId = v.qualifiers[&amp;#039;P805&amp;#039;][1].datavalue.value.id&lt;br /&gt;
				local relatedArticle = mw.wikibase.getSitelink( relatedArticleId )&lt;br /&gt;
				if relatedArticle then&lt;br /&gt;
					label = mw.ustring.format(&amp;#039;[[%s|%s]]&amp;#039;, relatedArticle, label)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			teritoriesWikidataDict[enLabel] = label&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local lang = mw.language.getContentLanguage()&lt;br /&gt;
	local stylesheet = frame:extensionTag{ name = &amp;#039;templatestyles&amp;#039;, args = { src = &amp;#039;Template:CoronaTable/style.css&amp;#039; } }&lt;br /&gt;
	local root = mw.html.create(&amp;#039;table&amp;#039;):attr(&amp;#039;id&amp;#039;,&amp;#039;coronavirusTable&amp;#039;):addClass(&amp;#039;wikitable plainrowheaders sortable&amp;#039;)&lt;br /&gt;
	root:tag(&amp;#039;caption&amp;#039;):wikitext(Localization.caption)&lt;br /&gt;
	root:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(headers[&amp;#039;Country&amp;#039;])&lt;br /&gt;
			:done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(headers[&amp;#039;Cases&amp;#039;])&lt;br /&gt;
			:done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(headers[&amp;#039;Deaths&amp;#039;])&lt;br /&gt;
			:done()			&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(headers[&amp;#039;Recoveries&amp;#039;])&lt;br /&gt;
			:done()&lt;br /&gt;
	local sums = {0, 0, 0}&lt;br /&gt;
	for k,v in pairs(data[&amp;#039;data&amp;#039;]) do&lt;br /&gt;
		sums[1] = sums[1] + v[2]&lt;br /&gt;
		sums[2] = sums[2] + v[3]&lt;br /&gt;
		sums[3] = sums[3] + v[4]&lt;br /&gt;
		local teritory = frame:preprocess(translateTeritory(v[1], teritoriesWikidataDict))&lt;br /&gt;
		local tdCases = mw.html.create(&amp;#039;td&amp;#039;):wikitext(lang:formatNum(v[2]))&lt;br /&gt;
		if v[2] == 0 then tdCases:cssText(&amp;#039;color:gray;&amp;#039;) end&lt;br /&gt;
		local tdDeaths = mw.html.create(&amp;#039;td&amp;#039;):wikitext(lang:formatNum(v[3]))&lt;br /&gt;
		if v[3] == 0 then tdDeaths:cssText(&amp;#039;color:gray;&amp;#039;) end&lt;br /&gt;
		local tdRecoveries = mw.html.create(&amp;#039;td&amp;#039;):wikitext(lang:formatNum(v[4]))&lt;br /&gt;
		if v[4] == 0 then tdRecoveries:cssText(&amp;#039;color:gray;&amp;#039;) end&lt;br /&gt;
		root:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
				:attr(&amp;#039;scope&amp;#039;, &amp;#039;row&amp;#039;)&lt;br /&gt;
				:wikitext(teritory)&lt;br /&gt;
				:done()&lt;br /&gt;
				:node(tdCases)&lt;br /&gt;
				:node(tdDeaths)&lt;br /&gt;
				:node(tdRecoveries)&lt;br /&gt;
				:done()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	root:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
				:wikitext(i18nSum)&lt;br /&gt;
				:done()&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
				:wikitext(lang:formatNum(sums[1]))&lt;br /&gt;
				:done()&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
				:wikitext(lang:formatNum(sums[2]))&lt;br /&gt;
				:done()			&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
				:wikitext(lang:formatNum(sums[3]))&lt;br /&gt;
				:done()&lt;br /&gt;
	&lt;br /&gt;
	root:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
		:attr(&amp;#039;colspan&amp;#039;, &amp;#039;4&amp;#039;)&lt;br /&gt;
		:wikitext(mw.ustring.format(&amp;#039;[[c:Data:2019–20 coronavirus outbreak.tab|%s]]&amp;#039;, editLabel))&lt;br /&gt;
	return stylesheet..tostring(root)&lt;br /&gt;
end&lt;br /&gt;
return {&lt;br /&gt;
	showTable=showTable&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>מ. רובין</name></author>
	</entry>
</feed>