This module implements {{Значення міцності}}
and {{Значення вибухостійкості}}
.
Dependencies[]
local ukrainian = mw.language.new('uk')
local p = {}
function p.value( f )
local args = f
if f == mw.getCurrentFrame() then
args = require( 'Модуль:ProcessArgs' ).merge( true )
end
local block = ukrainian:lc(mw.text.trim( args[1] or '' ))
local argType = args['тип']
local values = mw.loadData( 'Модуль:Значення ' .. argType )
local value = values[block]
local category = ''
if not value then
value = values[block:gsub( 's$', '' )]
if not value then
value = '[[Шаблон:Значення ' .. argType .. '#Відсутнє значення|?]]'
local title = mw.title.getCurrentTitle()
if not args.nocat and title.namespace == 0 and not title.isSubpage then
category = '[[Категорія:Відсутні значення ' .. ukrainian:lc(argType) .. ']]'
end
end
end
return value .. category
end
return p