User:Utcursch/Migrate Infobox Indian Jurisdiction to Infobox settlement/main.js: Difference between revisions
Content deleted Content added
m m |
m changes suggested by Dr. Blofeld |
||
Line 103:
*/
migrateIIJ.prepareInfoboxSettlement = function (orig_infobox_params) {
// state name
// Location map
var pushpin_map = "India";
if (
pushpin_map = "India " +
}
Line 119 ⟶ 126:
// make list of subdivisions
var subdivisions = [];
if (
subdivisions["[[States and territories of India|State]]"] =
}
if (orig_infobox_params["region"]) {
subdivisions["[[List of regions of India|Region]]"] = orig_infobox_params["region"];
}
if (orig_infobox_params["division"]) {
Line 129 ⟶ 136:
}
if (orig_infobox_params["district"]) {
subdivisions["[[List of districts of India|District]]"] = orig_infobox_params["district"];
}
if (orig_infobox_params["metro"]) {
Line 152 ⟶ 159:
languages["Official"] = orig_infobox_params["official_languages"];
} else {
▲ var state_name = orig_infobox_params["state_name"] ? orig_infobox_params["state_name"] : "";
▲ // strip [[]]
▲ state_name = state_name.replace("[[", "");
▲ state_name = state_name.replace("]]", "");
if (state_name != "") {
languages["Official"] = getOfficialLanguage(state_name);
|