https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=Modul%3AISO15924%2Ftable
Modul:ISO15924/table - Versionsgeschichte
2025-06-25T07:10:37Z
Versionsgeschichte dieser Seite in Wikipedia
MediaWiki 1.45.0-wmf.6
https://de.wikipedia.org/w/index.php?title=Modul:ISO15924/table&diff=193394648&oldid=prev
PerfektesChaos: 2019-10-22
2019-10-23T15:46:31Z
<p>2019-10-22</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="de">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 23. Oktober 2019, 17:46 Uhr</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Zeile 1:</td>
<td colspan="2" class="diff-lineno">Zeile 1:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local ISO15924 = { suite = "ISO15924",</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local ISO15924 = { suite = "ISO15924",</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> sub = "table",</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> sub = "table",</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> serial = "2019-10-<del style="font-weight: bold; text-decoration: none;">20</del>",</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> serial = "2019-10-<ins style="font-weight: bold; text-decoration: none;">22</ins>",</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> item = 71970561,</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> item = 71970561,</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> main = 71584769,</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> main = 71584769,</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Zeile 77:</td>
<td colspan="2" class="diff-lineno">Zeile 77:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local template = config.tmplLang</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local template = config.tmplLang</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if type( template ) == "table" then</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if type( template ) == "table" then</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local <del style="font-weight: bold; text-decoration: none;">source</del> = template.title</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local <ins style="font-weight: bold; text-decoration: none;">s</ins> = template.title</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local <del style="font-weight: bold; text-decoration: none;">f,</del> <del style="font-weight: bold; text-decoration: none;">lucky,</del> <del style="font-weight: bold; text-decoration: none;">s</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local <ins style="font-weight: bold; text-decoration: none;">p</ins> <ins style="font-weight: bold; text-decoration: none;">=</ins> <ins style="font-weight: bold; text-decoration: none;">{ }</ins></div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if type( <del style="font-weight: bold; text-decoration: none;">source</del> ) <del style="font-weight: bold; text-decoration: none;">~</del>= "string" then</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if type( <ins style="font-weight: bold; text-decoration: none;">s</ins> ) <ins style="font-weight: bold; text-decoration: none;">=</ins>= "string" then</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if type( template.param ) == "string" then</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> p[ template.param ] = access</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> else</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if type( template.namePat ) == "string" and</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if type( template.namePat ) == "string" and</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> template.namePat:find( "%s", 1, true ) then</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> template.namePat:find( "%s", 1, true ) then</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del style="font-weight: bold; text-decoration: none;">source</del> = string.format( template.namePat, access )</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins style="font-weight: bold; text-decoration: none;">s</ins> = string.format( template.namePat, access )</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if type( <del style="font-weight: bold; text-decoration: none;">source</del> ) == "string" then</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if type( <ins style="font-weight: bold; text-decoration: none;">s</ins> ) == "string" then</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del style="font-weight: bold; text-decoration: none;">f</del> <del style="font-weight: bold; text-decoration: none;">= function ( a )</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins style="font-weight: bold; text-decoration: none;">local</ins> <ins style="font-weight: bold; text-decoration: none;">lucky</ins></div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del style="font-weight: bold; text-decoration: none;"> return ISO15924.frame:expandTemplate{ title = a }</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins style="font-weight: bold; text-decoration: none;">lucky,</ins> <ins style="font-weight: bold; text-decoration: none;">s</ins> <ins style="font-weight: bold; text-decoration: none;">=</ins> <ins style="font-weight: bold; text-decoration: none;">pcall(</ins> <ins style="font-weight: bold; text-decoration: none;">function</ins> <ins style="font-weight: bold; text-decoration: none;">()</ins></div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del style="font-weight: bold; text-decoration: none;">end</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins style="font-weight: bold; text-decoration: none;"> return ISO15924.frame:expandTemplate{</ins></div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del style="font-weight: bold; text-decoration: none;">lucky,</del> <del style="font-weight: bold; text-decoration: none;">s</del> <del style="font-weight: bold; text-decoration: none;">=</del> <del style="font-weight: bold; text-decoration: none;">pcall(</del> <del style="font-weight: bold; text-decoration: none;">f,</del> <del style="font-weight: bold; text-decoration: none;">source</del> <del style="font-weight: bold; text-decoration: none;">)</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins style="font-weight: bold; text-decoration: none;"> title = s,</ins></div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> args = p }</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end )</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if lucky then</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if lucky then</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> r = s</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> r = s</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Zeile 103:</td>
<td colspan="2" class="diff-lineno">Zeile 109:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> r = tostring( e )</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> r = tostring( e )</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> return r<del style="font-weight: bold; text-decoration: none;"> </del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> return r</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end -- fill()</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end -- fill()</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>
PerfektesChaos
https://de.wikipedia.org/w/index.php?title=Modul:ISO15924/table&diff=193365505&oldid=prev
Funkruf: Schützte „Modul:ISO15924/table“: Wunsch auf WP:A/AF https://de.wikipedia.org/w/index.php?title=Wikipedia:Administratoren/Anfragen&diff=prev&oldid=193363492&diffmode=source ([Bearbeiten=Nur Sichter] (unbeschränkt) [Verschieben=Nur Administratoren] (unbeschränkt))
2019-10-22T16:16:20Z
<p>Schützte „<a href="/wiki/Modul:ISO15924/table" title="Modul:ISO15924/table">Modul:ISO15924/table</a>“: Wunsch auf WP:A/AF https://de.wikipedia.org/w/index.php?title=Wikipedia:Administratoren/Anfragen&diff=prev&oldid=193363492&diffmode=source ([Bearbeiten=Nur Sichter] (unbeschränkt) [Verschieben=Nur Administratoren] (unbeschränkt))</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="de">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Version vom 22. Oktober 2019, 18:16 Uhr</td>
</tr><tr><td colspan="2" class="diff-notice" lang="de"><div class="mw-diff-empty">(kein Unterschied)</div>
</td></tr></table>
Funkruf
https://de.wikipedia.org/w/index.php?title=Modul:ISO15924/table&diff=193361817&oldid=prev
PerfektesChaos: 2019-10-20
2019-10-22T14:15:09Z
<p>2019-10-20</p>
<p><b>Neue Seite</b></p><div>local ISO15924 = { suite = "ISO15924",<br />
sub = "table",<br />
serial = "2019-10-20",<br />
item = 71970561,<br />
main = 71584769,<br />
iso639 = { suite = "Multilingual",<br />
item = 47541920 }<br />
}<br />
--[=[<br />
Generate ISO 15924 table with names and languages<br />
]=]<br />
local Failsafe = ISO15924<br />
local GlobalMod = ISO15924<br />
<br />
<br />
<br />
local foreignModule = function ( access, advanced, append, alt, alert )<br />
-- Fetch global module<br />
-- Precondition:<br />
-- access -- string, with name of base module<br />
-- advanced -- true, for require(); else mw.loadData()<br />
-- append -- string, with subpage part, if any; or false<br />
-- alt -- number, of wikidata item of root; or false<br />
-- alert -- true, for throwing error on data problem<br />
-- Postcondition:<br />
-- Returns whatever, probably table<br />
-- 2019-10-20<br />
local storage = access<br />
local fun, lucky, r<br />
if advanced then<br />
fun = require<br />
else<br />
fun = mw.loadData<br />
end<br />
if append then<br />
storage = string.format( "%s/%s", storage, append )<br />
end<br />
lucky, r = pcall( fun, "Module:" .. storage )<br />
if not lucky then<br />
local suited<br />
GlobalMod.globalModules = GlobalMod.globalModules or { }<br />
suited = GlobalMod.globalModules[ access ]<br />
if not suited and<br />
type( alt ) == "number" and<br />
alt > 0 then<br />
suited = string.format( "Q%d", alt )<br />
suited = mw.wikibase.getSitelink( suited )<br />
GlobalMod.globalModules[ access ] = suited or true<br />
end<br />
if type( suited ) == "string" then<br />
storage = suited<br />
if append then<br />
storage = string.format( "%s/%s", storage, append )<br />
end<br />
lucky, r = pcall( fun, storage )<br />
end<br />
if not lucky and alert then<br />
error( "Missing or invalid page: " .. storage, 0 )<br />
end<br />
end<br />
return r<br />
end -- foreignModule()<br />
<br />
<br />
<br />
local function fill( access, alien )<br />
-- Expand language name template<br />
-- access -- string, with language code<br />
-- alien -- language code for which to be generated<br />
-- Returns string<br />
local config = foreignModule( ISO15924.suite,<br />
false,<br />
"config",<br />
ISO15924.main )<br />
local r<br />
if type( config ) == "table" then<br />
local template = config.tmplLang<br />
if type( template ) == "table" then<br />
local source = template.title<br />
local f, lucky, s<br />
if type( source ) ~= "string" then<br />
if type( template.namePat ) == "string" and<br />
template.namePat:find( "%s", 1, true ) then<br />
source = string.format( template.namePat, access )<br />
end<br />
end<br />
if type( source ) == "string" then<br />
f = function ( a )<br />
return ISO15924.frame:expandTemplate{ title = a }<br />
end<br />
lucky, s = pcall( f, source )<br />
if lucky then<br />
r = s<br />
end<br />
end<br />
end<br />
end<br />
if not r and ISO15924.iso639.bib then<br />
r = ISO15924.iso639.bib.getName( access, alien )<br />
end<br />
if not r then<br />
local e = mw.html.create( "code" ):wikitext( access )<br />
r = tostring( e )<br />
end<br />
return r <br />
end -- fill()<br />
<br />
<br />
<br />
ISO15924.fiat = function ( access, assigned, adjust, alien,<br />
accessed, align, alien2, access2 )<br />
-- Create table row of scripting code, names, and perhaps languages<br />
-- access -- string, with scripting code<br />
-- assigned -- table, with translate text<br />
-- adjust -- function<br />
-- alien -- language code for which to be generated<br />
-- accessed -- table, with languages, or nil<br />
-- align -- number of columns<br />
-- alien2 -- code of second language, or nil<br />
-- access2 -- table, with translate text of second language, or nil<br />
local e = assigned[ access ]<br />
local r = "\n|-"<br />
if accessed then<br />
r = string.format( "%s id='%s'", r, access )<br />
end<br />
r = string.format( "%s\n|style='font-family:monospace'| %s ||",<br />
r, access )<br />
local s = type( e )<br />
if accessed then<br />
local cl = { }<br />
if s == "table" then<br />
s = e[ 1 ]<br />
else<br />
s = e<br />
end<br />
if type( s ) == "string" then<br />
r = string.format( "%s %s || ", r, adjust( access ) )<br />
else<br />
r = r .. " || "<br />
end<br />
if type( alien2 ) == "string" then<br />
if type( access2 ) == "table" then<br />
r = string.format( "%s %s || ",<br />
r, access2[ access ] )<br />
else<br />
r = r .. " || "<br />
end<br />
end<br />
for k, v in pairs( accessed ) do<br />
if type( v ) == "table" then<br />
for kk, vv in pairs( v ) do<br />
if vv == access then<br />
table.insert( cl, k )<br />
break -- for kk, vv<br />
end<br />
end -- for kk, vv<br />
elseif v == access then<br />
table.insert( cl, k )<br />
end<br />
end -- for k, v<br />
table.sort( cl )<br />
s = ""<br />
for i = 1, #cl do<br />
r = string.format( "%s%s%s",<br />
r, s, fill( cl[ i ], alien ) )<br />
s = ", "<br />
end -- for i<br />
else<br />
local n<br />
if s == "table" then<br />
n = 0<br />
s = e[ 1 ]<br />
for k, v in pairs( e ) do<br />
n = n + 1<br />
end -- for k, v<br />
else<br />
s = e<br />
n = 1<br />
end<br />
if n == 1 and align > 1 then<br />
r = string.format( "%scolspan='%d'|", r, align )<br />
end<br />
r = string.format( "%s %s", r, adjust( access ) )<br />
if n > 1 then<br />
for i = 2, n do<br />
r = string.format( "%s || %s",<br />
r, adjust( access, false, i ) )<br />
if i >= align then<br />
break -- for i<br />
end<br />
end -- for i<br />
end<br />
end<br />
return r<br />
end -- ISO15924.fiat()<br />
<br />
<br />
<br />
ISO15924.fire = function ( all, alien, add, alien2 )<br />
-- Create table body of scripting codes, names, and perhaps languages<br />
-- Precondition:<br />
-- all -- true, if all known languages to be added<br />
-- otherwise linguistic variations<br />
-- alien -- code of language in which to be generated, or nil<br />
-- add -- arbitrary additional information<br />
-- alien2 -- code of second language, or nil<br />
-- Postcondition:<br />
-- Returns string in table syntax<br />
local texts = foreignModule( ISO15924.suite,<br />
false,<br />
"translate",<br />
ISO15924.main )<br />
local slang = alien<br />
local r = ""<br />
if not slang then<br />
slang = mw.language.getContentLanguage():getCode():lower()<br />
end<br />
if type( texts.translate ) == "table" and<br />
type( texts.translate[ slang ] ) == "table" then<br />
local trsl = texts.translate[ slang ]<br />
if type( trsl ) == "table" then<br />
local max = trsl.maxElem or 0<br />
local order = { }<br />
local s<br />
for k, v in pairs( trsl ) do<br />
s = type( v )<br />
if s == "table" then<br />
m = max<br />
elseif s == "string" then<br />
m = 1<br />
else<br />
m = false<br />
end<br />
if m then<br />
table.insert( order, k )<br />
if m > max then<br />
max = m<br />
end<br />
end<br />
end -- for k, v<br />
if max > 0 then<br />
local resi<br />
local fmtr = function( a, another, add )<br />
return resi.Text.scriptName( a,<br />
another or<br />
slang,<br />
add )<br />
end<br />
local data, trsl2<br />
if not ISO15924.frame then<br />
ISO15924.frame = mw.getCurrentFrame()<br />
end<br />
table.sort( order )<br />
if all then<br />
data = foreignModule( ISO15924.suite,<br />
false,<br />
"commons",<br />
ISO15924.main )<br />
if not data then<br />
data = foreignModule( ISO15924.suite,<br />
false,<br />
"codes",<br />
ISO15924.main )<br />
end<br />
if type( data.iso639script ) == "table" then<br />
local iso639<br />
data = data.iso639script<br />
resi = foreignModule( ISO15924.suite,<br />
true,<br />
false,<br />
ISO15924.main )<br />
if type( resi ) == "table" then<br />
resi = resi[ ISO15924.suite ]()<br />
ISO15924.base = resi<br />
end<br />
iso639 = foreignModule( ISO15924.iso639.suite,<br />
true,<br />
false,<br />
ISO15924.iso639.item )<br />
if type( iso639 ) == "table" then<br />
ISO15924.iso639.bib =<br />
iso639[ ISO15924.iso639.suite ]()<br />
end<br />
else<br />
data = false<br />
end<br />
end<br />
if resi then<br />
if type( alien2 ) == "string" then<br />
trsl2 = texts.translate[ alien2 ]<br />
end<br />
for i = 1, #order do<br />
r = r .. ISO15924.fiat( order[ i ],<br />
trsl,<br />
fmtr,<br />
slang,<br />
data,<br />
max,<br />
alien2,<br />
trsl2 )<br />
end -- for i<br />
end<br />
end<br />
end<br />
end<br />
r = r .. "\n|}"<br />
return r<br />
end -- ISO15924.fire()<br />
<br />
<br />
<br />
Failsafe.failsafe = function ( atleast )<br />
-- Retrieve versioning and check for compliance<br />
-- Precondition:<br />
-- atleast -- string, with required version or "wikidata" or "~"<br />
-- or false<br />
-- Postcondition:<br />
-- Returns string -- with queried version, also if problem<br />
-- false -- if appropriate<br />
-- 2019-10-15<br />
local last = ( atleast == "~" )<br />
local since = atleast<br />
local r<br />
if last or since == "wikidata" then<br />
local item = Failsafe.item<br />
since = false<br />
if type( item ) == "number" and item > 0 then<br />
local entity = mw.wikibase.getEntity( string.format( "Q%d",<br />
item ) )<br />
if type( entity ) == "table" then<br />
local seek = Failsafe.serialProperty or "P348"<br />
local vsn = entity:formatPropertyValues( seek )<br />
if type( vsn ) == "table" and<br />
type( vsn.value ) == "string" and<br />
vsn.value ~= "" then<br />
if last and vsn.value == Failsafe.serial then<br />
r = false<br />
else<br />
r = vsn.value<br />
end<br />
end<br />
end<br />
end<br />
end<br />
if type( r ) == "nil" then<br />
if not since or since <= Failsafe.serial then<br />
r = Failsafe.serial<br />
else<br />
r = false<br />
end<br />
end<br />
return r<br />
end -- Failsafe.failsafe()<br />
<br />
<br />
<br />
-- Export<br />
local p = { }<br />
<br />
p.f = function ( frame )<br />
ISO15924.frame = frame<br />
return ISO15924.fire( frame.args.languages == "1",<br />
frame.args.lang,<br />
frame.args.add,<br />
frame.args.lang2 )<br />
end -- p.f<br />
<br />
p.failsafe = function ( frame )<br />
-- Versioning interface<br />
local s = type( frame )<br />
local since<br />
if s == "table" then<br />
since = frame.args[ 1 ]<br />
elseif s == "string" then<br />
since = frame<br />
end<br />
if since then<br />
since = mw.text.trim( since )<br />
if since == "" then<br />
since = false<br />
end<br />
end<br />
return Failsafe.failsafe( since ) or ""<br />
end -- p.failsafe()<br />
<br />
p.ISO15924 = function ()<br />
return ISO15924<br />
end -- p.ISO15924<br />
<br />
return p</div>
PerfektesChaos