Module:accel/sl
Appearance
- පහත දැක්වෙන උපදෙස්, Module:documentation මගින් ජනනය කොට ඇත. [සංස්කරණය කරන්න]
- ප්රයෝජනවත් සබැඳි: root page • root page’s subpages • සබැඳි • transclusions • testcases • sandbox
This module contains new entry creation rules for Slovene; see WT:ACCEL for an overview, and Module:accel for information on creating new rules.
return {generate = function (params, entry)
if params.form == 'comparative' or params.form == 'superlative' then
entry.pronunc = '{{rfp|sl}}'
entry.head = '{{sl-' .. (params.pos == 'adverb' and 'adv' or 'adj') .. '-'
.. (params.form == 'comparative' and 'comp' or 'sup') .. '|' .. params.target .. '}}'
-- If there is a comma in the head, assume it has multiple accented variants.
-- Add a link with an alternative display form instead.
entry.def =
'{{' .. params.form .. ' of|sl|' ..
(params.pos ~= 'adjective' and '|POS=' .. params.pos or '') ..
(not params.origin:find(',') and '|' .. params.origin_pagename or '') ..
'|' .. params.origin .. '}}'
-- If it's an adjective, add a declension table
if params.pos == 'adjective' then
local stem = params.target:sub(1, -1)
local ending = params.target:sub(-1)
-- Adjective comparatives and superlatives must always end in -i
if ending ~= 'i' then
return error('The Slovene comparative/superlative "' .. params.target .. '" does not end in -i.')
end
entry.declension = '{{sl-decl-adj|' .. stem .. '|def=1}}'
end
else
entry.no_rule_error(params)
end
end}