Изменения

начало реализации второй части ВП:ФТ#Общий модуль для шаблонов Не переведено
Строка 147: Строка 147:  
local ucfirst_title = mw.getContentLanguage():ucfirst(title)
 
local ucfirst_title = mw.getContentLanguage():ucfirst(title)
 
if lang == 'd' then
 
if lang == 'd' then
if mode == 1 or mode == 2 then
+
iw_tooltip = string.format('Элемент статьи «%s» в Викиданных', ucfirst_title)
iw_tooltip = string.format('Элемент статьи «%s» в Викиданных', ucfirst_title)
+
iw_title = iw_title .. '#sitelinks-wikipedia' -- осторожно, может сломать что-то
elseif mode == 5 then
  −
iw_tooltip = string.format('Страница статьи «%s» в Викиданных', ucfirst_title)
  −
iw_title = iw_title .. '#sitelinks-wikipedia' -- осторожно, может сломать что-то
  −
end
   
else
 
else
if mode == 1 or mode == 2 then
+
local pref
iw_tooltip = string.format('Версия статьи «%s» на %s', ucfirst_title, prepositional(lang))
+
if is_empty(orig_iw_title) then
elseif mode == 4 then
+
pref = 'Версия статьи'
iw_tooltip = string.format('Эквивалент статьи «%s» на %s', ucfirst_title, prepositional(lang))
+
else
elseif mode == 5 then
+
pref = string.format('%s — версия статьи', iw_title)
local pref
  −
if is_empty(orig_iw_title) then
  −
pref = 'Версия статьи'
  −
else
  −
pref = string.format('%s — версия статьи', iw_title)
  −
end
  −
iw_tooltip = string.format('%s «%s» на %s', pref, ucfirst_title, prepositional(lang))
   
end
 
end
 +
iw_tooltip = string.format('%s «%s» на %s', pref, ucfirst_title, prepositional(lang))
 
end
 
end
  
Анонимный участник