890
pakeitimų
SNėra keitimo santraukos |
SNėra keitimo santraukos |
||
| (nerodomos 10 tarpinės versijos, sukurtos to paties naudotojo) | |||
| 61 eilutė: | 61 eilutė: | ||
-- used by year func | -- used by year func | ||
local looporder = { | local looporder = { | ||
{ 'November', 30 }, | { 'November', 30 }, | ||
{ 'October', 31 }, | { 'October', 31 }, | ||
| 72 eilutė: | 71 eilutė: | ||
{ 'March', 31 }, | { 'March', 31 }, | ||
{ 'February', 29 }, | { 'February', 29 }, | ||
{ 'January', 31 } | { 'January', 31 }, | ||
{ 'December', 31 } | |||
} | } | ||
| 81 eilutė: | 81 eilutė: | ||
devblog = {'Developer Blogs', 'Developer Blog'}, | devblog = {'Developer Blogs', 'Developer Blog'}, | ||
event = {'Event updates', 'Event update'}, | event = {'Event updates', 'Event update'}, | ||
game = {' | game = {'Serverio restartas', 'Restartas'}, | ||
future = {'Future Updates', 'Future update'}, | future = {'Future Updates', 'Future update'}, | ||
forum = {'forum'}, | forum = {'forum'}, | ||
| 209 eilutė: | 209 eilutė: | ||
if hc(url) then | if hc(url) then | ||
if url == 'no' then | if url == 'no' then | ||
link = ' | link = 'oficialus' | ||
else | else | ||
link = '[' .. url .. ' | link = '[' .. url .. ' oficialus]' | ||
end | end | ||
else | else | ||
| 223 eilutė: | 223 eilutė: | ||
end | end | ||
link = '[https://wiki.mcslime.lt | link = '[https://wiki.mcslime.lt/' .. link .. ' oficialus pranešimas]' | ||
end | end | ||
| 229 eilutė: | 229 eilutė: | ||
local date_link, day, month, year | local date_link, day, month, year | ||
if hc(a.date) then | if hc(a.date) then | ||
day = lang:formatDate('d', a.date) -- Day with leading zeros | |||
month = lang:formatDate('m', a.date) -- Month with leading zeros | |||
year = lang:formatDate('Y', a.date) -- Four-digit year | |||
date_link = string.format('[[%s-%s-%s]]', year, month, day) -- Format as yyyy-MM-dd | |||
else | else | ||
date_link = '(nenurodyta)' -- If no date is provided | |||
end | end | ||
if hc(a.rev) then | if hc(a.rev) then | ||
date_link = date_link .. ' | date_link = date_link .. ' ir paskutinį kartą atnaujintas ' .. lang:formatDate('[[Y-m-d]]', a.rev) | ||
end | end | ||
| 246 eilutė: | 246 eilutė: | ||
if url == 'no' then | if url == 'no' then | ||
postDateInfo = ' | postDateInfo = 'Šis straipsnis buvo sukurtas ' .. date_link .. ', bet vėliau buvo panaikintas.' | ||
else | else | ||
postDateInfo = ' | postDateInfo = 'Šis straipsnis buvo sukurtas ' .. date_link .. '.' | ||
end | end | ||
| 258 eilutė: | 258 eilutė: | ||
--Historical updates | --Historical updates | ||
if a.time == 'historical' then | if a.time == 'historical' then | ||
message = ' | message = ' yra prieš paleidžiant <b>MCSlime</b> projektą ' | ||
website = '[https://www.mcslime.lt/ <i>MCSlime.LT</i> | website = '[https://www.mcslime.lt/ <i>MCSlime.LT</i>]' | ||
end | end | ||
--OSRS updates | --OSRS updates | ||
else | else | ||
message = ' | message = ' ir priklauso MCSlime.LT projektui' | ||
website = ' | website = '' | ||
end | end | ||
div:wikitext(' | div:wikitext('Šis straipsnis yra ' .. link .. message) | ||
:tag('span') | :tag('span') | ||
:addClass('plainlinks') | :addClass('plainlinks') | ||
:wikitext(website) | :wikitext(website) | ||
:done() | :done() | ||
:wikitext('. | :wikitext('. Visos autorinės teisės priklauso [[MCSlime.LT]].') | ||
:tag('br'):done() | :tag('br'):done() | ||
:wikitext(postDateInfo) | :wikitext(postDateInfo) | ||
| 319 eilutė: | 319 eilutė: | ||
local day, month, year = '', '', '' | local day, month, year = '', '', '' | ||
if hc(a.date) then | if hc(a.date) then | ||
day = lang:formatDate('d', a.date) -- Day with leading zeros | |||
month = lang:formatDate('m', a.date) -- Month with leading zeros | |||
year = lang:formatDate('Y', a.date) -- Four-digit year | |||
date_link = string.format('[[%s-%s-%s]]', year, month, day) -- Format as yyyy-MM-dd | |||
else | else | ||
date_link = '(nenurodyta)' -- If no date is provided | |||
end | end | ||
if hc(a.rev) then | if hc(a.rev) then | ||
date_link = date_link .. ', | date_link = date_link .. ', ir paskutinį kartą atnaujintas ' .. lang:formatDate('[[Y-m-d]]', a.rev) | ||
end | end | ||
div:wikitext('These official [[Patch Notes]] are copied verbatim from the Patch Notes Archive which is no longer available. | div:wikitext('These official [[Patch Notes]] are copied verbatim from the Patch Notes Archive which is no longer available. Visos autorinės teisės priklauso [[MCSlime.LT]].') | ||
:done() | :done() | ||
:tag('br'):done() | :tag('br'):done() | ||
:wikitext(' | :wikitext('Pranešimas buvo paskelbtas ' .. date_link .. '.') | ||
:done() | :done() | ||
| 409 eilutė: | 409 eilutė: | ||
function p.datedpl(frame) | function p.datedpl(frame) | ||
local a = frame:getParent().args | local a = frame:getParent().args | ||
if not a or not a['%TITLE%'] then | |||
return 'Error: Missing required argument `%TITLE%`.' | |||
end | |||
local page = a['%TITLE%'] | |||
local year | local year | ||
local cat | local cat | ||
if hc(a.year) then | if hc(a.year) then | ||
year = a.year | year = a.year | ||
| 418 eilutė: | 423 eilutė: | ||
end | end | ||
-- Get current day and month from system | |||
local current_day = tonumber(lang:formatDate('j')) -- 12 | |||
local current_month = lang:formatDate('F') -- April | |||
-- Get day and month from the provided date | |||
local entry_day = tonumber(lang:formatDate('j', a.date)) | |||
local entry_month = lang:formatDate('F', a.date) | |||
-- Check if day and month match | |||
if not (current_day == entry_day and current_month == entry_month) then | |||
return '' -- Don't display this entry | |||
end | |||
-- Set category type | |||
if hc(a.category) then | if hc(a.category) then | ||
local category_key = cat_switch[string.gsub(string.lower(a.category), ' ?updates?', '')] | |||
if category_key then | |||
cat = category_info[category_key][2] | |||
else | |||
cat = 'Patch Notes' | |||
end | |||
else | else | ||
cat = 'Patch Notes' | |||
end | end | ||
return string.format("'''%s''' – %s: [[ | return string.format("'''%s''' – %s: [[%s|%s]]", year, cat, page, page) | ||
end | end | ||