forked from Mirror/pmbootstrap
pmb.helpers.locale: Use frozenset for primary_layouts (MR 2525)
This shouldn't change at runtime, so avoid any potential issues with it being a mutable class variable by making it immutable.
This commit is contained in:
parent
678ce1db52
commit
38b333372d
1 changed files with 32 additions and 30 deletions
|
@ -14,36 +14,38 @@ Locale and layout information is taken from:
|
||||||
|
|
||||||
|
|
||||||
class XkbLayout:
|
class XkbLayout:
|
||||||
primary_layouts = [
|
primary_layouts = frozenset(
|
||||||
"at",
|
[
|
||||||
"au",
|
"at",
|
||||||
"br",
|
"au",
|
||||||
"ca",
|
"br",
|
||||||
"ch",
|
"ca",
|
||||||
"de",
|
"ch",
|
||||||
"dk",
|
"de",
|
||||||
"ee",
|
"dk",
|
||||||
"es",
|
"ee",
|
||||||
"fi",
|
"es",
|
||||||
"fo",
|
"fi",
|
||||||
"fr",
|
"fo",
|
||||||
"gb",
|
"fr",
|
||||||
"ie",
|
"gb",
|
||||||
"is",
|
"ie",
|
||||||
"it",
|
"is",
|
||||||
"latam",
|
"it",
|
||||||
"lt",
|
"latam",
|
||||||
"mt",
|
"lt",
|
||||||
"nz",
|
"mt",
|
||||||
"pl",
|
"nz",
|
||||||
"pt",
|
"pl",
|
||||||
"ro",
|
"pt",
|
||||||
"se",
|
"ro",
|
||||||
"sk",
|
"se",
|
||||||
"tr",
|
"sk",
|
||||||
"us",
|
"tr",
|
||||||
"vn",
|
"us",
|
||||||
]
|
"vn",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self, layout: str = "us", variant: str = ""):
|
def __init__(self, layout: str = "us", variant: str = ""):
|
||||||
self.layout = layout
|
self.layout = layout
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue