Modul:Lang: Perbezaan antara semakan

Kandungan dihapus Kandungan ditambah
Azuru79 (bincang | sumb.)
k pengemasan sintaks (separa)
Azuru79 (bincang | sumb.)
pengemasan sintaks (separa)
Baris 112:
local count = 0
for _, arg in pairs {'italic', 'italics', 'i', 'italik'} do
if args[arg] then
count = count + 1
Baris 119:
 
if count > 1 then -- return nil and an error message if more than one is set
return nil, 'onlyhanya onesatu ofdari |italic=, |italics=, or |i= canatau |italik= beboleh specifieddiperincikan';
end
Baris 244:
 
if not is_set (source) then
return nil, nil, nil, nil, nil, 'missingteg languagebahasa taghilang';
end
 
Baris 299:
 
if not code then
return nil, nil, nil, nil, nil, table.concat ({'unrecognizedteg languagebahasa tagtidak diiktiraf: ', source}); -- don't know what we got but it is malformed
end
 
Baris 305:
if not (lang_data.override[code] or lang_name_table.lang[code]) then
return nil, nil, nil, nil, nil, table.concat ({'unrecognizedteg languagebahasa codetidak diiktiraf: ', code}); -- invalid language code, don't know about the others (don't care?)
end
if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym
table.insert (maint_cats, table.concat ({'LangKod andlang dan lang-xx code promoteddigalakkan toke ISO 639-1|', code}));
table.insert (maint_msgs, table.concat ({'codekod: ', code, ' promoteddigalakkan toke codekod: ', synonym_table[code]}));
code = synonym_table[code]; -- use the synonym
end
Baris 316:
if is_set (script) then
if is_set (args_script) then
return code, nil, nil, nil, nil, 'redundantteg scriptaksara taglewah'; -- both code with script and |script= not allowed
end
else
Baris 325:
script = script:lower(); -- ensure that we use and return lower case version of this
if not lang_name_table.script[script] then
return code, nil, nil, nil, nil, table.concat ({'unrecognizedaksara scripttidak diiktiraf: ', script, ' foruntuk codekod: ', code}); -- language code ok, invalid script, don't know about the others (don't care?)
end
end
if lang_name_table.suppressed[script] then -- ensure that code-script does not use a suppressed script
if in_array (code, lang_name_table.suppressed[script]) then
return code, nil, nil, nil, nil, table.concat ({'scriptaksara: ', script, ' nottidak supporteddisokong foruntuk codekod: ', code}); -- language code ok, script is suppressed for this code
end
end
Baris 336:
if is_set (region) then
if is_set (args_region) then
return code, nil, nil, nil, nil, 'redundantteg regionrantau taglewah'; -- both code with region and |region= not allowed
end
else
Baris 345:
region = region:lower(); -- ensure that we use and return lower case version of this
if not lang_name_table.region[region] then
return code, script, nil, nil, nil, table.concat ({'unrecognizedrantau regiontidak diiktiraf: ', region, ' foruntuk codekod: ', code});
end
end
Baris 351:
if is_set (variant) then
if is_set (args_variant) then
return code, nil, nil, nil, nil, 'redundantteg variantvarian taglewah'; -- both code with variant and |variant= not allowed
end
else
Baris 360:
variant = variant:lower(); -- ensure that we use and return lower case version of this
if not lang_name_table.variant[variant] then -- make sure variant is valid
return code, script, region, nil, nil, table.concat ({'unrecognizedvarian varianttidak diiktiraf: ', variant});
end -- does this duplicate/replace tests in lang() and lang_xx()?
if is_set (script) then -- if script set it must be part of the 'prefix'
if not in_array (table.concat ({code, '-', script}), lang_name_table.variant[variant]['prefixes']) then
return code, script, region, nil, nil, table.concat ({'unrecognizedvarian varianttidak diiktiraf: ', variant, ' foruntuk pasangan code-scriptaksara pairkod: ', code, '-', script});
end
else
if not in_array (code, lang_name_table.variant[variant]['prefixesawalan']) then
return code, script, region, nil, nil, table.concat ({'unrecognizedvarian varianttidak diiktiraf: ', variant, ' foruntuk codekod: ', code});
end
end
Baris 376:
private = private:lower(); -- ensure that we use and return lower case version of this
if not lang_data.override[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index
return code, script, region, nil, nil, table.concat ({'unrecognizedteg privatepersendirian tagtidak diiktiraf: ', private});
end
end
Baris 396:
category = 'transl';
else
category = 'lang anddan lang-xx'
end
Baris 679:
local function validate_text (template, args)
if not is_set (args.text) then
return make_error_msg ('notiada textteks', args, template);
end
 
if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes
return make_error_msg ('textteks hasmempunyai malformedpenanda markupcacat', args, template);
end
 
Baris 690:
if ('unset' ~= style) and ('invert' ~=style) then
if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic
return make_error_msg ('textteks hasmempunyai italicpenanda markupitalik', args, template);
end
end