Mô đun:Đổi hướng-phân biệt

local mHatnote = require('Module:Hatnote')
local mHatlist = require('Module:Hatnote list')
local mArguments --initialize lazily
local mTableTools = require('Module:TableTools')
local p = {}

function p.redirectDistinguish (frame)
	mArguments = require('Module:Arguments')
	local args = mArguments.getArgs(frame)
	return p._redirectDistinguish(args)
end

function p._redirectDistinguish(args)
	if not args[1] then
		return mHatnote.makeWikitextError(
			'không có chuyển hướng được cung cấp',
			'Template:Redirect-distinguish',
			args.category
		)
	end
	local redirectTitle = mw.title.new(args[1])
	if redirectTitle and redirectTitle.exists then
		if not redirectTitle.isRedirect then
			args[1] = args[1] .. '[[Thể loại: Bài viết có chú thích chuyển hướng cần xem xét]]'
		end
	elseif not string.match(args[1], 'REDIRECT%d+') and not args[1] == 'TERM' then
		args[1] = args[1] .. '[[Thể loại:Thiếu chuyển hướng]]'
	end
	if not args[2] then
		return mHatnote.makeWikitextError(
			'không có trang nào được phân biệt',
			'Template:Redirect-distinguish',
			args.category
		)
	end
	args = mTableTools.compressSparseArray(args)
	--Assignment by removal here makes for convenient concatenation later
	local redirect = table.remove(args, 1)
	local text = string.format(
		'"%s" chuyển hướng đến đây. Đừng nhầm lẫn với %s.',
		redirect,
		mHatlist.orList(args, true)
	)
	return mHatnote._hatnote(text)
end

return p
Chúng tôi bán
Bài viết liên quan
Giới thiệu Oshi no ko - Bị kẻ lạ mặt đâm chớt, tôi tái sinh thành con trai idol
Giới thiệu Oshi no ko - Bị kẻ lạ mặt đâm chớt, tôi tái sinh thành con trai idol
Ai sinh đôi một trai một gái xinh đẹp rạng ngời, đặt tên con là Hoshino Aquamarine (hay gọi tắt là Aqua cho gọn) và Hoshino Ruby. Goro, may mắn thay (hoặc không may mắn lắm), lại được tái sinh trong hình hài bé trai Aqua
Cung thuật Tengu - Genshin Impact
Cung thuật Tengu - Genshin Impact
Kujou Sara sử dụng Cung thuật Tengu, một kĩ năng xạ thuật chết chóc nổi tiếng của Tengu.
Nguồn gốc các loại Titan - Attack On Titan
Nguồn gốc các loại Titan - Attack On Titan
Tất cả Titan đều xuất phát từ những người Eldia, mang dòng máu của Ymir
Nhân vật Ichika Amasawa - Youkoso Jitsuryoku Shijou Shugi no Kyoushitsu e
Nhân vật Ichika Amasawa - Youkoso Jitsuryoku Shijou Shugi no Kyoushitsu e
Ichika Amasawa (天あま沢さわ 一いち夏か, Amasawa Ichika) là một trong những học sinh năm nhất của Trường Cao Trung Nâng cao.