Module:T-TLD: Difference between revisions
// via Wikitext Extension for VSCode Tag: Manual revert |
// via Wikitext Extension for VSCode |
||
| (One intermediate revision by the same user not shown) | |||
| Line 113: | Line 113: | ||
template.config.processors.RVC = function(value, args) | template.config.processors.RVC = function(value, args) | ||
local val = tostring(value) | local val = tostring(value) | ||
if val: | if val:match("^https://gtldresult%.icann%.org/") then | ||
-- Full URL provided, use it directly | |||
return string.format("[%s Here]", val) | return string.format("[%s Here]", val) | ||
elseif val:match("^%d+$") then | elseif val:match("^%d+$") then | ||
-- Only application number provided, construct the full URL | |||
return string.format("[https://gtldresult.icann.org/applicationstatus/applicationdetails/%s Here]", val) | return string.format("[https://gtldresult.icann.org/applicationstatus/applicationdetails/%s Here]", val) | ||
end | end | ||
| Line 122: | Line 124: | ||
template.config.processors.PIC = template.config.processors.RVC | template.config.processors.PIC = template.config.processors.RVC | ||
-- Override singular | -- Override singular 'language' field to skip normalization | ||
template.config.processors.language = function(value, args) | template.config.processors.language = function(value, args) | ||
return value | return value | ||