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 |
||
| Nisu prikazane 24 međuinačice | |||
| Redak 1: | Redak 1: | ||
require('strict') | |||
local cfg = {} | |||
-------------------------------------------------------------------------------- | |||
-- OBAVEZNI PARAMETRI PO KLASI | |||
-------------------------------------------------------------------------------- | |||
cfg.required_params = { | |||
book = {"title"}, | |||
web = {"title", "url"}, | |||
journal = {"title", "journal"}, | |||
newspaper = {"title", "newspaper"}, | |||
encyclopedia = {"title", "encyclopedia"}, | |||
law = {"title"}, | |||
archive = {"title", "archive"}, | |||
interview = {"title"} | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- 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', | |||
} | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- HR FORMAT DATUMA | |||
-------------------------------------------------------------------------------- | |||
cfg.format_date_hr = function(day, month, year) | |||
if not day or not month or not year then | |||
return nil | |||
end | |||
return string.format("%s. %s %s.", day, cfg.date_names[month] or month, year) | |||
end | end | ||
-------------------------------------------------------------------------------- | |||
-- PUNCTUATION RULES | |||
-------------------------------------------------------------------------------- | |||
cfg.punct_skip = { | |||
['author#'] = true, | |||
['editor#'] = true, | |||
['translator#'] = true, | |||
['others'] = true, | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- ID HANDLERS (ISPRAVNO, MALA SLOVA) | |||
-------------------------------------------------------------------------------- | |||
cfg.id_handlers = { | |||
isbn = { | |||
parameters = {"isbn"}, | |||
link = "ISBN", | |||
label = "ISBN", | |||
mode = "simple" | |||
}, | |||
doi = { | |||
parameters = {"doi"}, | |||
link = "DOI", | |||
label = "DOI", | |||
mode = "simple" | |||
}, | |||
oclc = { | |||
parameters = {"oclc"}, | |||
link = "OCLC", | |||
label = "OCLC", | |||
mode = "simple" | |||
}, | |||
pmid = { | |||
parameters = {"pmid"}, | |||
link = "PMID", | |||
label = "PMID", | |||
mode = "simple" | |||
} | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- 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', | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- VALID PARAMETERS (GLOBAL) | |||
-------------------------------------------------------------------------------- | |||
cfg.valid_params = { | |||
author = true, author1 = true, author2 = true, author3 = true, | |||
first1 = true, last1 = true, | |||
first2 = true, last2 = true, | |||
first3 = true, last3 = true, | |||
first4 = true, last4 = true, | |||
first5 = true, last5 = 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, | |||
} | |||
-------------------------------------------------------------------------------- | |||
-- PARAMETRI PO KLASI (USKLAĐENO) | |||
-------------------------------------------------------------------------------- | |||
cfg.class_params = { | |||
web = { | |||
'title', 'url', 'work', 'website', 'publisher', 'date', 'year', | |||
-- autori | |||
'author', 'author1', 'author2', 'author3', | |||
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5', | |||
-- arhiviranje | |||
'archive-url', | |||
'archive-date', | |||
'url-status', | |||
-- | -- ostalo | ||
'access-date', 'language', 'quote', 'type', | |||
-- hrvatski aliasi | |||
'naslov', 'autor', 'autor1', 'autor2', 'autor3', | |||
'mjesto', 'place', 'godina', 'stranica', 'stranice' | |||
}, | |||
book = { | |||
'title', 'subtitle', | |||
'author', 'author1', 'author2', 'author3', | |||
'editor', 'editor1', | |||
'translator', 'translator1', | |||
'publisher', 'location', 'place', | |||
'year', 'date', | |||
'edition', 'volume', 'series', | |||
'pages', 'page', | |||
'isbn', 'doi', 'oclc', 'pmid', | |||
'language', 'quote', 'type', | |||
'naslov', 'autor', 'autor1', 'autor2', 'autor3', | |||
'izdavač', 'izdavac', 'mjesto', 'godina', | |||
'stranica', 'stranice', 'urednik', 'izdanje', | |||
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5', | |||
'url' | |||
}, | |||
journal = { | |||
'title', 'author', 'author1', 'author2', 'author3', | |||
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5', | |||
'journal', 'volume', 'issue', 'pages', | |||
'year', 'doi', 'language', 'quote', | |||
'naslov', 'autor', 'autor1', 'autor2', 'autor3', | |||
'godina', 'stranica', 'stranice' | |||
}, | |||
newspaper = { | |||
'author', 'author1', 'author2', 'author3', | |||
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5', | |||
'title', 'newspaper', 'website', | |||
'publisher', 'location', 'date', 'year', | |||
'pages', 'url', 'access-date', | |||
'language', 'format' | |||
}, | |||
encyclopedia = { | |||
'author', 'author1', 'author2', 'author3', | |||
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5', | |||
'title', 'encyclopedia', | |||
'publisher', 'location', 'year', 'date', | |||
'volume', 'edition', 'pages', | |||
'url', 'access-date', | |||
'language', 'format' | |||
}, | |||
- | law = { | ||
'title', 'law', 'jurisdiction', | |||
'publisher', 'date', 'year', | |||
'section', 'article', 'chapter', | |||
'url', 'access-date', | |||
'language', 'format' | |||
}, | |||
archive = { | |||
'author', 'author1', 'author2', 'author3', | |||
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5', | |||
'title', 'archive', 'collection', | |||
'location', 'date', 'year', | |||
'identifier', 'pages', | |||
'url', 'access-date', | |||
'language', 'format' | |||
}, | |||
interview = { | |||
'interviewer', | |||
'author', 'author1', 'author2', 'author3', | |||
'title', 'program', 'publisher', | |||
'location', 'date', 'year', | |||
'url', 'access-date', | |||
'language', 'format' | |||
} | |||
language | |||
} | } | ||
-------------------------------------------------------------------------------- | |||
-- RETURN | |||
-------------------------------------------------------------------------------- | |||
return cfg | |||
Posljednja izmjena od 22. siječanj 2026. u 12:07
Script error: The function "nonexistent" does not exist.
require('strict')
local cfg = {}
--------------------------------------------------------------------------------
-- OBAVEZNI PARAMETRI PO KLASI
--------------------------------------------------------------------------------
cfg.required_params = {
book = {"title"},
web = {"title", "url"},
journal = {"title", "journal"},
newspaper = {"title", "newspaper"},
encyclopedia = {"title", "encyclopedia"},
law = {"title"},
archive = {"title", "archive"},
interview = {"title"}
}
--------------------------------------------------------------------------------
-- 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',
}
}
--------------------------------------------------------------------------------
-- HR FORMAT DATUMA
--------------------------------------------------------------------------------
cfg.format_date_hr = function(day, month, year)
if not day or not month or not year then
return nil
end
return string.format("%s. %s %s.", day, cfg.date_names[month] or month, year)
end
--------------------------------------------------------------------------------
-- PUNCTUATION RULES
--------------------------------------------------------------------------------
cfg.punct_skip = {
['author#'] = true,
['editor#'] = true,
['translator#'] = true,
['others'] = true,
}
--------------------------------------------------------------------------------
-- ID HANDLERS (ISPRAVNO, MALA SLOVA)
--------------------------------------------------------------------------------
cfg.id_handlers = {
isbn = {
parameters = {"isbn"},
link = "ISBN",
label = "ISBN",
mode = "simple"
},
doi = {
parameters = {"doi"},
link = "DOI",
label = "DOI",
mode = "simple"
},
oclc = {
parameters = {"oclc"},
link = "OCLC",
label = "OCLC",
mode = "simple"
},
pmid = {
parameters = {"pmid"},
link = "PMID",
label = "PMID",
mode = "simple"
}
}
--------------------------------------------------------------------------------
-- 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',
}
--------------------------------------------------------------------------------
-- VALID PARAMETERS (GLOBAL)
--------------------------------------------------------------------------------
cfg.valid_params = {
author = true, author1 = true, author2 = true, author3 = true,
first1 = true, last1 = true,
first2 = true, last2 = true,
first3 = true, last3 = true,
first4 = true, last4 = true,
first5 = true, last5 = 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,
}
--------------------------------------------------------------------------------
-- PARAMETRI PO KLASI (USKLAĐENO)
--------------------------------------------------------------------------------
cfg.class_params = {
web = {
'title', 'url', 'work', 'website', 'publisher', 'date', 'year',
-- autori
'author', 'author1', 'author2', 'author3',
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5',
-- arhiviranje
'archive-url',
'archive-date',
'url-status',
-- ostalo
'access-date', 'language', 'quote', 'type',
-- hrvatski aliasi
'naslov', 'autor', 'autor1', 'autor2', 'autor3',
'mjesto', 'place', 'godina', 'stranica', 'stranice'
},
book = {
'title', 'subtitle',
'author', 'author1', 'author2', 'author3',
'editor', 'editor1',
'translator', 'translator1',
'publisher', 'location', 'place',
'year', 'date',
'edition', 'volume', 'series',
'pages', 'page',
'isbn', 'doi', 'oclc', 'pmid',
'language', 'quote', 'type',
'naslov', 'autor', 'autor1', 'autor2', 'autor3',
'izdavač', 'izdavac', 'mjesto', 'godina',
'stranica', 'stranice', 'urednik', 'izdanje',
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5',
'url'
},
journal = {
'title', 'author', 'author1', 'author2', 'author3',
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5',
'journal', 'volume', 'issue', 'pages',
'year', 'doi', 'language', 'quote',
'naslov', 'autor', 'autor1', 'autor2', 'autor3',
'godina', 'stranica', 'stranice'
},
newspaper = {
'author', 'author1', 'author2', 'author3',
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5',
'title', 'newspaper', 'website',
'publisher', 'location', 'date', 'year',
'pages', 'url', 'access-date',
'language', 'format'
},
encyclopedia = {
'author', 'author1', 'author2', 'author3',
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5',
'title', 'encyclopedia',
'publisher', 'location', 'year', 'date',
'volume', 'edition', 'pages',
'url', 'access-date',
'language', 'format'
},
law = {
'title', 'law', 'jurisdiction',
'publisher', 'date', 'year',
'section', 'article', 'chapter',
'url', 'access-date',
'language', 'format'
},
archive = {
'author', 'author1', 'author2', 'author3',
'first', 'last', 'first2', 'last2', 'first3', 'last3', 'first4', 'last4', 'first5', 'last5',
'title', 'archive', 'collection',
'location', 'date', 'year',
'identifier', 'pages',
'url', 'access-date',
'language', 'format'
},
interview = {
'interviewer',
'author', 'author1', 'author2', 'author3',
'title', 'program', 'publisher',
'location', 'date', 'year',
'url', 'access-date',
'language', 'format'
}
}
--------------------------------------------------------------------------------
-- RETURN
--------------------------------------------------------------------------------
return cfg