11.314
suntingan
Tidak ada ringkasan suntingan |
Tidak ada ringkasan suntingan |
||
| (2 revisi perantara oleh pengguna yang sama tidak ditampilkan) | |||
| Baris 4: | Baris 4: | ||
local categories = { | local categories = { | ||
party_not_in_list = '[[Category: | party_not_in_list = '[[Category:Halaman menggunakan Partai politik dengan partai tak dikenal]]', | ||
shortname_not_in_list = '[[Category: | shortname_not_in_list = '[[Category:Halaman menggunakan Partai politik yang tak punya nama penyebutan]]', | ||
color_not_in_list = '[[Category: | color_not_in_list = '[[Category:Halaman menggunakan Partai politik dengan warna yang tak dikenal]]', | ||
} | } | ||
| Baris 46: | Baris 46: | ||
local out_type = stripToNil(args[2]) | local out_type = stripToNil(args[2]) | ||
-- if out_type == 'colour' then | -- if out_type == 'colour' then | ||
-- out_type = ' | -- out_type = 'warna' | ||
-- end | -- end | ||
if out_type == 'colour' then | if out_type == 'colour' then | ||
out_type = ' | out_type = 'warna' | ||
end | end | ||
local index = getFirstLetter(party) | local index = getFirstLetter(party) | ||
| Baris 77: | Baris 77: | ||
if not party_info then | if not party_info then | ||
-- if out_type == 'color' then | -- if out_type == 'color' then | ||
if out_type == ' | if out_type == 'warna' then | ||
return args.error or default_color | return args.error or default_color | ||
else | else | ||
| Baris 86: | Baris 86: | ||
if return_value == "" then | if return_value == "" then | ||
-- if out_type == 'color' then | -- if out_type == 'color' then | ||
if out_type == ' | if out_type == 'warna' then | ||
return args.error or create_error("Value not in template. Please request that it be added.") | return args.error or create_error("Value not in template. Please request that it be added.") | ||
elseif out_type == ' | elseif out_type == 'singkatan' then | ||
if party_info.shortname ~= "" then | if party_info.shortname ~= "" then | ||
return party_info.shortname | return party_info.shortname | ||
| Baris 95: | Baris 95: | ||
end | end | ||
elseif out_type == 'shortname' then | elseif out_type == 'shortname' then | ||
if party_info. | if party_info.singkatan ~= "" then | ||
return party_info. | return party_info.singkatan | ||
else | else | ||
return party | return party | ||
| Baris 106: | Baris 106: | ||
-- if out_type == 'color' and string.find(return_value, '#') then | -- if out_type == 'color' and string.find(return_value, '#') then | ||
if out_type == ' | if out_type == 'warna' and string.find(return_value, '#') then | ||
return_value = string.gsub(return_value, '#', '#') | return_value = string.gsub(return_value, '#', '#') | ||
end | end | ||