Módulo:Road data/strings/USA

Origem: Wikipédia, a enciclopédia livre.
--[==[
To inspect the content of this data module, use [[Special:ExpandTemplates]]
and enter the following input text:
  {{#invoke:Road data/dump|dump|module=Module:<name-of-this-module>}}

To inspect the content of this data module when editing, enter the following
into the Debug console:
  local util = require("Module:Road data/util")
  print(util.arrayToString(p))
To inspect a particular route type, change `p` above to include the route type,
e.g., `p.I` and `p["US-Hist"]`.
]==]

-- United States
local USA = {}

local util = require("Module:Road data/util")
local format = mw.ustring.format


--[[ REGION-SPECIFIC SETTINGS ]]--
USA[" common "] = {
    country = "United States",
    locations = {
        indep_city = {
            linksuffix = ", %region%",
            prefix = "[[Cidade independente (Estados Unidos)|Cidade]] de ",
            jcttoparticle = "o "
        },
        sub1 = {
            linksuffix = " Condado, %region%",
            jcttopnamesuffix = " Condado"
        },
        sub2 = {
            linksuffix = "[sub1dab||, %sub1dab% Condado|], %region%"
        },
        sub2areas = {
            city = {
                linksuffix = " (cidade)",
                jcttoparticle = "a ",
                nameprefix = "Cidade de "
            },
            town = {
                linksuffix = " (cidade)",
                jcttoparticle = "a ",
                nameprefix = "Cidade de "
            },
            township = {
                linksuffix = " Município",
                namesuffix = " Município",
            },
            village = {
                linksuffix = " (vila)",
                jcttoparticle = "a ",
                nameprefix = "Vila de "
            }
        }
    }
}

--[[ ROUTE TYPES ]]--
-- disambiguation switch
USA[" dab "] = "[dab|| (%dab%)|]"

-- definitions for auxiliary routes
USA[" aux "] = {
    Alt = {
        name = "Alternado",
        abbrsuffix = "Alt.",
        bannerprefix = "Alt"
    },
    Bus = {
        name = "Negócio",
        abbrsuffix = "Bus."
    },
    Byp = {
        name = "Bypass",
        abbrsuffix = "Byp.",
        bannerprefix = "By-pass",
        aux = "[[:en:Bypass (road)|Bypass]]"
    },
    Conn = {
        name = "Conector",
        abbrsuffix = "Conn."
    },
    Loop = {name = "Loop"},
    Opt = {
        name = "Opcional",
        abbrsuffix = "Opt."
    },
    Scenic = {name = "Escénico"},
    Spur = {name = "Spur"},
    Temp = {
        name = "Temporário",
        abbrsuffix = "Temp."
    },
    Truck = {name = "Truck"},
}
-- fill out default values
for _,entry in pairs(USA[" aux "]) do
    entry.abbrsuffix = entry.abbrsuffix or entry.name
    entry.bannerprefix = entry.bannerprefix or entry.name
    entry.aux = entry.aux or format("[[%s route]]", entry.name)
end

-- &nbsp; is nonbreaking space.
-- &#8209; is nonbreaking hyphen.

USA.I = {
    base = "Interstate %route%",
    shield = "I-%route%.svg",
    shieldmain= {
        arg = "state",
        ["AK"] = "I-A%route%.svg",
        ["AL"] = "I-%route% (AL).svg",
        ["AR"] = "I-%route% (AR).svg",
        ["AZ"] = "I-%route% (AZ).svg",
        ["CA"] = "I-%route% (CA).svg",
        ["HI"] = "I-H%route%.svg",
        ["IA"] = "I-%route% (IA).svg",
        ["KS"] = "I-%route% (KS).svg",
        ["MT"] = "I-%route% (big).svg",
        ["NJ"] = "I-%route% (NJ).svg",
        ["NM"] = "I-%route% (NM).svg",
        ["NV"] = "I-%route% (NV).svg",
        ["NY"] = "I-%route% (long).svg",
        ["OK"] = "I-%route% (OK).svg",
        ["PR"] = "I-PR%route%.svg",
        ["SC"] = "I-%route% (SC).svg",
        ["TX"] = "I-%route% (TX).svg",
        ["UT"] = "I-%route% (UT).svg",
        ["WV"] = "I-%route% (WV).svg",
        ["WY"] = "I-%route% (WY).svg",
        default = {
            ["495"] = {"I-%route%.svg", "Capbeltwaysign.svg"},
            default = "I-%route%.svg"
        }
    },
    name = "Interstate %route%",
    link = "Interstate %route%" .. USA[" dab "],
    abbr = "I-%route%",
    width = "expand",
    bannersuffix = "blue",
    browse = {
        {link = "Interstate Highway System", bold = true},
        {
            noprint = true,
            {link = ":en:List of Interstate Highways", name = "Main"},
            {link = ":en:List of auxiliary Interstate Highways", name = "Auxiliary"},
            {link = ":en:List of suffixed Interstate Highways", name = "Suffixed"},
            {link = ":en:List of business routes of the Interstate Highway System", name = "Business"}
        }
    }
}

USA["I-Alt"] = {
    shield = USA.I.shield,
    shieldmain = USA.I.shield,
    name = USA.I.name .. " Alternate",
    link = USA.I.base .. " Alternate" .. USA[" dab "],
    abbr = USA.I.abbr .. " Alt.",
    banner = "Alternate plate blue.svg",
    bannersuffix = USA.I.bannersuffix,
    aux = "Rota alterna",
    width = "expand",
    browse = USA.I.browse
}

USA["I-Toll"] = {
    shield = USA.I.shield,
    name = USA.I.name .. " Pedágio",
    link = USA.I.link,
    abbr = USA.I.abbr,
    banner = "Toll plate yellow.svg",
    bannersuffix = USA.I.bannersuffix,
    width = "expand",
    browse = USA.I.browse
}

USA["I-Future"] = {
    shield = "I-%route% (Future).svg",
    name = USA.I.name,
    link = USA.I.link,
    abbr = "Future " .. USA.I.abbr,
    bannersuffix = USA.I.bannersuffix,
    browse = USA.I.browse
}

USA.Future = USA["I-Future"]

USA["I 1957"] = {
    shield = "I-%route% (1957).svg",
    shieldmain = "I-%route% (%state% 1957).svg",
    name = USA.I.name,
    link = USA.I.link,
    abbr = USA.I.abbr,
    browse = USA.I.browse
}

USA["I 1961"] = {
    shield = {
        hook = "splitlen",
        split = 3,
        above = "I-%route% (1961).svg",
        below = "I-%route% (1957).svg"
    },
    shieldmain = {
        hook = "splitlen",
        split = 3,
        above = "I-%route% (%state% 1961).svg",
        below = "I-%route% (%state% 1957).svg"
    },
    name = USA.I.name,
    link = USA.I.link,
    abbr = USA.I.abbr,
    browse = USA.I.browse
}

USA.BL = {
    shield = "Business Loop %route%.svg",
    shieldmain = "Business Loop %route%.svg",
    name = USA.I.name .. " Business",
    link = USA.I.base .. " Business" .. USA[" dab "],
    abbr = USA.I.abbr .. " BL",
    aux = "[[List of business routes of the Interstate Highway System|Business route]]",
    browse = USA.I.browse,
    width = "expand"
}

USA.BS = {
    shield = "Business Spur %route%.svg",
    shieldmain = "Business Spur %route%.svg",
    name = USA.BL.name,
    link = USA.BL.link,
    abbr = USA.I.abbr .. " BS",
    aux = USA.BL.aux,
    browse = USA.I.browse,
    width = "expand"
}

USA["BL 1957"] = {
    shield = "Business Loop %route% (1957).svg",
    shieldmain = "Business Loop %route% (%state% 1957).svg",
    name = USA.BL.name,
    link = USA.BL.link,
    abbr = USA.BL.abbr,
    aux = USA.BL.aux,
    browse = USA.I.browse
}

USA["BS 1957"] = {
    shield = "Business Spur %route% (1957).svg",
    shieldmain = "Business Spur %route% (%state% 1957).svg",
    name = USA.BS.name,
    link = USA.BS.link,
    abbr = USA.BS.abbr,
    aux = USA.BS.aux,
    browse = USA.I.browse
}

USA.US = {
    base = "U.S. Route %route%",
    shield = {
        arg = "state",
        ["CA"] = "US %route% (1961 cutout).svg",
        default = "US %route%.svg"
    },
    shieldmain = {
        arg = "state",
        ["CA"] = "US %route% (1961 cutout).svg",
        default = {
            ["85"] = {"US %route%.svg", "CanAm Highway.svg"},
            default = "US %route%.svg"
        }
    },
    name = "U.S. Route %route%",
    link = "U.S. Route %route%" .. USA[" dab "],
    abbr = "US&nbsp;%route%",
    width = "expand",
    browse = {
        {link = "United States Numbered Highway System", bold = true},
        {noprint = true,
            {link = "List of U.S. Routes", name = "Main"},
            {link = "List of bannered U.S. Routes", name = "Bannered"},
            {link = "List of divided U.S. Routes", name = "Divided"},
            {link = "List of highways bypassed by Interstate Highways", name = "Replaced"}
        }
    }
}

USA.road = {
    shield = '',
    shieldmain = '',
    name = "%route%",
    link = '',
    abbr = "%route%",
    browse = '',
}

for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
    local spec = USA[" aux "][auxType]
    USA["US-" .. auxType] = {
        shield = USA.US.shield,
        shieldmain = USA.US.shield,
        name = USA.US.name .. " " .. spec.name,
        link = USA.US.base .. " " .. spec.name .. USA[" dab "],
        abbr = USA.US.abbr .. " " .. spec.abbrsuffix,
        banner = spec.bannerprefix .. " plate.svg",
        aux = spec.aux,
        width = "expand",
        browse = USA.US.browse
    }
end

USA["US-Hist"] = {
    shield = "US %route% (historic).svg",
    shieldmain = {
        arg = "state",
        default = "US 66 (historic).svg",
        "US %route% (%state% historic).svg"
    },
    name = "Historic " .. USA.US.name,
    link = USA.US.base .. USA[" dab "],
    abbr = "Historic " .. USA.US.abbr .. USA[" dab "],
    orientation = "upright",
    color = "hist",
    browse = USA.US.browse
}

for _,year in ipairs({"1926", "1948", "1961"}) do
    USA["US " .. year] = {
        shield = format("US %%route%% (%s).svg", year),
        shieldmain = format("US %%route%% (%s).svg", year),
        base = USA.US.base,
        name = USA.US.name,
        link = USA.US.link,
        abbr = USA.US.abbr,
        width = "square",
        browse = USA.US.browse
    }
end

USA.FFH = {
    shield = "Forest Route %route%.svg",
    name = "Federal Forest Highway %route%",
    link = "Forest Highway %route%",
    abbr = "FFH&nbsp;%route%",
    color = "hist"
}
        
USA.FH = {
    shield = "Forest Route %route%.svg",
    name = "Forest Highway %route%",
    link = "Forest Highway %route%",
    abbr = "FH&nbsp;%route%",
    color = "hist"
}
         
USA.FR = {
    shield = "Forest Route %route%.svg",
    name = "Forest Route %route%",
    link = "Forest Highway %route%",
    abbr = "FR&nbsp;%route%",
    color = "hist"
}
         
USA.NSB = {
    shield = "MUTCD D6-4.svg",
    name = "%route%",
    link = "%route%",
    abbr = "%route%",
    color = "hist"
}
         
USA.CR = {
    shield = "CR %route% jct.svg",
    shieldmain = "[county||%county% |]County %route%.svg",
    base = "County Road %route%",
    name = "County Road %route%",
    link = "",
    abbr = "CR %route%"
}
         
-- https://mutcd.fhwa.dot.gov/resources/interim_approval/ialistreq.htm#ia15
USA.USBR = {
    shield = {
        arg = "state",
        ["AZ"] = "US Bike %route% (M1-9 IA-15).svg",
        ["CA"] = "US Bike %route% (M1-9 IA-15).svg",
        ["GA"] = "US Bike %route% (M1-9 IA-15).svg",
        ["ID"] = "US Bike %route% (M1-9 IA-15).svg",
        ["IL"] = "US Bike %route% (M1-9 IA-15).svg",
        ["IN"] = "US Bike %route% (M1-9 IA-15).svg",
        ["KY"] = "US Bike %route% (M1-9 IA-15).svg",
        ["MD"] = "US Bike %route% (M1-9 IA-15).svg",
        ["MI"] = "US Bike %route% (M1-9 IA-15).svg",
        ["MO"] = "US Bike %route% (M1-9 IA-15).svg",
        ["TN"] = "US Bike %route% (M1-9 IA-15).svg",
        ["UT"] = "US Bike %route% (M1-9 IA-15).svg",
        ["VA"] = "US Bike %route% (M1-9 IA-15).svg",
        default = "US Bike %route% (M1-9).svg"
    },
    shieldmain = {
        arg = "state",
        ["AZ"] = "US Bike %route% (M1-9 IA-15).svg",
        ["CA"] = "US Bike %route% (M1-9 IA-15).svg",
        ["GA"] = "US Bike %route% (M1-9 IA-15).svg",
        ["ID"] = "US Bike %route% (M1-9 IA-15).svg",
        ["IL"] = "US Bike %route% (M1-9 IA-15).svg",
        ["IN"] = "US Bike %route% (M1-9 IA-15).svg",
        ["KY"] = "US Bike %route% (M1-9 IA-15).svg",
        ["MD"] = "US Bike %route% (M1-9 IA-15).svg",
        ["MI"] = "US Bike %route% (M1-9 IA-15).svg",
        ["MO"] = "US Bike %route% (M1-9 IA-15).svg",
        ["TN"] = "US Bike %route% (M1-9 IA-15).svg",
        ["UT"] = "US Bike %route% (M1-9 IA-15).svg",
        ["VA"] = "US Bike %route% (M1-9 IA-15).svg",
        default = "US Bike %route% (M1-9).svg"
    },
    name = "U.S. Bicycle Route %route%",
    link = "U.S. Bicycle Route %route%",
    abbr = "USBR %route%"
}

util.addAll(USA, require("Module:Road data/strings/USA/regional/GRR"))
util.addAll(USA, require("Module:Road data/strings/USA/regional/NER"))
util.addAll(USA, require("Module:Road data/strings/USA/regional/Tour"))
util.addAll(USA, require("Module:Road data/strings/USA/regional/Trails"))

return USA