انتقل إلى المحتوى

الفرق بين المراجعتين لصفحة: «وحدة:Labelled list hatnote»

لا يوجد ملخص تحرير
لا ملخص تعديل
لا ملخص تعديل
سطر ١: سطر ١:
--------------------------------------------------------------------------------
--                              Labelled list                                --
--                                                                            --
-- This module does the core work of creating a hatnote composed of a list    --
-- prefixed by a colon-terminated label, i.e. "LABEL: [andList of pages]",    --
-- for {{see also}} and similar templates.                                    --
--------------------------------------------------------------------------------
local mHatnote = require('Module:Hatnote')
local mHatnote = require('Module:Hatnote')
local mHatlist = require('Module:Hatnote list')
local mHatlist = require('Module:Hatnote list')
سطر ٨٥: سطر ٧٧:
end
end
end
end
-- ایجاد لیست مقالات با استفاده از ویرگول و "و" قبل از آخرین مورد
local list = table.concat(pages, '، ')
local text = string.format(
local text = string.format(
options.labelForm or defaults.labelForm,
options.labelForm or defaults.labelForm,
label,
label,
mHatlist.andList(pages, ' و ') -- تغییر "and" به "و"
list:gsub("، ([^،]+)$", "، و %1")
)
)
local hnOptions = {
local hnOptions = {
extraclasses = options.extraclasses,
extraclasses = options.extraclasses,