2,981
עריכות
(יחידת תצוגת מקרא למהדורות כתיב, ניקוד וטעמים) |
(תמיכה בכינויי שמות הקודש לפי נתוני הפרק ובקישור לפרק הקודם) |
||
| שורה 5: | שורה 5: | ||
end | end | ||
local function displayText(text, edition, fullName, largeInitial) | local function displayText(text, edition, fullName, largeInitial, nameAliases) | ||
if not fullName then | if not fullName then | ||
for name, alias in pairs(nameAliases or {}) do | |||
text = text:gsub(name, alias) | |||
end | |||
if edition == 'כתיב' then | if edition == 'כתיב' then | ||
text = text:gsub('אלהים', 'אלוקים') | text = text:gsub('אלהים', 'אלוקים') | ||
| שורה 29: | שורה 32: | ||
if record.number == verseNumber then | if record.number == verseNumber then | ||
local text = assert(record[edition], 'מהדורת מקרא לא מוכרת') | local text = assert(record[edition], 'מהדורת מקרא לא מוכרת') | ||
return displayText(text, edition, frame.args[4] == 'מקור', record.largeInitial) | return displayText(text, edition, frame.args[4] == 'מקור', record.largeInitial, data.nameAliases) | ||
end | end | ||
end | end | ||
| שורה 47: | שורה 50: | ||
local edition = view == 'שורות' and 'ניקוד' or view | local edition = view == 'שורות' and 'ניקוד' or view | ||
local style = [[font-family: SBL Hebrew, Ezra SIL, Noto Serif Hebrew, serif; font-size:1.35em; line-height:1.8]] | local style = [[font-family: SBL Hebrew, Ezra SIL, Noto Serif Hebrew, serif; font-size:1.35em; line-height:1.8]] | ||
local previous = data.previousChapter and '[[' .. data.previousChapter .. '|הפרק הקודם]] • ' or '' | |||
local lines = { | local lines = { | ||
'[[' .. data.book .. '|ספר ' .. data.book .. ']] • פרק ' .. data.number .. ' • [[' .. data.nextChapter .. '|הפרק הבא]]', | previous .. '[[' .. data.book .. '|ספר ' .. data.book .. ']] • פרק ' .. data.number .. ' • [[' .. data.nextChapter .. '|הפרק הבא]]', | ||
'', | '', | ||
} | } | ||
| שורה 65: | שורה 69: | ||
local number = record.number | local number = record.number | ||
local text = assert(record[edition], 'מהדורת מקרא לא מוכרת') | local text = assert(record[edition], 'מהדורת מקרא לא מוכרת') | ||
local alias = displayText(text, edition, false, record.largeInitial) | local alias = displayText(text, edition, false, record.largeInitial, data.nameAliases) | ||
local source = displayText(text, edition, true, record.largeInitial) | local source = displayText(text, edition, true, record.largeInitial, data.nameAliases) | ||
local label = data.number .. '_' .. number | local label = data.number .. '_' .. number | ||
local target = '[[:קטגוריה:' .. data.chapter .. ' ' .. number .. '|' .. number .. ']]' | local target = '[[:קטגוריה:' .. data.chapter .. ' ' .. number .. '|' .. number .. ']]' | ||