<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl">
	<id>http://4strona.duckdns.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Modu%C5%82%3AConversion-zh%2Fsandbox</id>
	<title>Moduł:Conversion-zh/sandbox - Historia wersji</title>
	<link rel="self" type="application/atom+xml" href="http://4strona.duckdns.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Modu%C5%82%3AConversion-zh%2Fsandbox"/>
	<link rel="alternate" type="text/html" href="http://4strona.duckdns.org/wiki/index.php?title=Modu%C5%82:Conversion-zh/sandbox&amp;action=history"/>
	<updated>2026-07-30T15:47:28Z</updated>
	<subtitle>Historia wersji tej strony wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>http://4strona.duckdns.org/wiki/index.php?title=Modu%C5%82:Conversion-zh/sandbox&amp;diff=135&amp;oldid=prev</id>
		<title>Fuhrer: 1 wersja</title>
		<link rel="alternate" type="text/html" href="http://4strona.duckdns.org/wiki/index.php?title=Modu%C5%82:Conversion-zh/sandbox&amp;diff=135&amp;oldid=prev"/>
		<updated>2026-07-24T10:04:15Z</updated>

		<summary type="html">&lt;p&gt;1 wersja&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;pl&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← poprzednia wersja&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Wersja z 10:04, 24 lip 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;pl&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Brak różnic)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key 3strona_wiki:diff:1.41:old-134:rev-135 --&gt;
&lt;/table&gt;</summary>
		<author><name>Fuhrer</name></author>
	</entry>
	<entry>
		<id>http://4strona.duckdns.org/wiki/index.php?title=Modu%C5%82:Conversion-zh/sandbox&amp;diff=134&amp;oldid=prev</id>
		<title>mediawiki&gt;SunAfterRain o 09:11, 9 gru 2023</title>
		<link rel="alternate" type="text/html" href="http://4strona.duckdns.org/wiki/index.php?title=Modu%C5%82:Conversion-zh/sandbox&amp;diff=134&amp;oldid=prev"/>
		<updated>2023-12-09T09:11:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nowa strona&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local this = {}&lt;br /&gt;
local mWikitextLC = require( &amp;#039;Module:WikitextLC&amp;#039; )&lt;br /&gt;
local yesno = require( &amp;#039;Module:Yesno&amp;#039; )&lt;br /&gt;
local data = mw.loadData( &amp;#039;Module:Conversion-zh/data&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
local function _copy( src )&lt;br /&gt;
	local out = {}&lt;br /&gt;
	for k, v in pairs( src ) do&lt;br /&gt;
		out[ k ] = v&lt;br /&gt;
	end&lt;br /&gt;
	return out&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
this.fallbackList = {&lt;br /&gt;
	 [ &amp;#039;zh&amp;#039; ] = { &amp;#039;zh&amp;#039;, &amp;#039;zh-hans&amp;#039;, &amp;#039;zh-hant&amp;#039;, &amp;#039;zh-cn&amp;#039;, &amp;#039;zh-tw&amp;#039;, &amp;#039;zh-hk&amp;#039;, &amp;#039;zh-mo&amp;#039;, &amp;#039;zh-sg&amp;#039;, &amp;#039;zh-my&amp;#039; },&lt;br /&gt;
	 [ &amp;#039;zh-hans&amp;#039; ] = { &amp;#039;zh-hans&amp;#039;, &amp;#039;zh-cn&amp;#039;, &amp;#039;zh-sg&amp;#039;, &amp;#039;zh-my&amp;#039;, &amp;#039;zh&amp;#039; },&lt;br /&gt;
	 [ &amp;#039;zh-cn&amp;#039; ] = { &amp;#039;zh-cn&amp;#039;, &amp;#039;zh-hans&amp;#039;, &amp;#039;zh-my&amp;#039;, &amp;#039;zh-sg&amp;#039;, &amp;#039;zh&amp;#039; },&lt;br /&gt;
	 [ &amp;#039;zh-sg&amp;#039; ] = { &amp;#039;zh-sg&amp;#039;, &amp;#039;zh-hans&amp;#039;, &amp;#039;zh-cn&amp;#039;, &amp;#039;zh-my&amp;#039;, &amp;#039;zh&amp;#039; },&lt;br /&gt;
	 [ &amp;#039;zh-my&amp;#039; ] = { &amp;#039;zh-my&amp;#039;, &amp;#039;zh-hans&amp;#039;, &amp;#039;zh-cn&amp;#039;, &amp;#039;zh-sg&amp;#039;, &amp;#039;zh&amp;#039; },&lt;br /&gt;
	 [ &amp;#039;zh-hant&amp;#039; ] = { &amp;#039;zh-hant&amp;#039;, &amp;#039;zh-tw&amp;#039;, &amp;#039;zh-hk&amp;#039;, &amp;#039;zh-mo&amp;#039;, &amp;#039;zh&amp;#039; },&lt;br /&gt;
	 [ &amp;#039;zh-tw&amp;#039; ] = { &amp;#039;zh-tw&amp;#039;, &amp;#039;zh-hant&amp;#039;, &amp;#039;zh-hk&amp;#039;, &amp;#039;zh-mo&amp;#039;, &amp;#039;zh&amp;#039; },&lt;br /&gt;
	 [ &amp;#039;zh-hk&amp;#039; ] = { &amp;#039;zh-hk&amp;#039;, &amp;#039;zh-hant&amp;#039;, &amp;#039;zh-tw&amp;#039;, &amp;#039;zh-mo&amp;#039;, &amp;#039;zh&amp;#039; },&lt;br /&gt;
	 [ &amp;#039;zh-mo&amp;#039; ] = { &amp;#039;zh-mo&amp;#039;, &amp;#039;zh-hant&amp;#039;, &amp;#039;zh-tw&amp;#039;, &amp;#039;zh-hk&amp;#039;, &amp;#039;zh&amp;#039; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
this.namespaceData = {}&lt;br /&gt;
for id, conData in pairs( data.namespace ) do&lt;br /&gt;
	this.namespaceData[ id ] = _copy( conData )&lt;br /&gt;
	this.namespaceData[ id ].zh = mw.site.namespaces[ id ].name&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
this.variants = {&lt;br /&gt;
	&amp;#039;zh&amp;#039;,&lt;br /&gt;
	&amp;#039;zh-hans&amp;#039;,&lt;br /&gt;
	&amp;#039;zh-hant&amp;#039;,&lt;br /&gt;
	&amp;#039;zh-cn&amp;#039;,&lt;br /&gt;
	&amp;#039;zh-tw&amp;#039;,&lt;br /&gt;
	&amp;#039;zh-hk&amp;#039;,&lt;br /&gt;
	&amp;#039;zh-mo&amp;#039;,&lt;br /&gt;
	&amp;#039;zh-sg&amp;#039;,&lt;br /&gt;
	&amp;#039;zh-my&amp;#039;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local function filterVariantsKey( src )&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for _, variant in ipairs( this.variants ) do&lt;br /&gt;
		ret[ variant ] = src[ variant ]&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
this._ll = {}&lt;br /&gt;
&lt;br /&gt;
function this._ll.convert( args, userlanguage )&lt;br /&gt;
	local fallback = this.fallbackList[ userlanguage ]&lt;br /&gt;
	if not fallback then&lt;br /&gt;
		fallback = this.fallbackList[ &amp;#039;zh&amp;#039; ]&lt;br /&gt;
	end&lt;br /&gt;
	for _, langArgName in ipairs( fallback )  do&lt;br /&gt;
		if args[ langArgName ] ~= nil then&lt;br /&gt;
			return args[ langArgName ]&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function this._ll.convertNamespace( nsId, lang )&lt;br /&gt;
	local namespace = mw.site.namespaces[ nsId ] or mw.site.namespaces[ tonumber(nsId) ]&lt;br /&gt;
	if not namespace then&lt;br /&gt;
		error( &amp;#039;bad namespace &amp;#039; .. tostring( nsId ) )&lt;br /&gt;
	end&lt;br /&gt;
	local conData = this.namespaceData[ namespace.id ]&lt;br /&gt;
	if conData then&lt;br /&gt;
		return this._ll.convert( conData, lang )&lt;br /&gt;
	else&lt;br /&gt;
		return namespace.name&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
this._lc = {}&lt;br /&gt;
&lt;br /&gt;
function this._lc.convert( args )&lt;br /&gt;
	return mWikitextLC.selective( filterVariantsKey( args ) )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function this._lc.convertNamespace( nsId )&lt;br /&gt;
	local namespace = mw.site.namespaces[ nsId ] or mw.site.namespaces[ tonumber( nsId ) ]&lt;br /&gt;
	if not namespace then&lt;br /&gt;
		error( &amp;#039;bad namespace &amp;#039; .. nsId )&lt;br /&gt;
	end&lt;br /&gt;
	if namespace.id == 0 then&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	local conData = this.namespaceData[ namespace.id ]&lt;br /&gt;
	if conData then&lt;br /&gt;
		local ret = {}&lt;br /&gt;
		for _, variant in ipairs( this.variants ) do&lt;br /&gt;
			if conData[ variant ] then&lt;br /&gt;
				ret[ variant ] = conData[ variant ]&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return mWikitextLC.selective( ret )&lt;br /&gt;
	else&lt;br /&gt;
		return namespace.name .. &amp;#039;:&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function wrapNamespaceAsPrefix( result )&lt;br /&gt;
	return result and ( result .. &amp;#039;:&amp;#039; ) or &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function this._convert( args, lang, useLC )&lt;br /&gt;
	return useLC&lt;br /&gt;
		and this._lc.convert( args )&lt;br /&gt;
		or this._ll.convert( args, lang )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function this._convertNamespace( nsId, lang, useLC )&lt;br /&gt;
	return useLC&lt;br /&gt;
		and this._lc.convertNamespace( nsId )&lt;br /&gt;
		or this._ll.convertNamespace( nsId, lang )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function lc_zh_merge_HideNamespaceWarning( param )&lt;br /&gt;
	mw.addWarning(&lt;br /&gt;
		&amp;#039;Use of &amp;lt;code&amp;gt;&amp;amp;#123;&amp;amp;#123;[[Template:LC zh|LC zh]]&amp;amp;#124;&amp;#039;&lt;br /&gt;
			.. param:gsub( &amp;#039;|&amp;#039;, &amp;#039;&amp;amp;#124;&amp;#039; ) &lt;br /&gt;
			.. &amp;#039;&amp;amp;#125;&amp;amp;#125;&amp;lt;/code&amp;gt; to hide namespace is deprecated, remove argument namespace or use &amp;lt;code&amp;gt;&amp;amp;#124;nsp=1&amp;lt;/code&amp;gt; instead.&amp;#039;&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function this._main( args, cfg )&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	cfg = cfg or {}&lt;br /&gt;
	local sourceMode = args[ &amp;#039;mode&amp;#039; ] or args[ &amp;#039;1&amp;#039; ] or args[ 1 ] -- N (Namespace) / T (Title) / C (Content / Default)&lt;br /&gt;
	sourceMode = ( not cfg.disableSourceMode and sourceMode ) and tostring( sourceMode ):upper() or &amp;#039;C&amp;#039;&lt;br /&gt;
	local namespace = args.namespace or args[ &amp;#039;2&amp;#039; ] or args[ 2 ] -- Only use on mode Title. Pass empty string / nil (lua) or skip this argument to hide namespace&lt;br /&gt;
&lt;br /&gt;
	local hideNamespace = yesno( args.nsp or args.hide_ns )&lt;br /&gt;
&lt;br /&gt;
	if cfg.LC_zh_fallback and args[ 3 ] ~= nil then&lt;br /&gt;
		if yesno( args[ &amp;#039;2&amp;#039; ] or args[ 2 ] ) == false then&lt;br /&gt;
			lc_zh_merge_HideNamespaceWarning( &amp;#039;2=0|3=[namespace]&amp;#039; )&lt;br /&gt;
			hideNamespace = true&lt;br /&gt;
		else&lt;br /&gt;
			mw.addWarning(&lt;br /&gt;
				&amp;#039;Use of &amp;lt;code&amp;gt;&amp;amp;#123;&amp;amp;#123;[[Template:LC zh|LC zh]]&amp;amp;#124;3=[namespace]&amp;amp;#125;&amp;amp;#125;&amp;lt;/code&amp;gt; is deprecated, use &amp;lt;code&amp;gt;namespcae=[namespace]&amp;lt;/code&amp;gt; instead.&amp;#039;&lt;br /&gt;
			)&lt;br /&gt;
			namespace = args[ 3 ]&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local pageLangCode = frame:preprocess( &amp;#039;{{PAGELANGUAGE}}&amp;#039; )&lt;br /&gt;
	local userLanguage = frame:callParserFunction{ name = &amp;#039;int&amp;#039;, args = { &amp;#039;lang&amp;#039; } }&lt;br /&gt;
	local argNoUseLC = yesno( args.nolc )&lt;br /&gt;
	argNoUseLC = argNoUseLC == nil&lt;br /&gt;
	local useLC = yesno( args.lc )&lt;br /&gt;
		or ( yesno( args.nolc ) ~= nil and not yesno( args.nolc ) )&lt;br /&gt;
		or ( cfg.useLC ~= nil and yesno( useLC ) or pageLangCode == &amp;#039;zh&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
	if cfg.LC_zh_fallback and args.nons ~= nil then&lt;br /&gt;
		mw.addWarning(&lt;br /&gt;
			&amp;#039;Use of &amp;lt;code&amp;gt;&amp;amp;#123;&amp;amp;#123;[[Template:LC zh|LC zh]]&amp;amp;#124;nons=0&amp;amp;#125;&amp;amp;#125;&amp;lt;/code&amp;gt; is deprecated, use &amp;lt;code&amp;gt;hide_ns=1&amp;amp;#124;nolc=true&amp;lt;/code&amp;gt; instead.&amp;#039;&lt;br /&gt;
		)&lt;br /&gt;
		if yesno( args.nons ) == false then&lt;br /&gt;
			hideNamespace = true&lt;br /&gt;
			useLC = false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if sourceMode == &amp;#039;N&amp;#039; then&lt;br /&gt;
		if namespace then&lt;br /&gt;
			return this._convertNamespace( args, userLanguage, useLC )&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	elseif sourceMode == &amp;#039;T&amp;#039; then&lt;br /&gt;
		local mainText = this._convert( args, userLanguage, useLC )&lt;br /&gt;
		local nsText = &amp;#039;&amp;#039;&lt;br /&gt;
		if namespace then&lt;br /&gt;
			nsText = wrapNamespaceAsPrefix( this._convertNamespace( namespace, userLanguage, useLC ) )&lt;br /&gt;
		end&lt;br /&gt;
		return nsText .. mainText&lt;br /&gt;
	elseif sourceMode == &amp;#039;C&amp;#039; then&lt;br /&gt;
		return this._convert( args, userLanguage, useLC )&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function this.main( frame )&lt;br /&gt;
	local getArgs&lt;br /&gt;
	local args&lt;br /&gt;
	if not getArgs then&lt;br /&gt;
		getArgs = require( &amp;#039;Module:Arguments&amp;#039; ).getArgs&lt;br /&gt;
	end&lt;br /&gt;
	args = getArgs( frame, { parentFirst = true } )&lt;br /&gt;
	local cfg&lt;br /&gt;
	if frame:getParent() then&lt;br /&gt;
		cfg = frame.args&lt;br /&gt;
	end&lt;br /&gt;
	return this._main( args, cfg )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return this&lt;/div&gt;</summary>
		<author><name>mediawiki&gt;SunAfterRain</name></author>
	</entry>
</feed>