Modul:Taxonbar: Versiyalar orasidagi farq
Programmer (munozara | hissa) kTahrir izohi yoʻq |
zs-wikidata-inert: Wikibase klienti yoʻqligida Wikidata xatolarini bostirish |
||
| ( Bitta oraliq tahrir bir xil foydalanuvchi tomonidan koʻrsatilmagan) | |||
| Qator 1: | Qator 1: | ||
-- [zs-wikidata-inert] With no Wikibase client every from=Q… lookup returns | |||
-- nil, so this module can only emit "not a valid Wikidata entity ID" errors | |||
-- and Wikidata tracking categories. Both are suppressed below while the | |||
-- mw.wikibase stub is in force. Auto-added on import. | |||
local zs_no_wikibase = mw.wikibase == nil or mw.wikibase.zsProbeNoSuchKey ~= nil | |||
-- [zs-wikibase-guard] Ziyosfera has no Wikibase client; stub mw.wikibase so | |||
-- modules reading Wikidata degrade to nil instead of erroring. Auto-added on import. | |||
if not mw.wikibase then mw.wikibase = setmetatable({}, { __index = function() return function() return nil end end }) end | |||
require('strict') | require('strict') | ||
| Qator 774: | Qator 782: | ||
if not isNilOrEmpty( parentArgs['demo'] ) then | if not isNilOrEmpty( parentArgs['demo'] ) then | ||
outString = outString..mw.text.nowiki(table.concat(tCats))..'<br />' | outString = outString..mw.text.nowiki(table.concat(tCats))..'<br />' | ||
elseif currentTitle.namespace == 0 then | elseif currentTitle.namespace == 0 and not zs_no_wikibase then | ||
outString = outString..table.concat(tCats) | outString = outString..table.concat(tCats) | ||
end | end | ||
if zs_no_wikibase then errors = '' end | |||
return outString..errors | return outString..errors | ||
end | end | ||
return p | return p | ||