Module:si-utilities
- පහත දැක්වෙන උපදෙස්, Module:si-utilities/documentation හි පිහිටා ඇත. Module:si-utilities/documentation]]. [සංස්කරණය] Categories were auto-generated by Module:module categorization. [edit]
- ප්රයෝජනවත් සබැඳි: උප පිටු ලැයිස්තුව • සබැඳි • transclusions • testcases • sandbox
වැඩි විස්තර සඳහා පහත මොඩියුල වෙත යොමු වන්න.
local m_sinhala = require("Module:sinhala")
local export = {}
--[==[
Pluralize a word in a smart fashion, according to normal English rules.
# If the word ends in a consonant or "qu" + "-y", replace "-y" with "-ies".
# If the word ends in "s", "x", "z", "ch", "sh" or "zh", add "-es".
# Otherwise, add "-s".
This handles links correctly:
# If a piped link, change the second part appropriately.
# If a non-piped link and rule #1 above applies, convert to a piped link with the second part containing the plural.
# If a non-piped link and rules #2 or #3 above apply, add the plural outside the link.
]==]
function export.pluralize(str)
return m_sinhala.plural(str)
end
return export