Изменения
Перейти к навигации
Перейти к поиску
Строка 69:
Строка 69:
− +
− tname = mw.language.new('ru'):lcfirst(mw.title.getCurrentTitle().rootText) +
+
+
+
+
+
+
+
+
+
+
обновление логики для отсутствующего первого параметра из Модуль:Example
end
end
if tname == '' or tname == nil then -- при отсутствующем имени шаблона берём его из названия страницы
if tname == '' or tname == nil then -- при опущенном первом параметре берём имя шаблона из названия страницы
local lang = mw.language.new('ru')
local currentTitle = mw.title.getCurrentTitle().rootText
if (lang:uc(currentTitle) ~= currentTitle and
not mw.ustring.match(currentTitle, '[а-я]:[А-Я]') -- Книга:Литературное наследие
) or
#currentTitle == 1
then
tname = mw.language.new('ru'):lcfirst(currentTitle)
else
tname = currentTitle
end
end
end