మాడ్యూల్:ISO 639 name: కూర్పుల మధ్య తేడాలు

Content deleted Content added
చి cleanup;
దిద్దుబాటు సారాంశం లేదు
పంక్తి 317:
return error_msg ('not_part', part); -- part is not an ISO 639 part
end
end
 
local name_data = mw.loadData ('Module:Language/data/ISO 639 override').override; -- first check the override data
local code; -- place to hold the code if not a 2-character code
for k, v in pairs (name_data) do -- spin through the override table
if lc_name == v[1]:lower() then -- if name is found and
if part then -- when part specified
if 1 == part then -- if looking for part 1 codes
if 2 == #k then
return k; -- return 2 char code; don't care about 3 char codes here
end
else -- parts 2, 3, 5
if 3 == #k then
return k; -- return 3 char code
end
end
else -- part not specified
if 2 == #k then
return k; -- always return 2 char code when found
else
code = k; -- save 3 char code in case there isn't a 2 char code
end
end
end
end
if code then -- has a value if we found a 3-character code
return code;
end
 
Line 339 ⟶ 367:
end
else
return error_msg ('not_found', {name, part or '1, -2, -3, -5'});
end
end
"https://te.wikipedia.org/wiki/మాడ్యూల్:ISO_639_name" నుండి వెలికితీశారు