Template:UND/doc
This is a documentation subpage for
Template documentation[edit source]Template:Terminate sentence ensures a sentence ends with a specified terminator (default: a period). It avoids adding duplicate terminators and can optionally trim trailing spaces. It attempts to ignore trailing closing quotes or brackets when deciding whether a terminator is already present. Usage[edit source]Basic: {{Terminate sentence|This is a sentence}}
→ This is a sentence.
Named parameters: {{Terminate sentence
|text=He said "Hello"
|term=.
}}
→ He said "Hello".
Custom terminator: {{Terminate sentence|text=Warning|term=!}}
→ Warning!
Avoid duplicate terminator: {{Terminate sentence|text=Already done.|term=.}}
→ Already done.
Trim trailing spaces: {{Terminate sentence|text=Ends with space |trim=yes}}
→ Ends with space.
Skip processing: {{Terminate sentence|text=No changes here|skip=yes}}
→ No changes here
Append a note: {{Terminate sentence|text=Complete|note=(source: 2025)}}
→ Complete. (source: 2025)
Parameters[edit source]
Behavior details[edit source]
Examples[edit source]
{{Terminate sentence|text=He whispered "hush"|term=.}}
→ He whispered "hush".
{{Terminate sentence|text=Complete (verified)|term=.}}
→ Complete (verified).
{{Terminate sentence|text=Alert|term=!}}
→ Alert!
{{Terminate sentence|text=Wait...|term=.|allowdup=yes}}
→ Wait.... Best practices[edit source]
Lua-powered variant (optional)[edit source]For more robust detection (including multilingual quotes and punctuation), create -- Module:TerminateUtil
local M = {}
local closing = {
[")"] = true, ["]"] = true, ["}"] = true,
['"'] = true, ["'"] = true, ["”"] = true, ["’"] = true, ["»"] = true, ["›"] = true
}
local function trimRight(s)
return (s:gsub("%s+$",""))
end
function M.lastVisibleChar(args)
local s = args.s or ""
s = trimRight(s)
local i = #s
while i > 0 do
local c = s:sub(i,i)
if closing[c] then
i = i - 1
else
return c
end
end
return ""
end
return M
Then update the template to call: {{#invoke:TerminateUtil|lastVisibleChar|s=text}}
This improves detection for closing quotes and brackets. See also[edit source]It may contain usage information, categories and other content that is not part of the original template page. |
Template:UND provides standard responses for requests for undeletion at Wikipedia:Requests for undeletion. You should not feel limited by these responses and should ensure that your response adequately addresses the user's request and provides them useful information about how to proceed.
| Result | Code | Normalized code |
|---|---|---|
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs or Template:Tlxs or Template:Tlxs | Template:Tlxs | |
| Template:Tlxs or Template:Tlxs or Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
pagename with the name of the page you wish to have restored and reasoning with the reason for your request). | Template:Tlxs | Template:Tlxs |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| Template:Tlxs | Template:Tlxs | |
| To add a note concerning DRV to any message:
If you believe that this decision was made in error, or that significant new information has come to light since the deletion, please contact the administrator who closed the discussion, user Template:User1. If you have already done so, your concerns can be taken to deletion review. |
Template:Tlxs | Template:Tlxs |