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

۲۲۱ بایت اضافه‌شده ،  ‏۳۰ نوامبر ۲۰۲۱
جز
۱ نسخه واردشده
imported>Dalba
(year گاهی به فارسی است (به طور مشخص وقتی که هم «سال» و هم «تاریخ» در یادکرد ژورنال وجود داشته باشد، مثل Special:Permalink/26754779) و این باعث می‌شود که یادکردها وصل نشوند: Special:Permalink/26754689#اشکال_پک_چیست؟ (شاید بهتر باشد سال جایی زودتر از این تبدیل به انگلیسی شود، فرصت بررسی بیشتر ندارم))
جز (۱ نسخه واردشده)
 
(۳ نسخهٔ میانی ویرایش شده توسط ۳ کاربر نشان داده نشد)
خط ۲۳۷: خط ۲۳۷:
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
خط ۱٬۱۴۱: خط ۱٬۱۴۱:
if i == 4 then break end -- if four then done
if i == 4 then break end -- if four then done
end
end
table.insert (names, numConv('en' , year)); -- add the year at the end
if year ~= nil then
year = numConv('en' , year);
end
table.insert (names, year); -- add the year at the end, if available
local id = table.concat(names); -- concatenate names and year for CITEREF id
local id = table.concat(names); -- concatenate names and year for CITEREF id
if is_set (id) then -- if concatenation is not an empty string
if is_set (id) then -- if concatenation is not an empty string
خط ۱٬۳۴۱: خط ۱٬۳۴۴:
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
۴۱۵٬۰۷۸

ویرایش