মডিউল:Lang/utilities: সংশোধিত সংস্করণের মধ্যে পার্থক্য

বিষয়বস্তু বিয়োগ হয়েছে বিষয়বস্তু যোগ হয়েছে
পাতা তৈরি
 
অনুবাদ
১ নং লাইন:
require ('Moduleমডিউল:No globals');
 
 
৩৬ নং লাইন:
local text = frame.args[2] or frame.args['text'] or ''; -- empty string causes 'yes' return; {{lang}} will handle the missing text error
local is_latn = require ("Moduleমডিউল:Unicodeইউনিকোড dataতথ্য").is_Latin;
if is_cjk_code (code) and not is_latn (text) then -- is_latn() is in Module:Lang
৫৬ নং লাইন:
 
local function in_lang (frame)
local getArgs = require ('Moduleমডিউল:Arguments').getArgs;
local synonym_table = mw.loadData ('Moduleমডিউল:Langভাষা/ISOআইওএস 639৬৩৯ synonymsপ্রতিশব্দসমূহ'); -- ISO 639-2/639-2T code translation to 639-1 code
local args = getArgs(frame);
local list = {};
৮৫ নং লাইন:
if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym
if (0 == namespace) then
table.insert (cats, table.concat ({'[[Categoryবিষয়শ্রেণী:Lang and lang-xx code promoted to ISO 639-1|', code ..']]'}));
end
table.insert (maint_msgs, ' <span class="lang-comment" style="font-style:normal; display:none; color:#33aa33; margin-left:0.3em">')
৯৫ নং লাইন:
if (0 == namespace) then -- when in article space
if lang:find ('error') then -- add error category (message provided by Module:Lang)
table.insert (cats, '[[Categoryবিষয়শ্রেণী:in lang templateটেমপ্লেট errorsত্রুটি]]');
elseif this_wiki_lang ~= code then -- categorize article only when code is not this wiki's language code
if lang:match ('%[%[.-|.-%]%]') then -- wikilinked individual language name
১০৪ নং লাইন:
 
if lang:find ('languages') then -- add appropriate language-name category
table.insert (cats, table.concat ({'[[Categoryবিষয়শ্রেণী:Articles with ', lang, '-collective sources (', code, ')]]'}));
else
table.insert (cats, table.concat ({'[[Categoryবিষয়শ্রেণী:Articles with ', lang, '-language sources (', code, ')]]'}));
end
end
১৩৭ নং লাইন:
table.insert (msg, '|help]])</span>');
if 0 == mw.title.getCurrentTitle().namespace then
table.insert (msg, '[[Categoryবিষয়শ্রেণী:Nihongo template errors]]');
end