941
个编辑
Economy666(讨论 | 贡献) (getOrder()) |
Economy666(讨论 | 贡献) 小 (ja) |
||
第318行: | 第318行: | ||
end | end | ||
local function cateText(cate, titelStr) | local function cateText(cate, titelStr, formatJa) | ||
local theText = '' | local theText = '' | ||
local sectionCode = {unknown = 100, free = 1, archive = 2, mainstory = 3, sidestory = 4, collab = 5, single = 6} | local sectionCode = {unknown = 100, free = 1, archive = 2, mainstory = 3, sidestory = 4, collab = 5, single = 6} | ||
第349行: | 第349行: | ||
local function writeText(designer, songs) | local function writeText(designer, songs) | ||
local songSort = getSongSort(songs) | local songSort = getSongSort(songs) | ||
theText = theText .."\n"..titelStr.. | local designerTitle = designer | ||
if formatJa and mw.ustring.match(designer,'[一-龠ぁ-ゔァ-ヴー々〆〤ヶ]+') then | |||
designerTitle = '<span lang="ja">' .. designer .. '</span>' | |||
end | |||
theText = theText .."\n"..titelStr.. designerTitle ..titelStr.."\n" | |||
theText = theText .. getDescription(designer) | theText = theText .. getDescription(designer) | ||
theText = theText .. head | theText = theText .. head | ||
第359行: | 第363行: | ||
theText = theText .. '|}' | theText = theText .. '|}' | ||
end | end | ||
if cate then | if cate then | ||
for _,designer in ipairs(cate) do | for _,designer in ipairs(cate) do | ||
第384行: | 第389行: | ||
local uncommonTitle = '未采用常驻谱师名义的曲目名单及所用名义' | local uncommonTitle = '未采用常驻谱师名义的曲目名单及所用名义' | ||
local uncommonText = '\n=='.. uncommonTitle .. '==\n' .. getDescription(uncommonTitle) | local uncommonText = '\n=='.. uncommonTitle .. '==\n' .. getDescription(uncommonTitle) | ||
local headText = cateText(getOrder("uncommon_head"), '===') | local headText = cateText(getOrder("uncommon_head"), '===', true) | ||
local endText = cateText(getOrder("uncommon_end"), '===') | local endText = cateText(getOrder("uncommon_end"), '===') | ||
uncommonText = uncommonText..headText..cateText(nil, '===')..endText | uncommonText = uncommonText..headText..cateText(nil, '===')..endText |
个编辑