Sửa đổi Mô đun:Citation
Chú ý: Bạn chưa đăng nhập và địa chỉ IP của bạn sẽ hiển thị công khai khi lưu các sửa đổi.
Bạn có thể tham gia như người biên soạn chuyên nghiệp và lâu dài ở Bách khoa Toàn thư Việt Nam, bằng cách đăng ký và đăng nhập - IP của bạn sẽ không bị công khai và có thêm nhiều lợi ích khác.
Các sửa đổi có thể được lùi lại. Xin hãy kiểm tra phần so sánh bên dưới để xác nhận lại những gì bạn muốn làm, sau đó lưu thay đổi ở dưới để hoàn tất việc lùi lại sửa đổi.
Bản hiện tại | Nội dung bạn nhập | ||
Dòng 10: | Dòng 10: | ||
strip_apostrophe_markup; | strip_apostrophe_markup; | ||
− | local z ={}; | + | local z ={}; -- tables in Module:Citation/CS1/Utilities |
local extract_ids, extract_id_access_levels, build_id_list, is_embargoed; -- functions in Module:Citation/Identifiers | local extract_ids, extract_id_access_levels, build_id_list, is_embargoed; -- functions in Module:Citation/Identifiers | ||
Dòng 1.391: | Dòng 1.391: | ||
When an author or editor parameter contains some form of 'et al.', the 'et al.' is stripped from the parameter and a flag (etal) returned | When an author or editor parameter contains some form of 'et al.', the 'et al.' is stripped from the parameter and a flag (etal) returned | ||
− | that will cause list_people() to add the static 'et al.' text from Module:Citation/Configuration. This keeps 'et al.' out of the | + | that will cause list_people() to add the static 'et al.' text from Module:Citation/CS1/Configuration. This keeps 'et al.' out of the |
template's metadata. When this occurs, the page is added to a maintenance category. | template's metadata. When this occurs, the page is added to a maintenance category. | ||
Dòng 1.647: | Dòng 1.647: | ||
local function set_style (mode, ps, ref, cite_class) | local function set_style (mode, ps, ref, cite_class) | ||
local sep; | local sep; | ||
− | if 'cs2' == mode then | + | if 'cs2' == mode then -- if this template is to be rendered in CS2 (citation) style |
sep, ps, ref = set_cs2_style (ps, ref); | sep, ps, ref = set_cs2_style (ps, ref); | ||
− | elseif 'cs1' == mode then | + | elseif 'cs1' == mode then -- if this template is to be rendered in CS1 (cite xxx) style |
sep, ps = set_cs1_style (ps); | sep, ps = set_cs1_style (ps); | ||
− | else | + | else -- anything but cs1 or cs2 |
sep, ps, ref = get_settings_from_cite_class (ps, ref, cite_class); -- get settings based on the template's CitationClass | sep, ps, ref = get_settings_from_cite_class (ps, ref, cite_class); -- get settings based on the template's CitationClass | ||
end | end | ||
Dòng 2.015: | Dòng 2.015: | ||
elseif (4 < mw.ustring.len(volume)) then -- not all digits or roman numerals and longer than 4 characters | elseif (4 < mw.ustring.len(volume)) then -- not all digits or roman numerals and longer than 4 characters | ||
vol = substitute (cfg.messages['j-vol'], {sepc, volume}); -- not bold | vol = substitute (cfg.messages['j-vol'], {sepc, volume}); -- not bold | ||
− | + | add_prop_cat ('long_vol'); | |
else -- four or less characters | else -- four or less characters | ||
vol = substitute (cfg.presentation['vol-bold'], {sepc, hyphen_to_dash(volume)}); -- bold | vol = substitute (cfg.presentation['vol-bold'], {sepc, hyphen_to_dash(volume)}); -- bold | ||
Dòng 2.562: | Dòng 2.562: | ||
end | end | ||
− | local sepc; | + | local sepc; -- separator between citation elements for CS1 a period, for CS2, a comma |
local PostScript; | local PostScript; | ||
local Ref = A['Ref']; | local Ref = A['Ref']; | ||
Dòng 2.841: | Dòng 2.841: | ||
we get the date used in the metadata. | we get the date used in the metadata. | ||
− | Date validation supporting code is in Module:Citation/Date_validation | + | Date validation supporting code is in Module:Citation/CS1/Date_validation |
]] | ]] | ||
do -- create defined block to contain local variables error_message, date_parameters_list, mismatch | do -- create defined block to contain local variables error_message, date_parameters_list, mismatch | ||
Dòng 3.831: | Dòng 3.831: | ||
metadata.set_selected_modules (cfg, utilities); -- so that functions in COinS can see the selected cfg tables and selected Utilities module | metadata.set_selected_modules (cfg, utilities); -- so that functions in COinS can see the selected cfg tables and selected Utilities module | ||
− | dates = validation.dates; | + | dates = validation.dates; -- imported functions from Module:Citation/CS1/Date validation |
year_date_check = validation.year_date_check; | year_date_check = validation.year_date_check; | ||
reformat_dates = validation.reformat_dates; | reformat_dates = validation.reformat_dates; | ||
Dòng 3.837: | Dòng 3.837: | ||
date_name_xlate = validation.date_name_xlate; | date_name_xlate = validation.date_name_xlate; | ||
− | is_set = utilities.is_set; | + | is_set = utilities.is_set; -- imported functions from Module:Citation/CS1/Utilities |
in_array = utilities.in_array; | in_array = utilities.in_array; | ||
substitute = utilities.substitute; | substitute = utilities.substitute; | ||
Dòng 3.850: | Dòng 3.850: | ||
strip_apostrophe_markup = utilities.strip_apostrophe_markup; | strip_apostrophe_markup = utilities.strip_apostrophe_markup; | ||
− | z = utilities.z; | + | z = utilities.z; -- table of error and category tables in Module:Citation/CS1/Utilities |
− | extract_ids = identifiers.extract_ids; | + | extract_ids = identifiers.extract_ids; -- imported functions from Module:Citation/CS1/Identifiers |
build_id_list = identifiers.build_id_list; | build_id_list = identifiers.build_id_list; | ||
is_embargoed = identifiers.is_embargoed; | is_embargoed = identifiers.is_embargoed; | ||
extract_id_access_levels = identifiers.extract_id_access_levels; | extract_id_access_levels = identifiers.extract_id_access_levels; | ||
− | make_coins_title = metadata.make_coins_title; | + | make_coins_title = metadata.make_coins_title; -- imported functions from Module:Citation/CS1/COinS |
get_coins_pages = metadata.get_coins_pages; | get_coins_pages = metadata.get_coins_pages; | ||
COinS = metadata.COinS; | COinS = metadata.COinS; | ||
− | local args = {}; | + | local args = {}; -- table where we store all of the template's arguments |
− | local suggestions = {}; | + | local suggestions = {}; -- table where we store suggestions if we need to loadData them |
local error_text, error_state; | local error_text, error_state; | ||