وحدة:Webarchive/data
من ملاقط
المزيد من الإجراءات
يمكن إنشاء صفحة توثيق الوحدة في وحدة:Webarchive/data/شرح
--[[--------------------------< C O N F I G U R A T I O N >----------------------------------------------------
global configuration settings
]]
local config = {
maxurls = 10, -- Max number of URLs allowed.
tname = 'أرشيف الويب', -- name of calling template. Change if template rename.
verifydates = true, -- See documentation. Set false to disable.
}
--[[--------------------------< 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.
Note: Namespace names should use underscores instead of spaces.
]]
local uncategorized_namespaces = { -- same list as specified at [[Module:Citation/CS1/Configuration]]
['User']=true, ['Talk']=true, ['User_talk']=true, ['Wikipedia_talk']=true, ['File_talk']=true,
['Template_talk']=true, ['Help_talk']=true, ['Category_talk']=true, ['Portal_talk']=true,
['Book_talk']=true, ['Draft_talk']=true, ['Module_talk']=true,
['MediaWiki_talk']=true,
}
local uncategorized_subpages = {'/ملعب', '/مختبر'}; -- list of Lua patterns found in page names of pages we should not categorize
local excepted_pages = { -- these pages will be categorized if set true; set to nil to disable
['Module talk:Webarchive/مختبر'] = true, -- test cases pages used during development
['Template:Webarchive/مختبر'] = true,
}
--[[--------------------------< C A T E G O R I E S >----------------------------------------------------------
this is a table of all categories supported by Module:Webarchive
]]
local categories = {
archiveis = 'تصنيف:وصلات أرشيف في قالب أرشيف الويب',
error = 'تصنيف:أخطاء قالب أرشيف الإنترنت',
other = 'تصنيف:قالب أرشيف الإنترنت بأرشيفات أخرى',
unknown = 'تصنيف:قالب أرشيف الإنترنت بأرشيفات غير معروفة',
warning = 'تصنيف:تنبيهات قالب أرشيف الإنترنت',
wayback = 'تصنيف:قالب أرشيف الإنترنت بوصلات واي باك',
webcite = 'تصنيف:قالب أرشيف الإنترنت بوصلات ويب سايت',
}
--[[--------------------------< P R E F I X E S >--------------------------------------------------------------
used only with serviceName(), this table holds the two generic tail-text prefixes specified by services['<service name>'][1]
]]
local prefixes = {
at = 'على موقع',
atthe = 'على موقع',
}
--[=[-------------------------< S E R V I C E S >--------------------------------------------------------------
this is a table of tables for archive services. Each service table has:
[1]=prefix; may be boolean true or false, or text string where:
true indicates that the prefix is taken from prefixes.atthe
false indicates that the prefix is taken from prefixes.at
'text string' is used in lieu of the typical 'at' or 'at the' prefix
[2]=wikilink target article that describes the service; set to nil if not used
[3]=wikilink label; the label in [[target|label]]; set to nil if not used; when there is not article ([2] is nil) use this to name the service; see wikiwix in the table
[4]=service ID; set to nil if not used
[5]=tracking category key from the categories table; set to nil if not used
[6]=postfix; text string to be appended at the end of the tail string - see webarchive.loc.gov in the table
]=]
local services = {
['archive.ec'] = {false, 'أرشيف.تودي', nil, 'archiveis', categories.archiveis},
['archive.fo'] = {false, 'أرشيف.تودي', nil, 'archiveis', categories.archiveis},
['archive.is'] = {false, 'أرشيف.تودي', nil, 'archiveis', categories.archiveis},
['archive.li'] = {false, 'أرشيف.تودي', nil, 'archiveis', categories.archiveis},
['archive.md'] = {false, 'أرشيف.تودي', nil, 'archiveis', categories.archiveis},
['archive.org'] = {true, 'واي باك مشين', nil, 'wayback', categories.wayback},
['archive.ph'] = {false, 'أرشيف.تودي', nil, 'archiveis', categories.archiveis},
['archive.today'] = {false, 'أرشيف.تودي', nil, 'archiveis', categories.archiveis},
['archive.vn'] = {false, 'أرشيف.تودي', nil, 'archiveis', categories.archiveis},
['archive-it.org'] = {false, 'أرشيف الإنترنت', nil, 'archiveit'},
['arquivo.pt'] = {true, nil, 'أرشيف الويب البرتغالي'},
['bibalex.org'] = {false, 'مكتبة الإسكندرية الجديدة', 'مكتبة الإسكندرية'},
['collectionscanada'] = {true, 'أرشيف الإنترنت الحكومي الكندي'},
['conifer.rhizome.org'] = {false, 'ريزوم_(منظمة)', 'منظمة ريزوم'},
['europarchive.org'] = {true, 'مكتبة أيرلندا الوطنية'},
['freezepage.com'] = {false, nil, 'Freezepage'},
['ghostarchive.org'] = {false, nil, 'أرشيف الأشباح'},
['haw.nsk'] = {true, 'أرشيف الويب الكرواتي'},
['langzeitarchivierung.bib-bvb.de'] = {false, 'المكتبة البافارية الحكومية'},
['loc.gov'] = {true, 'مكتبة الكونغرس'},
['megalodon.jp'] = {false, 'ميغالودون (موقع ويب)', 'megalodon.jp', 'ميغالودون'},
['nationalarchives.gov.uk'] = {true, 'أرشيف الإنترنت الحكومي البريطاني', nil, 'الأرشيف الحكومي البريطاني'},
['nlb.gov.sg'] = {false, 'أرشيف الإنترنت في سنغافورة'},
['parliament.uk'] = {true, 'أرشيف الإنترنت الخاص بالبرلمان البريطاني'},
['perma.cc'] = {false, 'Perma.cc'},
['perma-archives.cc'] = {false, 'Perma.cc'},
['proni.gov'] = {true, 'مكتب السجلات العامة في أيرلندا الشمالية'},
['screenshots.com'] = {false, nil, 'لقطات الشاشة'},
['stanford.edu'] = {true, 'مكتبات جامعة ستانفورد', 'أرشيف ستانفورد على الإنترنت'},
['timetravel.mementoweb.org'] = {false, 'المشروع التذكاري'},
['uni-lj.si'] = {true, nil, 'أرشيف الويب السلوفيني'},
['veebiarhiiv.digar.ee'] = {true, nil, 'أرشيف الويب الإستوني'},
['vefsafn.is'] = {true, 'المكتبة الجامعية والوطنية في أيسلندا'},
['webarchive.bac-lac.gc.ca'] = {false, 'مكتبة وأرشيف كندا'},
['webarchive.loc.gov'] = {true, 'مكتبة الكونغرس', nil, 'locwebarchives', nil, 'أرشيف الويب'},
['webarchive.nla.gov.au'] = {true, 'أرشيف الويب الأسترالي'},
['webarchive.org.uk'] = {true, 'أرشيف الإنترنت البريطاني'},
['webcache.googleusercontent.com'] = {false, nil, 'التخزين المؤقت لجوجل'},
['webcitation.org'] = {false, 'ويب سايت', nil, 'webcite', categories.webcite},
['webharvest.gov'] = {true, 'إدارة الأرشيف والوثائق الوطنية'},
['webrecorder.io'] = {false, 'webrecorder.io'},
['wikiwix.com'] = {false, nil, 'ويكي وكس'},
['yorku.ca'] = {false, 'مكتبات جامعة يورك', 'مكتبة جامعة يورك الرقمية'},
}
--[[--------------------------< S T A T I C T E X T >--------------------------------------------------------
for internationalzation
]]
local s_text = {
addlarchives = 'أرشيف إضافي',
addlpages = 'صفحات إضافية مؤرشفة على', -- TODO why the there? replace with regular space?
Archive_index = 'فهرس الأرشيف',
Archived = 'نسخة محفوظة',
archived = 'نسخة محفوظة',
archive = 'الأرشيف',
Page = 'صفحة',
deprecated = 'وصلة مهملة'
}
--[[--------------------------< E R R _ W A R N _ M S G S >----------------------------------------------------
these tables hold error and warning message text
]]
local err_warn_msgs = {
date_err = '(تاريخ خاطئ)', -- decodeWebciteDate, decodeWaybackDate, decodeArchiveisDate
date_miss = '(التاريخ مفقود)', -- parseExtraArgs
deprecated = '(خطأ: خدمة أرشفة مهملة)', -- See [[Wikipedia:Archive.today guidance]]
ts_short = '(طول تاريخ الطابع الزمني)', -- decodeWaybackDate timestamp less than 8 digits
ts_date = '(تاريخ الطابع الزمني غير صالح)', -- decodeWaybackDate timestamp not a valid date
unknown_url = '(خطأ: عنوان مسار الأرشيف غير معروف)', -- serviceName
unnamed_params = '(تجاهلت الوسائط الموضعية)',
--warnings
mismatch = '<sup>(عدم تطابق التاريخ)</sup>', -- webarchive
ts_len = '<sup>(طول الطابع الزمني)</sup>', -- decodeWaybackDate, decodeArchiveisDate timestamp not 14 digits
ts_cal = '<sup>(تقويم)</sup>', -- decodeWaybackDate timestamp has trailing splat
}
local crit_err_msgs = { -- critical error messages
conflicting = 'Conflicting |$1= and |$2=',
empty = 'المسار فارغ',
-- iabot1 = 'https://web.http', -- TODO: these iabot bugs perportedly fixed; removing these causes lua script error
-- iabot2 = 'Invalid URL', -- at Template:Webarchive/testcases/Production; resolve that before deleting these messages
invalid_url = 'عنوان المسار غير صالح',
ts_nan = 'الطابع الزمني ليس رقمًا',
unknown = 'مشكلة غير معروفة. يُرجى الإبلاغ عنها في صفحة نقاش القالب.',
}
--[[--------------------------< D A T E I N T E R N A T I O N A L I Z A T I O N >----------------------------
these tables hold data that is used when converting date formats from non-English languages (because mw.language.getContentLanguage:formatDate()
doesn't understand non-English month names)
]]
local month_num = { -- retain English language names even though they may not be strictly required on the local wiki
['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12,
['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12,
['يناير'] = 1, ['فبراير'] = 2, ['مارس'] = 3, ['أبريل'] = 4, ['مايو'] = 5, ['يونيو'] = 6, ['يوليو'] = 7, ['أغسطس'] = 8, ['سبتمبر'] = 9, ['أكتوبر'] = 10, ['نوفمبر'] = 11, ['ديسمبر'] = 12,
};
-- when the local wiki uses non-western digits in dates, local wiki digits must be
-- translated to western digits; lua only understands western digits
local digits = { -- use this table to aid translation
-- [''] = 0, [''] = 1, [''] = 2, [''] = 3, [''] = 4, [''] = 5, [''] = 6, [''] = 7, [''] = 8, [''] = 9, -- fill these table indexes with local digits
enable = false -- set to true to enable local-digit to western-digit translation
};
--[[--------------------------< P A R A M E T E R I N T E R N A T I O N A L I Z A T I O N >------------------
this table holds tables of parameter names and their non-English aliases. In the enum_params table '#' is a single
character placeholder for 1 or more digit characters
parameter names in this table shall be lowercase
]]
local params = {
['url'] = {'url', 'مسار'},
['date'] = {'date', 'datum', 'تاريخ'},
['title'] = {'title', 'titel', 'عنوان'},
['nolink'] = {'nolink', 'بلا_وصلة'},
['format'] = {'format', 'تنسيق'}
}
local enum_params = {
['url#'] = {'url#', 'مسار#'},
['date#'] = {'date#', 'datum#', 'تاريخ#'},
['title#'] = {'title#', 'titel#', 'عنوان#'},
}
local format_vals = { -- |format= accepts two values; add local language variants here
['addlpages'] = {'addlpages', 'صفحات_إضافية'},
['addlarchives'] = {'addlarchives', 'أرشيف_إضافي'},
}
--[[--------------------------< E X P O R T E D T A B L E S >------------------------------------------------
]]
return {
categories = categories,
config = config,
crit_err_msgs = crit_err_msgs,
digits = digits,
enum_params = enum_params,
err_warn_msgs = err_warn_msgs,
excepted_pages = excepted_pages,
format_vals = format_vals,
month_num = month_num,
params = params,
prefixes = prefixes,
services = services,
s_text = s_text,
uncategorized_namespaces = uncategorized_namespaces,
uncategorized_subpages = uncategorized_subpages,
}