<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ar">
	<id>https://3rabica.org/index.php?action=history&amp;feed=atom&amp;title=%D9%88%D8%AD%D8%AF%D8%A9%3ACountryData</id>
	<title>وحدة:CountryData - تاريخ المراجعة</title>
	<link rel="self" type="application/atom+xml" href="https://3rabica.org/index.php?action=history&amp;feed=atom&amp;title=%D9%88%D8%AD%D8%AF%D8%A9%3ACountryData"/>
	<link rel="alternate" type="text/html" href="https://3rabica.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:CountryData&amp;action=history"/>
	<updated>2026-06-05T03:54:50Z</updated>
	<subtitle>تاريخ التعديل لهذه الصفحة في الويكي</subtitle>
	<generator>MediaWiki 1.43.7</generator>
	<entry>
		<id>https://3rabica.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:CountryData&amp;diff=1054&amp;oldid=prev</id>
		<title>عبد العزيز: غيّر إعدادات حماية »وحدة:CountryData«: بوت: [https://w.wiki/7NGP تحسين مستوي الحماية] ([تعديل=السماح للمحررين فقط] (غير محدد) [النقل=السماح للمحررين فقط] (غير محدد))</title>
		<link rel="alternate" type="text/html" href="https://3rabica.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:CountryData&amp;diff=1054&amp;oldid=prev"/>
		<updated>2023-09-01T20:20:30Z</updated>

		<summary type="html">&lt;p&gt;غيّر إعدادات حماية »&lt;a href=&quot;/%D9%88%D8%AD%D8%AF%D8%A9:CountryData&quot; title=&quot;وحدة:CountryData&quot;&gt;وحدة:CountryData&lt;/a&gt;«: بوت: [https://w.wiki/7NGP تحسين مستوي الحماية] ([تعديل=السماح للمحررين فقط] (غير محدد) [النقل=السماح للمحررين فقط] (غير محدد))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;صفحة جديدة&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function getcontents(frame,country,params)&lt;br /&gt;
	local find= require(&amp;#039;Module:تحويلات بلدان&amp;#039;).red&lt;br /&gt;
		con = find(country)&lt;br /&gt;
  return frame:expandTemplate({title=&amp;quot;بيانات بلد &amp;quot;..con;args=params})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.gettable(frame,country,params)&lt;br /&gt;
--Returns the parameters of a country data template as a Lua table&lt;br /&gt;
  --If not a valid data template, return empty table&lt;br /&gt;
  local bool, s = pcall(getcontents,frame,country,params or {})&lt;br /&gt;
  if bool and string.find(s,&amp;quot;^%{%{ *%{%{%{1&amp;quot;)&lt;br /&gt;
  then&lt;br /&gt;
    --Replace parameter delimiters with arbitrary control characters&lt;br /&gt;
    --to avoid clashes if param values contain equals/pipe signs&lt;br /&gt;
    s = string.gsub(s,&amp;quot;|([^|=]-)=&amp;quot;,&amp;quot;\1\1%1\2&amp;quot;)&lt;br /&gt;
    s = string.gsub(s,&amp;quot;}}%s*$&amp;quot;,&amp;quot;\1&amp;quot;)&lt;br /&gt;
    --Loop over string and add params to table&lt;br /&gt;
    local part = {}&lt;br /&gt;
    for par in string.gmatch(s,&amp;quot;\1[^\1\2]-\2[^\1\2]-\1&amp;quot;) do&lt;br /&gt;
      local k = string.match(par,&amp;quot;\1%s*(.-)%s*\2&amp;quot;)&lt;br /&gt;
      local v = string.match(par,&amp;quot;\2%s*(.-)%s*\1&amp;quot;)&lt;br /&gt;
      if v and not (v==&amp;quot;&amp;quot; and string.find(k,&amp;quot;^flag alias&amp;quot;)) then&lt;br /&gt;
        part[k] = v&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return part&lt;br /&gt;
  else&lt;br /&gt;
  	return {}&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getalias(frame)&lt;br /&gt;
--Returns a single parameter value from a data template&lt;br /&gt;
  local part = p.gettable(frame,frame.args[1])&lt;br /&gt;
  if frame.args.variant&lt;br /&gt;
    then return tostring(part[frame.args[2]..&amp;quot;-&amp;quot;..frame.args.variant]&lt;br /&gt;
                         or part[frame.args[2]] or frame.args.def)&lt;br /&gt;
    else return tostring(part[frame.args[2]] or frame.args.def)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.gettemplate(frame)&lt;br /&gt;
--For testing, recreates the country data from the created Lua table&lt;br /&gt;
  --Get data table&lt;br /&gt;
  local data = p.gettable(frame,frame.args[1])&lt;br /&gt;
  --Concatenate fields into a template-like string&lt;br /&gt;
  local out = &amp;quot;{{ {{{1}}}&amp;quot;&lt;br /&gt;
  for k,v in pairs(data) do&lt;br /&gt;
    out = out..&amp;quot;\n| &amp;quot;..k..&amp;quot; = &amp;quot;..v&lt;br /&gt;
  end&lt;br /&gt;
  return out..&amp;quot;\n}}&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>عبد العزيز</name></author>
	</entry>
</feed>