پودمان:Citation/CS1/fa: تفاوت میان نسخه‌ها

۱۶۶ بایت اضافه‌شده ،  ‏۲۷ فوریهٔ ۲۰۲۱
دقیقه + separators
جز (۱ نسخه واردشده)
(دقیقه + separators)
خط ۲۳۷: خط ۲۳۷:
checks the content of |title-link=, |series-link=, |author-link= etc for properly formatted content: no wikilinks, no urls
checks the content of |title-link=, |series-link=, |author-link= etc for properly formatted content: no wikilinks, no urls


Link parameters are to hold the title of a wikipedia article so none of the WP:TITLESPECIALCHARACTERS are allowed:
Link parameters are to hold the title of a imamatpedia article so none of the WP:TITLESPECIALCHARACTERS are allowed:
# < > [ ] | { } _
# < > [ ] | { } _
except the underscore which is used as a space in wiki urls and # which is used for section links
except the underscore which is used as a space in wiki urls and # which is used for section links
خط ۳۵۸: خط ۳۵۸:
if is_parameter_ext_wikilink (v) then -- look at the value; if there is a url add an error message
if is_parameter_ext_wikilink (v) then -- look at the value; if there is a url add an error message
if is_set(error_message) then -- once we've added the first portion of the error message ...
if is_set(error_message) then -- once we've added the first portion of the error message ...
error_message=error_message .. ", "; -- ... add a comma space separator
error_message=error_message .. "، "; -- ... add a comma space separator
end
end
error_message=error_message .. "&#124;" .. k .. "="; -- add the failed parameter
error_message=error_message .. "&#124;" .. k .. "="; -- add the failed parameter
خط ۱٬۱۱۴: خط ۱٬۱۱۴:
if count > 0 then  
if count > 0 then  
if count > 1 and is_set(lastauthoramp) and not etal then
if count > 1 and is_set(lastauthoramp) and not etal then
text[#text-2] = " & "; -- replace last separator with ampersand text
text[#text-2] = " و "; -- replace last separator with ampersand text
end
end
text[#text] = nil; -- erase the last separator
text[#text] = nil; -- erase the last separator
خط ۱٬۳۴۴: خط ۱٬۳۴۴:
extensions. For example, code 'cbk-zam' and its associated name 'Chavacano de Zamboanga' (MediaWiki does not support
extensions. For example, code 'cbk-zam' and its associated name 'Chavacano de Zamboanga' (MediaWiki does not support
code 'cbk' or name 'Chavacano'.  Most (all?) of these languages are not used a 'language' codes per se, rather they
code 'cbk' or name 'Chavacano'.  Most (all?) of these languages are not used a 'language' codes per se, rather they
are used as sub-domain names: cbk-zam.wikipedia.org.  These names can be found (for the time being) at
are used as sub-domain names: cbk-zam.imamatpedia.org.  These names can be found (for the time being) at
https://phabricator.wikimedia.org/diffusion/ECLD/browse/master/LocalNames/LocalNamesEn.php
https://phabricator.wikimedia.org/diffusion/ECLD/browse/master/LocalNames/LocalNamesEn.php


خط ۱٬۴۴۳: خط ۱٬۴۴۳:
code = #language_list -- reuse code as number of languages in the list
code = #language_list -- reuse code as number of languages in the list
if 2 >= code then
if 2 >= code then
name = table.concat (language_list, ' and ') -- insert '<space>and<space>' between two language names
name = table.concat (language_list, ' و ') -- insert '<space>and<space>' between two language names
elseif 2 < code then
elseif 2 < code then
language_list[code] = 'and ' .. language_list[code]; -- prepend last name with 'and<space>'
language_list[code] = 'و ' .. language_list[code]; -- prepend last name with 'and<space>'
name = table.concat (language_list, ', ') -- and concatenate with '<comma><space>' separators
name = table.concat (language_list, '، ') -- and concatenate with '<comma><space>' separators
end
end
if this_wiki_name == name then
if this_wiki_name == name then
خط ۱٬۹۵۱: خط ۱٬۹۵۱:
Check archive.org urls to make sure they at least look like they are pointing at valid archives and not to the  
Check archive.org urls to make sure they at least look like they are pointing at valid archives and not to the  
save snapshot url or to calendar pages.  When the archive url is 'https://web.archive.org/save/' (or http://...)
save snapshot url or to calendar pages.  When the archive url is 'https://web.archive.org/save/' (or http://...)
archive.org saves a snapshot of the target page in the url.  That is something that Wikipedia should not allow
archive.org saves a snapshot of the target page in the url.  That is something that imamatpedia should not allow
unwitting readers to do.
unwitting readers to do.


خط ۲٬۲۶۳: خط ۲٬۲۶۳:
IgnoreISSN = nil; -- anything else, set to empty string
IgnoreISSN = nil; -- anything else, set to empty string
end
end
local IgnoreYear = A['IgnoreYear'];
local Embargo = A['Embargo'];
local Embargo = A['Embargo'];
local Class = A['Class']; -- arxiv class identifier
local Class = A['Class']; -- arxiv class identifier
خط ۲٬۳۰۲: خط ۲٬۳۰۳:
local sepc; -- separator between citation elements for CS1 a period, for CS2, a comma
local sepc; -- separator between citation elements for CS1 a period, for CS2, a comma
local PostScript;
local PostScript;
local Ref;
local Ref = A['Ref'];
if not is_set (Ref) then
Ref = 'harv'; -- set as default when not set externally
end
local Ref2 = A['Ref2']; --falocalization
local Ref2 = A['Ref2']; --falocalization
Ref2 = numConv('en', Ref2);
Ref2 = numConv('en', Ref2);
sepc, PostScript, Ref = set_style (Mode:lower(), A['PostScript'], A['Ref'], config.CitationClass);
sepc, PostScript, Ref = set_style (Mode:lower(), A['PostScript'], Ref, config.CitationClass);
use_lowercase = ( sepc == ',' ); -- used to control capitalization for certain static text
use_lowercase = ( sepc == ',' ); -- used to control capitalization for certain static text


خط ۲٬۵۹۵: خط ۲٬۵۹۹:
['year'] = {val=Year, name=A:ORIGIN ('Year')},
['year'] = {val=Year, name=A:ORIGIN ('Year')},
};
};
anchor_year, Embargo, error_message = dates(date_parameters_list, COinS_date);
anchor_year, Embargo, error_message = dates(date_parameters_list, COinS_date, IgnoreYear);


-- start temporary Julian / Gregorian calendar uncertainty categorization
-- start temporary Julian / Gregorian calendar uncertainty categorization
خط ۲٬۶۰۷: خط ۲٬۶۱۱:
if 0 == mismatch then -- |year= does not match a year-value in |date=
if 0 == mismatch then -- |year= does not match a year-value in |date=
if is_set (error_message) then -- if there is already an error message
if is_set (error_message) then -- if there is already an error message
error_message = error_message .. ', '; -- tack on this additional message
error_message = error_message .. '، '; -- tack on this additional message
end
end
error_message = error_message .. 'عدم تطابق&#124;سال= / &#124;تاریخ=';
error_message = error_message .. 'عدم تطابق&#124;سال= / &#124;تاریخ=';
خط ۲٬۹۸۴: خط ۲٬۹۸۸:
table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'minutes') .. ' and ' .. wrap_style ('parameter', 'time')}, true ) } );
table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'minutes') .. ' and ' .. wrap_style ('parameter', 'time')}, true ) } );
end
end
Position = " " .. Minutes .. " " .. cfg.messages['minutes'];
Position = " " .. cfg.messages['minutes'] .. " " .. Minutes;
else
else
if is_set(Time) then
if is_set(Time) then
کاربر ناشناس