Modul:Citation/CS1/Configuration: razlika između inačica
Prijeđi na navigaciju
Prijeđi na pretraživanje
Stvorena nova stranica sa sadržajem: » --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ List of namespaces that should not be included in citation error categories. Same as setting notracking = true by default. Note: Namespace names should use underscores instead of spaces. ]] local uncategorized_namespaces = { 'Talk', 'User_talk', 'Wikipedia_talk', --maknuti user i suradnik 'Razgovor', 'Razgovor_sa_suradnikom', 'Razgo...«. |
mNema sažetka uređivanja |
||
| Nije prikazano 9 međuinačica | |||
| Redak 1: | Redak 1: | ||
require('strict') | |||
local cfg = {} | |||
-------------------------------------------------------------------------------- | |||
-- DATE NAMES (HRVATSKI) | |||
-------------------------------------------------------------------------------- | |||
]] | cfg.date_names = { | ||
['january'] = 'siječanj', | |||
['february'] = 'veljača', | |||
['march'] = 'ožujak', | |||
['april'] = 'travanj', | |||
['may'] = 'svibanj', | |||
['june'] = 'lipanj', | |||
['july'] = 'srpanj', | |||
['august'] = 'kolovoz', | |||
['september'] = 'rujan', | |||
['october'] = 'listopad', | |||
['november'] = 'studeni', | |||
['december'] = 'prosinac', | |||
['jan'] = 'sij', | |||
['feb'] = 'velj', | |||
['mar'] = 'ožu', | |||
['apr'] = 'tra', | |||
['may'] = 'svi', | |||
['jun'] = 'lip', | |||
['jul'] = 'srp', | |||
['aug'] = 'kol', | |||
['sep'] = 'ruj', | |||
['oct'] = 'lis', | |||
['nov'] = 'stu', | |||
['dec'] = 'pro', | |||
['jan.'] = 'sij', | |||
['feb.'] = 'velj', | |||
['mar.'] = 'ožu', | |||
['apr.'] = 'tra', | |||
['may.'] = 'svi', | |||
['jun.'] = 'lip', | |||
['jul.'] = 'srp', | |||
['aug.'] = 'kol', | |||
['sep.'] = 'ruj', | |||
['oct.'] = 'lis', | |||
['nov.'] = 'stu', | |||
['dec.'] = 'pro', | |||
['sept'] = 'ruj', | |||
['sept.'] = 'ruj', | |||
local_digits = { | |||
['٠'] = '0', ['١'] = '1', ['٢'] = '2', ['٣'] = '3', ['٤'] = '4', | |||
['٥'] = '5', ['٦'] = '6', ['٧'] = '7', ['٨'] = '8', ['٩'] = '9', | |||
['۰'] = '0', ['۱'] = '1', ['۲'] = '2', ['۳'] = '3', ['۴'] = '4', | |||
['۵'] = '5', ['۶'] = '6', ['۷'] = '7', ['۸'] = '8', ['۹'] = '9', | |||
['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4', | |||
['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9', | |||
} | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- PUNCTUATION RULES | |||
-------------------------------------------------------------------------------- | |||
cfg.punct_skip = { | |||
['author#'] = true, | |||
['editor#'] = true, | |||
['translator#'] = true, | |||
['others'] = true, | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- ERROR CONDITIONS | |||
-------------------------------------------------------------------------------- | |||
cfg.error_conditions = { | |||
['err_missing_title'] = true, | |||
['err_missing_author'] = true, | |||
['err_param_unknown'] = true, | |||
['err_param_unknown_empty'] = true, | |||
['err_text_ignored'] = true, | |||
['err_parameter_ignored'] = true, | |||
['err_parameter_ignored_suggest'] = true, | |||
['err_extra_text'] = true, | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- PARAMETER ALIASES | |||
-------------------------------------------------------------------------------- | |||
cfg.param_aliases = { | |||
['url'] = 'url', | |||
['title'] = 'title', | |||
['work'] = 'work', | |||
['publisher'] = 'publisher', | |||
['date'] = 'date', | |||
['year'] = 'year', | |||
['access-date'] = 'access-date', | |||
['archive-url'] = 'archive-url', | |||
['archive-date'] = 'archive-date', | |||
['language'] = 'language', | |||
['quote'] = 'quote', | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- ID HANDLERS (ISBN, DOI, PMID…) | |||
-------------------------------------------------------------------------------- | |||
cfg.id_handlers = { | |||
ISBN = { | |||
link = 'https://www.worldcat.org/isbn/$1', | |||
pattern = '^(%d[%d%-]+%d)$', | |||
}, | |||
DOI = { | |||
link = 'https://doi.org/$1', | |||
pattern = '^10%..+/.+$', | |||
}, | |||
PMID = { | |||
link = 'https://pubmed.ncbi.nlm.nih.gov/$1', | |||
pattern = '^(%d+)$', | |||
}, | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- WHITELIST (VALID PARAMETERS) | |||
-------------------------------------------------------------------------------- | |||
cfg.whitelist = { | |||
['title'] = true, | |||
['url'] = true, | |||
['work'] = true, | |||
['publisher'] = true, | |||
['date'] = true, | |||
['year'] = true, | |||
['access-date'] = true, | |||
['archive-url'] = true, | |||
['archive-date'] = true, | |||
['language'] = true, | |||
['quote'] = true, | |||
['author'] = true, | |||
['author1'] = true, | |||
['author2'] = true, | |||
['editor'] = true, | |||
['editor1'] = true, | |||
['editor2'] = true, | |||
['isbn'] = true, | |||
['doi'] = true, | |||
['pmid'] = true, | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- VALID PARAMETERS | |||
-------------------------------------------------------------------------------- | |||
-- | |||
cfg.valid_params = { | |||
-- zajednički | |||
author = true, author1 = true, author2 = true, author3 = true, | |||
editor = true, editor1 = true, | |||
title = true, | |||
url = true, | |||
work = true, website = true, journal = true, | |||
publisher = true, | |||
date = true, year = true, | |||
['access-date'] = true, accessdate = true, | |||
language = true, lang = true, | |||
quote = true, | |||
volume = true, | |||
issue = true, number = true, | |||
pages = true, page = true, | |||
location = true, place = true, | |||
edition = true, | |||
isbn = true, | |||
doi = true, | |||
pmid = true, | |||
['CitationClass'] = true, | |||
type = true, | |||
} | |||
cfg.required_params = { | |||
web = { 'title', 'url' }, | |||
book = { 'title' }, | |||
journal = { 'title', 'journal' }, | |||
} | } | ||
cfg.class_params = { | |||
web = { | |||
'title', 'url', 'work', 'publisher', 'date', 'year', | |||
'author', 'author1', 'author2', 'access-date', 'language', 'quote' | |||
}, | |||
book = { | |||
'title', 'author', 'publisher', 'location', 'edition', 'year', | |||
'isbn', 'language', 'quote' | |||
}, | |||
journal = { | |||
'title', 'author', 'journal', 'volume', 'issue', 'pages', | |||
'year', 'doi', 'language', 'quote' | |||
} | |||
} | } | ||
-------------------------------------------------------------------------------- | |||
-- RETURN | |||
-------------------------------------------------------------------------------- | |||
return cfg | |||
Posljednja izmjena od 10. siječanj 2026. u 14:29
Script error: The function "nonexistent" does not exist.
require('strict')
local cfg = {}
--------------------------------------------------------------------------------
-- DATE NAMES (HRVATSKI)
--------------------------------------------------------------------------------
cfg.date_names = {
['january'] = 'siječanj',
['february'] = 'veljača',
['march'] = 'ožujak',
['april'] = 'travanj',
['may'] = 'svibanj',
['june'] = 'lipanj',
['july'] = 'srpanj',
['august'] = 'kolovoz',
['september'] = 'rujan',
['october'] = 'listopad',
['november'] = 'studeni',
['december'] = 'prosinac',
['jan'] = 'sij',
['feb'] = 'velj',
['mar'] = 'ožu',
['apr'] = 'tra',
['may'] = 'svi',
['jun'] = 'lip',
['jul'] = 'srp',
['aug'] = 'kol',
['sep'] = 'ruj',
['oct'] = 'lis',
['nov'] = 'stu',
['dec'] = 'pro',
['jan.'] = 'sij',
['feb.'] = 'velj',
['mar.'] = 'ožu',
['apr.'] = 'tra',
['may.'] = 'svi',
['jun.'] = 'lip',
['jul.'] = 'srp',
['aug.'] = 'kol',
['sep.'] = 'ruj',
['oct.'] = 'lis',
['nov.'] = 'stu',
['dec.'] = 'pro',
['sept'] = 'ruj',
['sept.'] = 'ruj',
local_digits = {
['٠'] = '0', ['١'] = '1', ['٢'] = '2', ['٣'] = '3', ['٤'] = '4',
['٥'] = '5', ['٦'] = '6', ['٧'] = '7', ['٨'] = '8', ['٩'] = '9',
['۰'] = '0', ['۱'] = '1', ['۲'] = '2', ['۳'] = '3', ['۴'] = '4',
['۵'] = '5', ['۶'] = '6', ['۷'] = '7', ['۸'] = '8', ['۹'] = '9',
['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4',
['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9',
}
}
--------------------------------------------------------------------------------
-- PUNCTUATION RULES
--------------------------------------------------------------------------------
cfg.punct_skip = {
['author#'] = true,
['editor#'] = true,
['translator#'] = true,
['others'] = true,
}
--------------------------------------------------------------------------------
-- ERROR CONDITIONS
--------------------------------------------------------------------------------
cfg.error_conditions = {
['err_missing_title'] = true,
['err_missing_author'] = true,
['err_param_unknown'] = true,
['err_param_unknown_empty'] = true,
['err_text_ignored'] = true,
['err_parameter_ignored'] = true,
['err_parameter_ignored_suggest'] = true,
['err_extra_text'] = true,
}
--------------------------------------------------------------------------------
-- PARAMETER ALIASES
--------------------------------------------------------------------------------
cfg.param_aliases = {
['url'] = 'url',
['title'] = 'title',
['work'] = 'work',
['publisher'] = 'publisher',
['date'] = 'date',
['year'] = 'year',
['access-date'] = 'access-date',
['archive-url'] = 'archive-url',
['archive-date'] = 'archive-date',
['language'] = 'language',
['quote'] = 'quote',
}
--------------------------------------------------------------------------------
-- ID HANDLERS (ISBN, DOI, PMID…)
--------------------------------------------------------------------------------
cfg.id_handlers = {
ISBN = {
link = 'https://www.worldcat.org/isbn/$1',
pattern = '^(%d[%d%-]+%d)$',
},
DOI = {
link = 'https://doi.org/$1',
pattern = '^10%..+/.+$',
},
PMID = {
link = 'https://pubmed.ncbi.nlm.nih.gov/$1',
pattern = '^(%d+)$',
},
}
--------------------------------------------------------------------------------
-- WHITELIST (VALID PARAMETERS)
--------------------------------------------------------------------------------
cfg.whitelist = {
['title'] = true,
['url'] = true,
['work'] = true,
['publisher'] = true,
['date'] = true,
['year'] = true,
['access-date'] = true,
['archive-url'] = true,
['archive-date'] = true,
['language'] = true,
['quote'] = true,
['author'] = true,
['author1'] = true,
['author2'] = true,
['editor'] = true,
['editor1'] = true,
['editor2'] = true,
['isbn'] = true,
['doi'] = true,
['pmid'] = true,
}
--------------------------------------------------------------------------------
-- VALID PARAMETERS
--------------------------------------------------------------------------------
cfg.valid_params = {
-- zajednički
author = true, author1 = true, author2 = true, author3 = true,
editor = true, editor1 = true,
title = true,
url = true,
work = true, website = true, journal = true,
publisher = true,
date = true, year = true,
['access-date'] = true, accessdate = true,
language = true, lang = true,
quote = true,
volume = true,
issue = true, number = true,
pages = true, page = true,
location = true, place = true,
edition = true,
isbn = true,
doi = true,
pmid = true,
['CitationClass'] = true,
type = true,
}
cfg.required_params = {
web = { 'title', 'url' },
book = { 'title' },
journal = { 'title', 'journal' },
}
cfg.class_params = {
web = {
'title', 'url', 'work', 'publisher', 'date', 'year',
'author', 'author1', 'author2', 'access-date', 'language', 'quote'
},
book = {
'title', 'author', 'publisher', 'location', 'edition', 'year',
'isbn', 'language', 'quote'
},
journal = {
'title', 'author', 'journal', 'volume', 'issue', 'pages',
'year', 'doi', 'language', 'quote'
}
}
--------------------------------------------------------------------------------
-- RETURN
--------------------------------------------------------------------------------
return cfg