今天是2024年7月1日 第27周 星期一

代人,时大变了。

我们生活在大地上,但我们的梦想超越天空。

更改

跳到导航 跳到搜索
添加133字节 、 2014年1月23日 (四) 03:12
无编辑摘要
第342行: 第342行:  
self.categoryParamNums = union(self.categoryParamNums, self.allNums)
 
self.categoryParamNums = union(self.categoryParamNums, self.allNums)
 
-- The following is roughly equivalent to the old {{Ambox/category}}.
 
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
+
local date
 +
if args.date and args.date ~= '' then
 +
date = args.date
 +
elseif args.time and args.time ~= '' then
 +
date = lang:formatDate('Y年n月', time)
 +
end
 
date = type(date) == 'string' and date
 
date = type(date) == 'string' and date
local preposition = 'from'
+
local preposition = ' '
 
for _, num in ipairs(self.categoryParamNums) do
 
for _, num in ipairs(self.categoryParamNums) do
 
local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)]
 
local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)]
第351行: 第356行:  
allCat = type(allCat) == 'string' and allCat
 
allCat = type(allCat) == 'string' and allCat
 
if mainCat and date and date ~= '' then
 
if mainCat and date and date ~= '' then
local catTitle = format('%s %s %s', mainCat, preposition, date)
+
local catTitle = format('%s%s%s', preposition, date, mainCat)
 
self:addCat('main', catTitle)
 
self:addCat('main', catTitle)
 
catTitle = getTitleObject('Category:' .. catTitle)
 
catTitle = getTitleObject('Category:' .. catTitle)
 
if not catTitle or not catTitle.exists then
 
if not catTitle or not catTitle.exists then
self:addCat('main', 'Articles with invalid date parameter in template')
+
self:addCat('main', ' 模板中使用无效日期参数的条目')
 
end
 
end
 
elseif mainCat and (not date or date == '') then
 
elseif mainCat and (not date or date == '') then

导航菜单