الفرق بين المراجعتين لصفحة: «وحدة:Citation/CS1/Suggestions»

من موسوعة العلوم العربية
اذهب إلى التنقل اذهب إلى البحث
(Module:Citation/CS1/Suggestions)
 
ط (مراجعة واحدة)
 
(مراجعة متوسطة واحدة بواسطة نفس المستخدم غير معروضة)
سطر 3: سطر 3:


suggestions = {
suggestions = {
    ['acccessdate'] = 'access-date',
-- ['acccessdate'] = 'access-date',
    ['accesdate'] = 'access-date',
-- ['accesdate'] = 'access-date',
    ['access date'] = 'access-date',
-- ['access date'] = 'access-date',
    ['accessate'] = 'access-date',
-- ['accessate'] = 'access-date',
    ['accessdare'] = 'access-date',
-- ['accessdare'] = 'access-date',
    ['accessdatte'] = 'access-date',
-- ['accessdatte'] = 'access-date',
    ['accessddate'] = 'access-date',
-- ['accessddate'] = 'access-date',
    ['accessdte'] = 'access-date',
-- ['accessdte'] = 'access-date',
    ['accessed'] = 'access-date',
-- ['accessed'] = 'access-date',
    ['accessedate'] = 'access-date',
-- ['accessedate'] = 'access-date',
    ['accesssdate'] = 'access-date',
-- ['accesssdate'] = 'access-date',
    ['accssdate'] = 'access-date',
-- ['accssdate'] = 'access-date',
    ['acessdate'] = 'access-date',
-- ['acessdate'] = 'access-date',
    ['address'] = 'location',
['address'] = 'location',
    ['année'] = 'year', -- French
['année'] = 'year', -- French
    ['añoacceso'] = 'access-date', -- Spanish, Italian
['añoacceso'] = 'access-date', -- Spanish, Italian
    ['apellido'] = 'last', -- Spanish, Italian
['apellido'] = 'last', -- Spanish, Italian
    ['archive date'] = 'archive-date',
['archive date'] = 'archive-date',
    ['archive url'] = 'archive-url', -- Spanish, Italian
['archive url'] = 'archive-url', -- Spanish, Italian
    ['artist'] = 'others',
['artist'] = 'others',
    ['auteur'] = 'author', -- French
['auteur'] = 'author', -- French
    ['auther'] = 'author',
['auther'] = 'author',
    ['authorformat'] = 'name-list-format', -- remove after 2016-01-01
['authorformat'] = 'name-list-format', -- remove after 2016-01-01
    ['author-format'] = 'name-list-format', -- remove after 2016-01-01
['author-format'] = 'name-list-format', -- remove after 2016-01-01
    ['author link'] = 'author-link',
['author link'] = 'author-link',
    ['autor'] = 'author', -- Spanish, Italian
-- ['autor'] = 'author', -- Spanish, Italian
    ['autor2'] = 'author2', -- Spanish, Italian
-- ['autor2'] = 'author2', -- Spanish, Italian
    ['autthor'] = 'author',
['autthor'] = 'author',
    ['began'] = 'date', -- remove after 2016-01-01
['began'] = 'date', -- remove after 2016-01-01
    ['chapter_title'] = 'chapter',
['chapter_title'] = 'chapter',
    ['cita'] = 'quote', -- Spanish, Italian
['cita'] = 'quote', -- Spanish, Italian
    ['coautores'] = 'coauthors', -- Spanish, Italian
['coautores'] = 'coauthors', -- Spanish, Italian
    ['consulté le'] = 'access-date', -- French
['consulté le'] = 'access-date', -- French
    ['deadlink'] = 'dead-url',
['deadlink'] = 'dead-url',
    ['distributor'] = 'publisher',
['distributor'] = 'publisher',
    ['éditeur'] = 'editor', -- French
['éditeur'] = 'editor', -- French
    ['editon'] = 'edition',
['editon'] = 'edition',
    ['editoin'] = 'edition',
['editoin'] = 'edition',
    ['editorformat'] = 'name-list-format', -- remove after 2016-01-01
['editorformat'] = 'name-list-format', -- remove after 2016-01-01
    ['editor-format'] = 'name-list-format', -- remove after 2016-01-01
['editor-format'] = 'name-list-format', -- remove after 2016-01-01
    ['editorgiven'] = 'editor-given', -- remove after 2016-01-01
['editorgiven'] = 'editor-given', -- remove after 2016-01-01
    ['editorial'] = 'publisher',
['editorial'] = 'publisher',
    ['editorsurname'] = 'editor-surname', -- remove after 2016-01-01
['editorsurname'] = 'editor-surname', -- remove after 2016-01-01
    ['en ligne le'] = 'archive-date', -- French
['en ligne le'] = 'archive-date', -- French
    ['ended'] = 'date', -- remove after 2016-01-01
['ended'] = 'date', -- remove after 2016-01-01
    ['enlaceautor'] = 'author-link', -- Spanish, Italian
['enlaceautor'] = 'author-link', -- Spanish, Italian
    ['fecha'] = 'date', -- Spanish, Italian
['fecha'] = 'date', -- Spanish, Italian
    ['fechaacceso'] = 'access-date', -- Spanish, Italian
['fechaacceso'] = 'access-date', -- Spanish, Italian
    ['fechaarchivo'] = 'archive-date', -- Spanish, Italian
['fechaarchivo'] = 'archive-date', -- Spanish, Italian
    ['filetype'] = 'format',
['filetype'] = 'format',
    ['first 1'] = 'first1',
['first 1'] = 'first1',
    ['foramt'] = 'format',
['foramt'] = 'format',
    ['formato'] = 'format', -- Spanish, Italian
['formato'] = 'format', -- Spanish, Italian
    ['frist'] = 'first',
['frist'] = 'first',
    ['idioma'] = 'language', -- Spanish, Italian
['idioma'] = 'language', -- Spanish, Italian
    ['isnb'] = 'isbn',
['isnb'] = 'isbn',
    ['lang'] = 'language',
['lang'] = 'language',
    ['langauge'] = 'language',
['langauge'] = 'language',
    ['langue'] = 'language', -- French
['langue'] = 'language', -- French
    ['last 1'] = 'last1',
['last 1'] = 'last1',
    ['lieu'] = 'location', -- French
['lieu'] = 'location', -- French
    ['lire en ligne'] = 'url', -- French
['lire en ligne'] = 'url', -- French
    ['loaction'] = 'location',
['loaction'] = 'location',
    ['locatoin'] = 'location',
['locatoin'] = 'location',
    ['mois'] = 'month', -- French
['mois'] = 'month', -- French
    ['month'] = 'date', -- remove after 2016-01-01
['month'] = 'date', -- remove after 2016-01-01
--   ['name'] = 'author', -- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion
-- ['name'] = 'author', -- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion
    ['nespaper'] = 'newspaper',
['nespaper'] = 'newspaper',
    ['newpaper'] = 'newspaper',
['newpaper'] = 'newspaper',
    ['news'] = 'newspaper',
['news'] = 'newspaper',
    ['nom'] = 'last', -- French
['nom'] = 'last', -- French
    ['nom1'] = 'last1', -- French
['nom1'] = 'last1', -- French
    ['nombre'] = 'first', -- Spanish, Italian
['nombre'] = 'first', -- Spanish, Italian
    ['obra'] = 'work', -- Spanish, Italian
['obra'] = 'work', -- Spanish, Italian
    ['origdate'] = 'orig-year',
['origdate'] = 'orig-year',
    ['other'] = 'others',
['other'] = 'others',
    ['pagees'] = 'pages',
['pagees'] = 'pages',
    ['página'] = 'page', -- Spanish, Italian
['página'] = 'page', -- Spanish, Italian
    ['páginas'] = 'pages', -- Spanish, Italian
['páginas'] = 'pages', -- Spanish, Italian
    ['passage'] = 'pages', -- French
['passage'] = 'pages', -- French
    ['périodique'] = 'publisher', -- French
['périodique'] = 'publisher', -- French
    ['plublisher'] = 'publisher',
['plublisher'] = 'publisher',
    ['pmcid'] = 'pmc',
['pmcid'] = 'pmc',
    ['prénom'] = 'first', -- French
['prénom'] = 'first', -- French
    ['prénom1'] = 'first1', -- French
['prénom1'] = 'first1', -- French
    ['ps'] = 'postscript',
['ps'] = 'postscript',
    ['pub'] = 'publisher',
['pub'] = 'publisher',
    ['pubisher'] = 'publisher',
-- ['pubisher'] = 'publisher',
    ['publiser'] = 'publisher',
-- ['publiser'] = 'publisher',
    ['publishers'] = 'publisher',
-- ['publishers'] = 'publisher',
    ['publsher'] = 'publisher',
-- ['publsher'] = 'publisher',
    ['publsiher'] = 'publisher',
-- ['publsiher'] = 'publisher',
    ['pulbication-place'] = 'publication-place',
['pulbication-place'] = 'publication-place',
    ['pulbisher'] = 'publisher',
-- ['pulbisher'] = 'publisher',
    ['pulisher'] = 'publisher',
-- ['pulisher'] = 'publisher',
    ['retrieved'] = 'access-date',
['retrieved'] = 'access-date',
    ['separator'] = 'mode', -- remove after 2016-01-01
['separator'] = 'mode', -- remove after 2016-01-01
    ['série'] = 'work', -- French
['série'] = 'work', -- French
    ['service'] = 'agency',
['service'] = 'agency',
    ['suscripción'] = 'subscription', -- Spanish, Italian
['suscripción'] = 'subscription', -- Spanish, Italian
    ['tile'] = 'title',
['tile'] = 'title',
    ['tite'] = 'title',
['tite'] = 'title',
    ['titolo'] = 'title', -- Spanish, Italian
['titolo'] = 'title', -- Spanish, Italian
    ['titre'] = 'title', -- French
['titre'] = 'title', -- French
    ['título'] = 'title', -- Spanish, Italian
['título'] = 'title', -- Spanish, Italian
    ['transchapter'] = 'trans-chapter',
['transchapter'] = 'trans-chapter',
    ['translator'] = 'others',
['translator'] = 'others',
    ['transtitle'] = 'trans-title',
['transtitle'] = 'trans-title',
    ['ubicación'] = 'location', -- Spanish, Italian
['ubicación'] = 'location', -- Spanish, Italian
    ['urlarchivo'] = 'archive-url', -- Spanish, Italian
['urlarchivo'] = 'archive-url', -- Spanish, Italian
    ['vol'] = 'volume',  
['vol'] = 'volume',  
}
}
return suggestions;
 
 
--[[--------------------------< P A T T E R N S >--------------------------------------------------------------
 
Here we use Lua patterns to make suggestions.  The form is ['pattern'] = 'correct',
 
Lua patterns are not regex though they are similar.  The escape character is '%', not '\'.  For more information about
lua patterns, see: Extension:Scribunto/Lua_reference_manual#Patterns
 
Patterns should probably always include the '^' and '$' anchor assertions to prevent a partial match from incorrectly
suggesting the wrong parameter name.  For instance, the pattern 'a[utho]+r' matches 'author' in the no-longer-supported
parameter |author-separator= so the code suggests '|author='; the same pattern also matches the no-longer-supported
parameter |separator= (returning 'ator') so again, the code suggests '|author='.
 
One capture is supported, typically the enumerator from an enumerated parameter (the '6' in |author6=, etc.)  The value from the
capture replaces $1 in the 'correct' value.
 
]]
 
local patterns = {
['^ac+es+ ?d?a?t?e?$'] = 'access-date',
['^a[utho]+r$'] = 'author',
['^a[utho]+r(%d+)$'] = 'author$1', -- enumerated
['^pu[blish]+ers?$'] = 'publisher',
 
['تنسيق'] = 'format',
['تاريخ الوصول'] =' access-date',
['المؤلف'] = 'author',
['المؤلف1'] = 'author1',
['المؤلف2'] = 'author2',
['المؤلف3'] = 'author3',
['المؤلف4'] = 'author4',
['المؤلف5'] = 'author5',
['وصلة المؤلف'] = 'authorlink',
['وصلة المؤلف1'] = 'authorlink1',
['وصلة المؤلف2'] = 'authorlink2',
['وصلة المؤلف3'] = 'authorlink3',
['وصلة المؤلف4'] = 'authorlink4',
['وصلة المؤلف5'] = 'authorlink5',
['المؤلفين المشاركين'] = 'coauthors',
['المحرر'] = 'editor',
['الأول'] = 'first',
['الأول1'] = 'first1',
['الأول2'] = 'first2',
['الأول3'] = 'first3',
['الأول4'] = 'first4',
['الأول5'] = 'first5',
['لغة'] = 'language',
['الأخير'] = 'last',
['الأخير1'] = 'last1',
['الأخير2'] = 'last2',
['الأخير3'] = 'last3',
['الأخير4'] = 'last4',
['الأخير5'] = 'last5',
['الناشر'] = 'publisher',
['العنوان'] = 'title',
['العنوان بالعربي'] = 'trans_title',
['مسار'] = 'url',
['سنة'] = 'year',
['الأول'] = 'given',
['الأول1'] = 'given1',
['الأول2'] = 'given2',
['الأول3'] = 'given3',
['الأول4'] = 'given4',
['الأول5'] = 'given5',
['تجاهل خطأ ردمك'] = 'ignore-isbn-error',
['الرقم المعياري'] = 'isbn',
['الأخير'] = 'surname',
['الأخير1'] = 'surname1',
['الأخير2'] = 'surname2',
['الأخير3'] = 'surname3',
['الأخير4'] = 'surname4',
['الأخير5'] = 'surname5',
['تجاهل خطأ ردمك'] = 'ignoreisbnerror',
['مكان'] = 'location',
['الصفحة'] = 'page',
['الصفحات'] = 'pages',
['الإصدار'] = 'edition',
['مسار أرشيف'] = 'archive-url',
['عنوان'] = 'title',
}
 
return {suggestions = suggestions, patterns=patterns};

المراجعة الحالية بتاريخ 10:19، 9 يوليو 2016

يمكن إنشاء صفحة توثيق الوحدة في وحدة:Citation/CS1/Suggestions/شرح

--Please insert new suggestions in alphabetical order
--The form is ['incorrect'] = 'correct',

suggestions = {
--	['acccessdate'] = 'access-date',
--	['accesdate'] = 'access-date',
--	['access date'] = 'access-date',
--	['accessate'] = 'access-date',
--	['accessdare'] = 'access-date',
--	['accessdatte'] = 'access-date',
--	['accessddate'] = 'access-date',
--	['accessdte'] = 'access-date',
--	['accessed'] = 'access-date',
--	['accessedate'] = 'access-date',
--	['accesssdate'] = 'access-date',
--	['accssdate'] = 'access-date',
--	['acessdate'] = 'access-date',
	['address'] = 'location',
	['année'] = 'year', -- French
	['añoacceso'] = 'access-date', -- Spanish, Italian
	['apellido'] = 'last', -- Spanish, Italian
	['archive date'] = 'archive-date',
	['archive url'] = 'archive-url', -- Spanish, Italian
	['artist'] = 'others',
	['auteur'] = 'author', -- French
	['auther'] = 'author',
	['authorformat'] = 'name-list-format',										-- remove after 2016-01-01
	['author-format'] = 'name-list-format',										-- remove after 2016-01-01
	['author link'] = 'author-link',
--	['autor'] = 'author', -- Spanish, Italian
--	['autor2'] = 'author2', -- Spanish, Italian
	['autthor'] = 'author',
	['began'] = 'date',															-- remove after 2016-01-01
	['chapter_title'] = 'chapter',
	['cita'] = 'quote', -- Spanish, Italian
	['coautores'] = 'coauthors', -- Spanish, Italian
	['consulté le'] = 'access-date', -- French
	['deadlink'] = 'dead-url',
	['distributor'] = 'publisher',
	['éditeur'] = 'editor', -- French
	['editon'] = 'edition',
	['editoin'] = 'edition',
	['editorformat'] = 'name-list-format',										-- remove after 2016-01-01
	['editor-format'] = 'name-list-format',										-- remove after 2016-01-01
	['editorgiven'] = 'editor-given',											-- remove after 2016-01-01
	['editorial'] = 'publisher',
	['editorsurname'] = 'editor-surname',										-- remove after 2016-01-01
	['en ligne le'] = 'archive-date', -- French
	['ended'] = 'date',															-- remove after 2016-01-01
	['enlaceautor'] = 'author-link', -- Spanish, Italian
	['fecha'] = 'date', -- Spanish, Italian
	['fechaacceso'] = 'access-date', -- Spanish, Italian
	['fechaarchivo'] = 'archive-date', -- Spanish, Italian
	['filetype'] = 'format',
	['first 1'] = 'first1',
	['foramt'] = 'format',
	['formato'] = 'format', -- Spanish, Italian
	['frist'] = 'first',
	['idioma'] = 'language', -- Spanish, Italian
	['isnb'] = 'isbn',
	['lang'] = 'language',
	['langauge'] = 'language',
	['langue'] = 'language', -- French
	['last 1'] = 'last1',
	['lieu'] = 'location', -- French
	['lire en ligne'] = 'url', -- French
	['loaction'] = 'location',
	['locatoin'] = 'location',
	['mois'] = 'month', -- French
	['month'] = 'date',															-- remove after 2016-01-01
--	['name'] = 'author', -- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion
	['nespaper'] = 'newspaper',
	['newpaper'] = 'newspaper',
	['news'] = 'newspaper',
	['nom'] = 'last', -- French
	['nom1'] = 'last1', -- French
	['nombre'] = 'first', -- Spanish, Italian
	['obra'] = 'work', -- Spanish, Italian
	['origdate'] = 'orig-year',
	['other'] = 'others',
	['pagees'] = 'pages',
	['página'] = 'page', -- Spanish, Italian
	['páginas'] = 'pages', -- Spanish, Italian
	['passage'] = 'pages', -- French
	['périodique'] = 'publisher', -- French
	['plublisher'] = 'publisher',
	['pmcid'] = 'pmc',
	['prénom'] = 'first', -- French
	['prénom1'] = 'first1', -- French
	['ps'] = 'postscript',
	['pub'] = 'publisher',
--	['pubisher'] = 'publisher',
--	['publiser'] = 'publisher',
--	['publishers'] = 'publisher',
--	['publsher'] = 'publisher',
--	['publsiher'] = 'publisher',
	['pulbication-place'] = 'publication-place',
--	['pulbisher'] = 'publisher',
--	['pulisher'] = 'publisher',
	['retrieved'] = 'access-date',
	['separator'] = 'mode',														-- remove after 2016-01-01
	['série'] = 'work', -- French
	['service'] = 'agency',
	['suscripción'] = 'subscription', -- Spanish, Italian
	['tile'] = 'title',
	['tite'] = 'title',
	['titolo'] = 'title', -- Spanish, Italian
	['titre'] = 'title', -- French
	['título'] = 'title', -- Spanish, Italian
	['transchapter'] = 'trans-chapter',
	['translator'] = 'others',
	['transtitle'] = 'trans-title',
	['ubicación'] = 'location', -- Spanish, Italian
	['urlarchivo'] = 'archive-url', -- Spanish, Italian
	['vol'] = 'volume', 
}


--[[--------------------------< P A T T E R N S >--------------------------------------------------------------

Here we use Lua patterns to make suggestions.  The form is ['pattern'] = 'correct',

Lua patterns are not regex though they are similar.  The escape character is '%', not '\'.  For more information about
lua patterns, see: Extension:Scribunto/Lua_reference_manual#Patterns

Patterns should probably always include the '^' and '$' anchor assertions to prevent a partial match from incorrectly
suggesting the wrong parameter name.  For instance, the pattern 'a[utho]+r' matches 'author' in the no-longer-supported
parameter |author-separator= so the code suggests '|author='; the same pattern also matches the no-longer-supported
parameter |separator= (returning 'ator') so again, the code suggests '|author='.

One capture is supported, typically the enumerator from an enumerated parameter (the '6' in |author6=, etc.)  The value from the
capture replaces $1 in the 'correct' value.

]]

local patterns = {
	['^ac+es+ ?d?a?t?e?$'] = 'access-date',
	['^a[utho]+r$'] = 'author',
	['^a[utho]+r(%d+)$'] = 'author$1',											-- enumerated
	['^pu[blish]+ers?$'] = 'publisher',

	['تنسيق'] = 'format',
	['تاريخ الوصول'] =' access-date',
	['المؤلف'] = 'author',
	['المؤلف1'] = 'author1',
	['المؤلف2'] = 'author2',
	['المؤلف3'] = 'author3',
	['المؤلف4'] = 'author4',
	['المؤلف5'] = 'author5',
	['وصلة المؤلف'] = 'authorlink',
	['وصلة المؤلف1'] = 'authorlink1',
	['وصلة المؤلف2'] = 'authorlink2',
	['وصلة المؤلف3'] = 'authorlink3',
	['وصلة المؤلف4'] = 'authorlink4',
	['وصلة المؤلف5'] = 'authorlink5',
	['المؤلفين المشاركين'] = 'coauthors',
	['المحرر'] = 'editor',
	['الأول'] = 'first',
	['الأول1'] = 'first1',
	['الأول2'] = 'first2',
	['الأول3'] = 'first3',
	['الأول4'] = 'first4',
	['الأول5'] = 'first5',
	['لغة'] = 'language',
	['الأخير'] = 'last',
	['الأخير1'] = 'last1',
	['الأخير2'] = 'last2',
	['الأخير3'] = 'last3',
	['الأخير4'] = 'last4',
	['الأخير5'] = 'last5',
	['الناشر'] = 'publisher',
	['العنوان'] = 'title',
	['العنوان بالعربي'] = 'trans_title',
	['مسار'] = 'url',
	['سنة'] = 'year',
	['الأول'] = 'given',
	['الأول1'] = 'given1',
	['الأول2'] = 'given2',
	['الأول3'] = 'given3',
	['الأول4'] = 'given4',
	['الأول5'] = 'given5',
	['تجاهل خطأ ردمك'] = 'ignore-isbn-error',
	['الرقم المعياري'] = 'isbn',
	['الأخير'] = 'surname',
	['الأخير1'] = 'surname1',
	['الأخير2'] = 'surname2',
	['الأخير3'] = 'surname3',
	['الأخير4'] = 'surname4',
	['الأخير5'] = 'surname5',
	['تجاهل خطأ ردمك'] = 'ignoreisbnerror',
	['مكان'] = 'location',
	['الصفحة'] = 'page',
	['الصفحات'] = 'pages',
	['الإصدار'] = 'edition',
	['مسار أرشيف'] = 'archive-url',
	['عنوان'] = 'title',
	}

return {suggestions = suggestions, patterns=patterns};