"मोड्युल:Article history/config" का संशोधनहरू बिचको अन्तर
Content deleted Content added
fix notice function comments |
document the notice bar icon config and improve the status category table comment |
||
पङ्क्ति २०९:
-------------------------------------------------------------------------------
-- The statuses table
-- of the article.
-- Each --
-- id: the main ID for the status. This should be the same as the configuration
Line २२७ ⟶ २२८:
-- $1 - The full page name of the article or subject page
-- $2 - The page name without the namespace name
-- categories:
-- category names, or a function. If it is a function, it takes an article
-- history object as the first parameter, and the current status object as
-- the second parameter, and should return an array of category objects.
-- noticeBarIcon: the icon to use for the notice bar. This can be a string, or
-- a function, or true. If it is a function it takes an article history
-- object as the first parameter, and should output the icon filename. If it
-- is true, it uses the value of icon. If it is nil then no notice bar icon
-- will be displayed.
-- noticeBarIconCaption: the caption to use for the notice bar icon. The status
-- name is used by default. This can be a string or a function. If it is a
-- function, it takes an article history object as its first parameter, and
-- should return the caption text. If this is absent, the icon caption is
-- used instead.
-- noticeBarIconSize: the size of the notice bar icon, including "px" suffix.
-- The default is set by defaultNoticeBarIconSize.
statuses = {
Line ६४६ ⟶ ६६२:
-- category names, or a function. If it is a function, it takes an article
-- history object as the first parameter, and the current notice object as
-- the second parameter, and should return an array of
-- noticeBarIcon: the icon to use for the notice bar. This can be a string, or
-- a function, or true. If it is a function it takes an article history
-- object as the first parameter, and should output the icon filename. If it
-- is true, it uses the value of icon. If it is nil then no notice bar icon
-- will be displayed.
-- noticeBarIconCaption: the caption to use for the notice bar icon. This can be
-- a string or a function. If it is a function, it takes an article history
-- object as its first parameter, and should return the caption text. If this
-- is absent, the icon caption is used instead.
-- noticeBarIconSize: the size of the notice bar icon, including "px" suffix.
-- The default is set by defaultNoticeBarIconSize.
notices = {
Line १,०१७ ⟶ १,०४४:
-- category names, or a function. If it is a function, it takes an article
-- history object as the first parameter and the current action object as the
-- second parameter, and should return an array of
-- noticeBarIcon: the icon to use for the notice bar. This can be a string, or
-- a function, or true. If it is a function it takes an article history
-- object as the first parameter, and should output the icon filename. If it
-- is true, it uses the value of icon. If it is nil then no notice bar icon
-- will be displayed.
-- noticeBarIconCaption: the caption to use for the notice bar icon. This can be
-- a string or a function. If it is a function, it takes an article history
-- object as its first parameter, and should return the caption text. If this
-- is absent, the icon caption is used instead.
-- noticeBarIconSize: the size of the notice bar icon, including "px" suffix.
-- The default is set by defaultNoticeBarIconSize.
actions = {
Line १,७३४ ⟶ १,७७२:
-- category names, or a function. If it is a function, it takes an article
-- history object as the first parameter, and the current collapsible notice
-- object as the second parameter, and should return an array of
-- objects.
-- noticeBarIcon: the icon to use for the notice bar. This can be a string, or
-- a function, or true. If it is a function it takes an article history
-- object as the first parameter, and should output the icon filename. If it
-- is true, it uses the value of icon. If it is nil then no notice bar icon
-- will be displayed.
-- noticeBarIconCaption: the caption to use for the notice bar icon. This can be
-- a string or a function. If it is a function, it takes an article history
-- object as its first parameter, and should return the caption text. If this
-- is absent, the icon caption is used instead.
-- noticeBarIconSize: the size of the notice bar icon, including "px" suffix.
-- The default is set by defaultNoticeBarIconSize.
collapsibleNotices = {
Line १,९४४ ⟶ १,९९३:
-------------------------------------------------------------------------------
-- Notice bar icons
-- This table holds notice bar icons only for icons that don't appear as part▼
-------------------------------------------------------------------------------
▲-- This table holds
-- as part of a row. Other notice bar icons are handled in the statuses,
-- notices, actions, and collapsibleNotices tables.
-- It accepts the following fields:
-- isActive: a function that should return a truthy value if the notice should
-- be displayed, and a falsy value if not. (Falsy values are false and nil,
-- and truthy values are everything else.) The function takes an article
-- history object as its first parameter.
-- icon: the filename of the notice bar icon, minus the "File:" prefix.
noticeBarIcons = {
Line १,९७१ ⟶ २,०२८:
-------------------------------------------------------------------------------
-- Extra categories
-------------------------------------------------------------------------------▼
-- This table contains categories that don't appear as part of a row. It is an
-- array of functions; each function takes an article history object as input
-- and must return an array of category objects as output.
▲-------------------------------------------------------------------------------
extraCategories = {
|