跳至內容

「Module:DesignerSong」:修訂間差異

增加 223 位元組 、​ 2024年7月26日 (星期五)
ja
(getOrder())
(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.. designer..titelStr.."\n"
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
941

次編輯