diff --git a/src/classes/__init__.py b/src/classes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/classes/keymap.py b/src/classes/keymap.py new file mode 100644 index 0000000..9b1f43f --- /dev/null +++ b/src/classes/keymap.py @@ -0,0 +1,24 @@ +# keymap.py + +# +# Copyright 2022 user + +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +class keymap: + def __init__(self, layout, variant, backend_layout): + self.layout = layout + self.variant = variant + self.backend_layout = backend_layout diff --git a/src/classes/locale.py b/src/classes/locale.py new file mode 100644 index 0000000..e397e03 --- /dev/null +++ b/src/classes/locale.py @@ -0,0 +1,24 @@ +# locale.py + +# +# Copyright 2022 user + +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +class locale: + def __init__(self, locales, region, location): + self.locales = locales + self.region = region + self.location = location diff --git a/src/classes/meson.build b/src/classes/meson.build new file mode 100644 index 0000000..6d9f5c1 --- /dev/null +++ b/src/classes/meson.build @@ -0,0 +1,9 @@ +pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) +classesdir = join_paths(pkgdatadir, 'jade_gui/classes') + +jade_gui_sources = [ + '__init__.py', + 'locale.py', + 'keymap.py', +] +install_data(jade_gui_sources, install_dir: classesdir) \ No newline at end of file diff --git a/src/functions/keyboard_screen.py b/src/functions/keyboard_screen.py index dad22ed..2009b75 100644 --- a/src/functions/keyboard_screen.py +++ b/src/functions/keyboard_screen.py @@ -25,42 +25,61 @@ from gettext import gettext as _ class KeyboardScreen(Adw.Bin): __gtype_name__ = 'KeyboardScreen' - event_controller = Gtk.EventControllerKey.new() - #carousel = Gtk.Template.Child() + layout_event_controller = Gtk.EventControllerKey.new() + variant_event_controller = Gtk.EventControllerKey.new() - ### Page and widgets for keyboard screen - # keyboard_page = Gtk.Template.Child() - keyboard_entry_search = Gtk.Template.Child() - keyboard_search = Gtk.Template.Child() keyboard_carousel = Gtk.Template.Child() list_keyboard_layouts = Gtk.Template.Child() list_keyboard_variants = Gtk.Template.Child() keyboard_layouts = Gtk.Template.Child() keyboard_variants = Gtk.Template.Child() + layout_search = Gtk.Template.Child() + layout_entry_search = Gtk.Template.Child() + variant_search = Gtk.Template.Child() + variant_entry_search = Gtk.Template.Child() def __init__(self, window, main_carousel, next_page, application, **kwargs): super().__init__(**kwargs) self.window = window self.carousel = main_carousel self.next_page = next_page - ### Widgets for third page (keyboard layout) - self.keyboard_search.set_key_capture_widget(self) self.list_keyboard_layouts.connect("row-selected", self.selected_layout) self.list_keyboard_variants.connect("row-selected", self.selected_variant) + self.layout_event_controller.connect("key-released", self.search_layouts) + self.variant_event_controller.connect("key-released", self.search_variants) + self.layout_entry_search.add_controller(self.layout_event_controller) + self.variant_entry_search.add_controller(self.variant_event_controller) - def search_keyboards(self, *args): - pass + def search_layouts(self, *args): + terms = self.layout_entry_search.get_text() + self.list_keyboard_layouts.set_filter_func(self.filter_text, terms) + + def search_variants(self, *args): + print("in variant") + terms = self.variant_entry_search.get_text() + self.list_keyboard_variants.set_filter_func(self.filter_text, terms) def selected_layout(self, widget, row): - if row is not None: + if row is not None or row is not self.layout_entry_search: self.keyboard_carousel.scroll_to(self.keyboard_variants, True) else: print("row is none!! layout") def selected_variant(self, widget, row): - if row is not None: + if row is not None or row is not self.variant_entry_search: print("variant selected") self.carousel.scroll_to(self.next_page, True) else: print("row is none!! variant") + @staticmethod + def filter_text(row, terms=None): + try: + text = row.get_title() + text = text.lower() + row.get_subtitle().lower() + if terms.lower() in text: + return True + except: + print("exception") + return True + return False diff --git a/src/functions/timezone_screen.py b/src/functions/timezone_screen.py index 3a3327b..ba6df34 100644 --- a/src/functions/timezone_screen.py +++ b/src/functions/timezone_screen.py @@ -26,10 +26,8 @@ class TimezoneScreen(Adw.Bin): __gtype_name__ = 'TimezoneScreen' event_controller = Gtk.EventControllerKey.new() - #carousel = Gtk.Template.Child() ### Page and widgets on timezone screen - #timezone_page = Gtk.Template.Child() list_timezones = Gtk.Template.Child() timezone_entry_search = Gtk.Template.Child() timezone_search = Gtk.Template.Child() @@ -40,29 +38,29 @@ class TimezoneScreen(Adw.Bin): self.carousel = main_carousel self.next_page = next_page - - ### Widgets for second page (timezone selection) self.event_controller.connect("key-released", self.search_timezones) self.timezone_entry_search.add_controller(self.event_controller) - self.timezone_search.set_key_capture_widget(self) self.list_timezones.connect("row-selected", self.selected_timezone) - ### --------- def selected_timezone(self, widget, row): - if row is not None: + print(row) + if row is not None or row is not self.timezone_search: print(row.get_title()) self.carousel.scroll_to(self.next_page, True) else: print("row is none!!") def search_timezones(self, *args): - terms = self.entry_search.get_text() + terms = self.timezone_entry_search.get_text() self.list_timezones.set_filter_func(self.filter_timezones, terms) @staticmethod def filter_timezones(row, terms=None): - text = row.get_title() - text = text.lower() + row.get_subtitle().lower() - if terms.lower() in text: + try: + text = row.get_title() + text = text.lower() + row.get_subtitle().lower() + if terms.lower() in text: + return True + except: return True return False diff --git a/src/keymaps.py b/src/keymaps.py new file mode 100644 index 0000000..839beb0 --- /dev/null +++ b/src/keymaps.py @@ -0,0 +1,1142 @@ +from jade_gui.classes.keymap import keymap + +keymaps = [ + keymap( + layout="Afghanistan", + backend_layout="Af", + variant=[ + "normal", + "fa-olpc", + "olpc-ps", + "ps", + "uz", + "uz-olpc", + ], + ), + keymap( + layout="Albania", + backend_layout="al", + variant=[ + "normal", + "plisi", + "veqilharxhi", + ], + ), + keymap( + layout="Armenia", + backend_layout="am", + variant=[ + "normal", + "eastern", + "eastern-alt", + "phonetic", + "phonetic-alt", + "western", + ], + ), + keymap( + layout="Arabic", + backend_layout="ara", + variant=[ + "normal", + "azerty", + "azerty_digits", + "buckwalter", + "digits", + "mac", + "olpc", + "qwerty", + "qwerty_digits", + ], + ), + keymap( + layout="Austria", + backend_layout="at", + variant=[ + "normal", + "mac", + "nodeadkeyrs", + ], + ), + keymap( + layout="Australia", + backend_layout="au", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Azerbaijan", + backend_layout="az", + variant=[ + "normal", + "cyrillic", + ], + ), + keymap( + layout="Bosnia and Herzegovina", + backend_layout="ba", + variant=[ + "normal", + "alternatequotes", + "unicode", + "unicodeus", + "us", + ], + ), + keymap( + layout="Bangladesh", + backend_layout="bd", + variant=[ + "normal", + "probhat", + ], + ), + keymap( + layout="Belgium", + backend_layout="be", + variant=[ + "normal", + "iso-alternate", + "nodeadkeys", + "oss", + "oss_latin9", + "wang", + ], + ), + keymap( + layout="Bulgaria", + backend_layout="bg", + variant=[ + "normal", + "bas_phonetic", + "bekl", + "phonetic", + ], + ), + keymap( + layout="Brazil", + backend_layout="br", + variant=[ + "normal", + "dvorak", + "nativo", + "nativo-epo", + "nativo-us", + "nodeadkeys", + "thinkpad", + ], + ), + keymap( + layout="Bhutan", + backend_layout="bt", + variant=[ + "normal", + "latin", + ], + ), + keymap( + layout="Botswana", + backend_layout="bw", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Belarus", + backend_layout="by", + variant=[ + "normal", + "intl", + "latin", + "legacy", + "ru", + ], + ), + keymap( + layout="Canada", + backend_layout="ca", + variant=[ + "normal", + "eng", + "fr-dvorak", + "fr-legacy", + "ike", + "multi", + "multi-2gr", + "multix", + ], + ), + keymap( + layout="Democratic Republic of Congo", + backend_layout="cd", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Switzerland", + backend_layout="ch", + variant=[ + "normal", + "de_mac", + "de_nodeadkeys", + "fr", + "fr_mac", + "fr_nodeadkeys", + "legacy", + ], + ), + keymap( + layout="Cameroon", + backend_layout="cm", + variant=[ + "normal", + "azerty", + "dvorak", + "french", + "mmuock", + "qwerty", + ], + ), + keymap( + layout="China", + backend_layout="cn", + variant=[ + "normal", + "altgr-pinyin", + "mon_manchu_galik", + "mon_todo_galik", + "mon_trad", + "mon_trad_galik", + "mon_trad_manchu", + "mon_trad_todo", + "mon_trad_xibe", + "tib", + "tib_asciinum", + "ug", + ], + ), + keymap( + layout="Czechia", + backend_layout="cz", + variant=[ + "normal", + "bksl", + "dvorak-ucw", + "qwerty", + "qwerty-mac", + "qwerty_bksl", + "rus", + "ucw", + ], + ), + keymap( + layout="Germany", + backend_layout="de", + variant=[ + "normal", + "T3", + "deadacute", + "deadgraveacute", + "deadtilde", + "dsb", + "dsb_qwertz", + "dvorak", + "e1", + "e2", + "mac", + "mac_nodeadkeys", + "neo", + "nodeadkeys", + "qwerty", + "ro", + "ro_nodeadkeys", + "ru", + "tr", + "us", + ], + ), + keymap( + layout="Denmark", + backend_layout="dk", + variant=[ + "normal", + "dvorak", + "mac", + "mac_nodeadkeys", + "nodeadkeys", + "winkeys", + ], + ), + keymap( + layout="Algeria", + backend_layout="dz", + variant=[ + "normal", + "ar", + "azerty-deadkeys", + "ber", + "qwerty-gb-deadkeys", + "qwerty-us-deadkeys", + ], + ), + keymap( + layout="Estonia", + backend_layout="ee", + variant=[ + "normal", + "dvorak", + "nodeadkeys", + "us", + ], + ), + keymap( + layout="Spain", + backend_layout="es", + variant=[ + "normal", + "ast", + "cat", + "deadtilde", + "dvorak", + "mac", + "nodeadkeys", + "winkeys", + ], + ), + keymap( + layout="Ethiopia", + backend_layout="et", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Finland", + backend_layout="fi", + variant=[ + "normal", + "normal" + "classic", + "mac", + "nodeadkeys", + "smi", + "winkeys", + ], + ), + keymap( + layout="Faroe Islands", + backend_layout="fo", + variant=[ + "normal", + "nodeadkeys", + ], + ), + keymap( + layout="France", + backend_layout="fr", + variant=[ + "normal", + "afnor", + "azerty", + "bepo", + "bepo_afnor", + "bepo_latin9", + "bre", + "dvorak", + "geo", + "latin9", + "latin9_nodeadkeys", + "mac", + "nodeadkeys", + "oci", + "oss", + "oss_latin9", + "oss_nodeadkeys", + "us", + ], + ), + keymap( + layout="Great Britian", + backend_layout="gb", + variant=[ + "normal", + "colemak", + "colemak_dh", + "dvorak", + "dvorakukp", + "extd", + "intl", + "mac", + "mac_intl", + "pl", + ], + ), + keymap( + layout="Georgia", + backend_layout="ge", + variant=[ + "normal", + "ergonomic", + "mess", + "os", + "ru", + ], + ), + keymap( + layout="Ghana", + backend_layout="gh", + variant=[ + "normal", + "akan", + "avn", + "ewe", + "fula", + "ga", + "generic", + "gillbt", + "hausa", + ], + ), + keymap( + layout="Guinea", + backend_layout="gn", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Greece", + backend_layout="gr", + variant=[ + "normal", + "extended", + "nodeadkeys", + "polytonic", + "simple", + ], + ), + keymap( + layout="Croatia", + backend_layout="hr", + variant=[ + "normal", + "alternatequotes", + "unicode", + "unicodeus", + "us", + ], + ), + keymap( + layout="Hungary", + backend_layout="hu", + variant=[ + "normal", + "101_qwerty_comma_dead", + "101_qwerty_comma_nodead", + "101_qwerty_dot_dead", + "101_qwerty_dot_nodead", + "101_qwertz_comma_dead", + "101_qwertz_comma_nodead", + "101_qwertz_dot_dead", + "101_qwertz_dot_nodead", + "102_qwerty_comma_dead", + "102_qwerty_comma_nodead", + "102_qwerty_dot_dead", + "102_qwerty_dot_nodead", + "102_qwertz_comma_dead", + "102_qwertz_comma_nodead", + "102_qwertz_dot_dead", + "102_qwertz_dot_nodead", + "nodeadkeys", + "qwerty", + "standard", + ], + ), + keymap( + layout="Indonesia", + backend_layout="id", + variant=[ + "normal", + "phoneticx", + ], + ), + keymap( + layout="Ireland", + backend_layout="ie", + variant=[ + "normal", + "CloGaelach", + "UnicodeExpert", + "ogam", + "ogam_is434", + ], + ), + keymap( + layout="Israel", + backend_layout="il", + variant=[ + "normal", + "biblical", + "lyx", + "phonetic", + ], + ), + keymap( + layout="India", + backend_layout="in", + variant=[ + "normal", + "ben", + "ben_baishakhi", + "ben_bornona", + "ben_gitanjali", + "ben_inscript", + "ben_probhat", + "bolnagri", + "eeyek", + "eng", + "guj", + "guru", + "hin-kagapa", + "hin-wx", + "iipa", + "jhelum", + "kan", + "kan-kagapa", + "mal", + "mal_enhanced", + "mal_lalitha", + "mar-kagapa", + "marathi", + "olck", + "ori", + "ori-bolnagri", + "ori-wx", + "san-kagapa", + "tam", + "tam_tamilnet", + "tam_tamilnet_TAB", + "tam_tamilnet_TSCII", + "tam_tamilnet_with_tam_nums", + "tel", + "tel-kagapa", + "tel-sarala", + "urd-phonetic", + "urd-phonetic3", + "urd-winkeys", + ], + ), + keymap( + layout="Iraq", + backend_layout="iq", + variant=[ + "normal", + "ku", + "ku_alt", + "ku_ara", + "ku_f", + ], + ), + keymap( + layout="Iran", + backend_layout="ir", + variant=[ + "normal", + "ku", + "ku_alt", + "ku_ara", + "ku_f", + "pes_keypad", + ], + ), + keymap( + layout="Iceland", + backend_layout="is", + variant=[ + "normal", + "ku", + "ku_alt", + "ku_ara", + "ku_f", + "pes_keypad", + ], + ), + keymap( + layout="Italy", + backend_layout="it", + variant=[ + "normal", + "fur", + "geo", + "ibm", + "intl", + "mac", + "nodeadkeys", + "scn", + "us", + "winkeys", + ], + ), + keymap( + layout="Japan", + backend_layout="jp", + variant=[ + "normal", + "OADG109A", + "dvorak", + "kana", + "kana86", + "mac", + ], + ), + keymap( + layout="Kenya", + backend_layout="ke", + variant=[ + "normal", + "kik", + ], + ), + keymap( + layout="Kyrgyzstan", + backend_layout="kg", + variant=[ + "normal", + "phonetic", + ], + ), + keymap( + layout="Cambodia", + backend_layout="kh", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="The Republic of Korea", + backend_layout="kr", + variant=[ + "normal", + "kr104", + ], + ), + keymap( + layout="Kazakhstan", + backend_layout="kz", + variant=[ + "normal", + "ext", + "kazrus", + "latin", + "ruskaz", + ], + ), + keymap( + layout="Laos", + backend_layout="la", + variant=[ + "normal", + "stea", + ], + ), + keymap( + layout="Sri Lanka", + backend_layout="lk", + variant=[ + "normal", + "tam_TAB", + "tam_unicode", + "us", + ], + ), + keymap( + layout="Lithuania", + backend_layout="lt", + variant=[ + "normal", + "ibm", + "lekp", + "lekpa", + "ratise", + "sgs", + "std", + "us", + ], + ), + keymap( + layout="Lativa", + backend_layout="lv", + variant=[ + "normal", + "adapted", + "apostrophe", + "ergonomic", + "fkey", + "modern", + "tilde", + ], + ), + keymap( + layout="Morocco", + backend_layout="ma", + variant=[ + "normal", + "french", + "tifinagh", + "tifinagh-alt", + "tifinagh-alt-phonetic", + "tifinagh-extended", + "tifinagh-extended-phonetic", + "tifinagh-phonetic", + ], + ), + keymap( + layout="Moldova", + backend_layout="md", + variant=[ + "normal", + "gag", + ], + ), + keymap( + layout="Montenegro", + backend_layout="me", + variant=[ + "normal", + "cyrillic", + "cyrillicalternatequotes", + "cyrillicyz", + "latinalternatequotes", + "latinunicode", + "latinunicodeyz", + "latinyz", + ], + ), + keymap( + layout="Republic of North Macedonia", + backend_layout="mk", + variant=[ + "normal", + "nodeadkeys", + ], + ), + keymap( + layout="Mali", + backend_layout="ml", + variant=[ + "normal", + "fr-oss", + "us-intl", + "us-mac", + ], + ), + keymap( + layout="Myanmar", + backend_layout="mm", + variant=[ + "normal", + "zawgyi", + ], + ), + keymap( + layout="Mongolia", + backend_layout="mn", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Malta", + backend_layout="mt", + variant=[ + "normal", + "alt-gb", + "alt-us", + "us", + ], + ), + keymap( + layout="Maldives", + backend_layout="mv", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Malaysia", + backend_layout="my", + variant=[ + "normal", + "phonetic", + ], + ), + keymap( + layout="Nigeria", + backend_layout="ng", + variant=[ + "normal", + "hausa", + "igbo", + "yoruba", + ], + ), + keymap( + layout="Netherlands", + backend_layout="nl", + variant=[ + "normal", + "mac", + "std", + "us", + ], + ), + keymap( + layout="Norway", + backend_layout="no", + variant=[ + "normal", + "colemak", + "dvorak", + "mac", + "mac_nodeadkeys", + "nodeadkeys", + "smi", + "smi_nodeadkeys", + "winkeys", + ], + ), + keymap( + layout="Nepal", + backend_layout="np", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Philippines", + backend_layout="ph", + variant=[ + "normal", + "capewell-dvorak", + "capewell-dvorak-bay", + "capewell-qwerf2k6", + "capewell-qwerf2k6-bay", + "colemak", + "colemak-bay", + "dvorak", + "dvorak-bay", + "qwerty-bay", + ], + ), + keymap( + layout="Pakistan", + backend_layout="pk", + variant=[ + "normal", + "ara", + "snd", + "urd-crulp", + "urd-nla", + ], + ), + keymap( + layout="Poland", + backend_layout="pl", + variant=[ + "normal", + "csb", + "dvorak", + "dvorak_altquotes", + "dvorak_quotes", + "dvp", + "legacy", + "qwertz", + "ru_phonetic_dvorak", + "szl", + ], + ), + keymap( + layout="Portugal", + backend_layout="pt", + variant=[ + "normal", + "mac", + "mac_nodeadkeys", + "nativo", + "nativo-epo", + "nativo-us", + "nodeadkeys", + ], + ), + keymap( + layout="Romania", + backend_layout="ro", + variant=[ + "normal", + "std", + "winkeys", + ], + ), + keymap( + layout="Serbia", + backend_layout="rs", + variant=[ + "normal", + "alternatequotes", + "latin", + "latinalternatequotes", + "latinunicode", + "latinunicodeyz", + "latinyz", + "rue", + "yz", + ], + ), + keymap( + layout="Russia", + backend_layout="ru", + variant=[ + "normal", + "bak", + "chm", + "cv", + "cv_latin", + "dos", + "kom", + "legacy", + "mac", + "os_legacy", + "os_winkeys", + "phonetic", + "phonetic_YAZHERTY", + "phonetic_azerty", + "phonetic_dvorak", + "phonetic_fr", + "phonetic_winkeys", + "sah", + "srp", + "tt", + "typewriter", + "typewriter-legacy", + "udm", + "xal", + ], + ), + keymap( + layout="Sweden", + backend_layout="se", + variant=[ + "normal", + "dvorak", + "mac", + "nodeadkeys", + "rus", + "rus_nodeadkeys", + "smi", + "svdvorak", + "swl", + "us", + "us_dvorak", + ], + ), + keymap( + layout="Slovenia", + backend_layout="si", + variant=[ + "normal", + "alternatequotes", + "us", + ], + ), + keymap( + layout="Slovakia", + backend_layout="sk", + variant=[ + "normal", + "bksl", + "qwerty", + "qwerty_bksl", + ], + ), + keymap( + layout="Senegal", + backend_layout="sn", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Sierra Leone", + backend_layout="sl", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Syria", + backend_layout="sy", + variant=[ + "normal", + "ku", + "ku_alt", + "ku_f", + "syc", + "syc_phonetic", + ], + ), + keymap( + layout="Togo", + backend_layout="tg", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Thailand", + backend_layout="th", + variant=[ + "normal", + "pat", + "tis", + ], + ), + keymap( + layout="Tajikistan", + backend_layout="tj", + variant=[ + "normal", + "legacy", + ], + ), + keymap( + layout="Turkmenistan", + backend_layout="tm", + variant=[ + "normal", + "alt", + ], + ), + keymap( + layout="Turkey", + backend_layout="tr", + variant=[ + "normal", + "alt", + "crh", + "crh_alt", + "crh_f", + "f", + "intl", + "ku", + "ku_alt", + "ku_f", + "ot", + "otf", + "otk", + "otkf", + ], + ), + keymap( + layout="Taiwan", + backend_layout="tw", + variant=[ + "normal", + "indigenous", + "saisiyat", + ], + ), + keymap( + layout="Tanzania", + backend_layout="tz", + variant=[ + "normal", + "", + ], + ), + keymap( + layout="Ukraine", + backend_layout="ua", + variant=[ + "normal", + "homophonic", + "legacy", + "phonetic", + "rstu", + "rstu_ru", + "typewriter", + "winkeys", + ], + ), + keymap( + layout="United States of America", + backend_layout="us", + variant=[ + "normal", + "alt-intl", + "altgr-intl", + "chr", + "colemak", + "colemak_dh", + "colemak_dh_iso", + "dvorak", + "dvorak-alt-intl", + "dvorak-classic", + "dvorak-intl", + "dvorak-l", + "dvorak-mac", + "dvorak-r", + "dvp", + "euro", + "haw", + "hbs", + "intl", + "mac", + "norman", + "olpc2", + "rus", + "symbolic", + "workman", + "workman-intl", + ], + ), + keymap( + layout="Uzbekistan", + backend_layout="uz", + variant=[ + "normal", + "latin", + ], + ), + keymap( + layout="Vietnam", + backend_layout="vn", + variant=[ + "normal", + "fr", + "us", + ], + ), + keymap( + layout="South Africa", + backend_layout="za", + variant=[ + "normal", + "", + ], + ) +] + diff --git a/src/locales/__init__.py b/src/locales/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/locales/africa.py b/src/locales/africa.py new file mode 100644 index 0000000..81479af --- /dev/null +++ b/src/locales/africa.py @@ -0,0 +1,270 @@ +from jade_gui.classes.locale import locale + +africa = [ + locale( + region="Africa", + location="Abidjan", + locales="fr_FR.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Accra", + locales="en_GH.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Addis_Ababa", + locales="en_ET.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Algiers", + locales="ar_DZ.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Asmara", + locales="en_ER.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Bamako", + locales="fr_ML.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Bangui", + locales="fr_FR.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Banjul", + locales="en_GM.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Bissau", + locales="pt_GW.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Blantyre", + locales="en_MW.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Brazzaville", + locales="fr_CD.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Bujumbura", + locales="fr_BI.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Cairo", + locales="ar_EG.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Casablanca", + locales="ar_MA.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Ceuta", + locales="es_ES.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Conakry", + locales="fr_GN.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Dakar", + locales="fr_SN.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Dar_es_Salaam", + locales="en_TZ.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Djibouti", + locales="fr_DJ.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Douala", + locales="fr_CM.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="El_Aaiun", + locales="ar_EH.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Freetown", + locales="en_SL.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Gaborone", + locales="en_BW.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Harare", + locales="en_ZW.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Johannesburg", + locales="en_ZA.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Juba", + locales="en_SS.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Kampala", + locales="en_UG.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Khartoum", + locales="", + ), + locale( + region="Africa", + location="Kigali", + locales="en_RW.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Kinshasa", + locales="fr_CD.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Lagos", + locales="en_NG.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Libreville", + locales="fr_GA.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Lome", + locales="fr_TG.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Luanda", + locales="pt_AO.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Lubumbashi", + locales="fr_CD.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Lusaka", + locales="en_ZM.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Malabo", + locales="fr_GQ.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Maputo", + locales="en_MZ.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Maseru", + locales="en_LS.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Mbabane", + locales="en_SZ.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Mogadishu", + locales="en_SO.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Monrovia", + locales="en_LR.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Nairobi", + locales="en_KE.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Ndjamena", + locales="fr_TD.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Niamey", + locales="fr_NE.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Nouakchott", + locales="ar_MR.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Ouagadougou", + locales="fr_BF.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Porto-Novo", + locales="fr_BJ.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Sao_Tome", + locales="pt_ST.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Timbuktu", + locales="fr_ML.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Tripoli", + locales="ar_LY.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Tunis", + locales="fr_TN.UTF-8 UTF-8", + ), + locale( + region="Africa", + location="Windhoek", + locales="en_NA.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/america.py b/src/locales/america.py new file mode 100644 index 0000000..1980428 --- /dev/null +++ b/src/locales/america.py @@ -0,0 +1,725 @@ +from jade_gui.classes.locale import locale + +america = [ + locale( + region="America", + location="Adak", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Anchorage", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Antigua", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Araguaina", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Argentina", + locales="es_AR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Aruba", + locales="nl_NL.UTF-8 UTF-8", + ), + locale( + region="America", + location="Asuncion", + locales="es_PY.UTF-8 UTF-8", + ), + locale( + region="America", + location="Atikokan", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Atka", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Bahia", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Bahia_Banderas", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Barbados", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="America", + location="Belem", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Belize", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Blanc-Sablon", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Boa_Vista", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Bogota", + locales="es_CO.UTF-8 UTF-8", + ), + locale( + region="America", + location="Boise", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Buenos_Aires", + locales="es_AR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Cambridge_Bay", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Campo_Grande", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Cancun", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Caracas", + locales="es_VE.UTF-8 UTF-8", + ), + locale( + region="America", + location="Catamarca", + locales="es_AR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Cayenne", + locales="fr_FR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Cayman", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="America", + location="Chicago", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Chihuahua", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Coral_Harbour", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Cordoba", + locales="es_AR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Costa_Rica", + locales="es_ES.UTF-8 UTF-8", + ), + locale( + region="America", + location="Creston", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Cuiaba", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Curacao", + locales="nl_NL.UTF-8 UTF-8", + ), + locale( + region="America", + location="Danmarkshavn", + locales="da_DK.UTF-8 UTF-8", + ), + locale( + region="America", + location="Dawson", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Dawson_Creek", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Denver", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Detroit", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Dominica", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="America", + location="Edmonton", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Eirunepe", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="El_Salvador", + locales="es_SV.UTF-8 UTF-8", + ), + locale( + region="America", + location="Ensenada", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Fort_Nelson", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Fort_Wayne", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Fortaleza", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Glace_Bay", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Godthab", + locales="da_DK.UTF-8 UTF-8", + ), + locale( + region="America", + location="Goose_Bay", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Grand_Turk", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Grenada", + locales="en_GD.UTF-8 UTF-8", + ), + locale( + region="America", + location="Guadeloupe", + locales="fr_FR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Guatemala", + locales="es_GT.UTF-8 UTF-8", + ), + locale( + region="America", + location="Guayaquil", + locales="es_EC.UTF-8 UTF-8", + ), + locale( + region="America", + location="Guyana", + locales="en_GY.UTF-8 UTF-8", + ), + locale( + region="America", + location="Halifax", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Havana", + locales="es_CU.UTF-8 UTF-8", + ), + locale( + region="America", + location="Hermosillo", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Indianapolis", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Inuvik", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Iqaluit", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Jamaica", + locales="en_JM.UTF-8 UTF-8", + ), + locale( + region="America", + location="Jujuy", + locales="es_AR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Juneau", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Kentucky/Louisville", + locales="en_US.UTF.8 UTF-8" + ), + locale( + region="America", + location="Knox_IN", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Kralendijk", + locales="nl_NL.UTF-8 UTF-8", + ), + locale( + region="America", + location="La_Paz", + locales="es_BO.UTF-8 UTF-8", + ), + locale( + region="America", + location="Lima", + locales="es_PE.UTF-8 UTF-8", + ), + locale( + region="America", + location="Los_Angeles", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Lower_Princes", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Maceio", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Managua", + locales="es_NI.UTF-8 UTF-8", + ), + locale( + region="America", + location="Manaus", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Marigot", + locales="fr_FR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Martinique", + locales="fr_FR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Matamoros", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Mazatlan", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Mendoza", + locales="es_AR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Menominee", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Merida", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Metlakatla", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Mexico_City", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Miquelon", + locales="fr_FR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Moncton", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Monterrey", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Montevideo", + locales="es_UY.UTF-8 UTF-8", + ), + locale( + region="America", + location="Montreal", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Montserrat", + locales="en_MS.UTF-8 UTF-8", + ), + locale( + region="America", + location="Nassau", + locales="en_BS.UTF-8 UTF-8", + ), + locale( + region="America", + location="New_York", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Nipigon", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Nome", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Noronha", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="North_Dakota/Beulah", + locales="en_US.UTF-8 UTF-8" + ), + locale( + region="America", + location="North_Dakota/Center", + locales="en_US.UTF-8 UTF-8" + ), + locale( + region="America", + location="North_Dakota/New_Salem", + locales="en_US.UTF-8 UTF-8" + ), + locale( + region="America", + location="Nuuk", + locales="en_GL.UTF-8 UTF-8", + ), + locale( + region="America", + location="Ojinaga", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Panama", + locales="es_PA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Pangnirtung", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Paramaribo", + locales="nl_SR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Phoenix", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Port-au-Prince", + locales="fr_HT.UTF-8 UTF-8", + ), + locale( + region="America", + location="Porto_Acre", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Port_of_Spain", + locales="en_TT.UTF-8 UTF-8", + ), + locale( + region="America", + location="Porto_Velho", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Puerto_Rico", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Punta_Arenas", + locales="es_CL.UTF-8 UTF-8", + ), + locale( + region="America", + location="Rainy_River", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Rankin_Inlet", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Recife", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Regina", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Resolute", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Rio_Branco", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Rosario", + locales="es_AR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Santa_Isabel", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Santarem", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Santiago", + locales="es_CL.UTF-8 UTF-8", + ), + locale( + region="America", + location="Santo_Domingo", + locales="es_DO.UTF-8 UTF-8", + ), + locale( + region="America", + location="Sao_Paulo", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="America", + location="Scoresbysund", + locales="da_DK.UTF-8 UTF-8", + ), + locale( + region="America", + location="Shiprock", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Sitka", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="St_Barthelemy", + locales="fr_BL.UTF-8 UTF-8", + ), + locale( + region="America", + location="St_Johns", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="St_Kitts", + locales="en_KN.UTF-8 UTF-8", + ), + locale( + region="America", + location="St_Lucia", + locales="en_LC.UTF-8 UTF-8", + ), + locale( + region="America", + location="St_Thomas", + locales="en_VI.UTF-8 UTF-8", + ), + locale( + region="America", + location="St_Vincent", + locales="en_VC.UTF-8 UTF-8", + ), + locale( + region="America", + location="Swift_Current", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Tegucigalpa", + locales="es_HN.UTF-8 UTF-8", + ), + locale( + region="America", + location="Thule", + locales="en_GL.UTF-8 UTF-8", + ), + locale( + region="America", + location="Thunder_Bay", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Tijuana", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="America", + location="Toronto", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Tortola", + locales="en_VG.UTF-8 UTF-8", + ), + locale( + region="America", + location="Vancouver", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Virgin", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Whitehorse", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Winnipeg", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="America", + location="Yakutat", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="America", + location="Yellowknife", + locales="en_CA.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/antarctica.py b/src/locales/antarctica.py new file mode 100644 index 0000000..3422208 --- /dev/null +++ b/src/locales/antarctica.py @@ -0,0 +1,65 @@ +from jade_gui.classes.locale import locale + +antarctica = [ + locale( + region="Antarctica", + location="Casey", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="Davis", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="DumontDurville", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="Macquarie", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="Mawson", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="McMurdo", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="Palmer", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="Rothera", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="South_Pole", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="Syowa", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="Troll", + locales="en_AQ.UTF-8 UTF-8", + ), + locale( + region="Antarctica", + location="Vostok", + locales="en_AQ.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/arctic.py b/src/locales/arctic.py new file mode 100644 index 0000000..32af14c --- /dev/null +++ b/src/locales/arctic.py @@ -0,0 +1,10 @@ +from jade_gui.classes.locale import locale + +arctic = [ + locale( + region="Arctic", + location="Longyearbyen", + locales="no_NO.UTF-8 UTF-8", + ) +] + diff --git a/src/locales/asia.py b/src/locales/asia.py new file mode 100644 index 0000000..44b20fa --- /dev/null +++ b/src/locales/asia.py @@ -0,0 +1,495 @@ +from jade_gui.classes.locale import locale + +asia = [ + locale( + region="Asia", + location="Aden", + locales="ar_SA.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Almaty", + locales="kk_KZ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Amman", + locales="ar_JO.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Anadyr", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Aqtau", + locales="kk_KZ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Aqtobe", + locales="kk_KZ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Ashgabat", + locales="tk_TM.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Ashkhabad", + locales="tk_TM.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Atyrau", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Baghdad", + locales="ar_IQ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Bahrain", + locales="ar_BH.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Baku", + locales="az_AZ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Bangkok", + locales="th_TH.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Barnaul", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Beirut", + locales="ar_LB.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Bishkek", + locales="ky_KG.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Brunei", + locales="ms_BN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Chita", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Choibalsan", + locales="mn_MN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Chongqing", + locales="zh_CN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Chungking", + locales="zh_CN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Colombo", + locales="si_LK.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Dacca", + locales="bn_BD.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Damascus", + locales="ar_SY.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Dhaka", + locales="bn_BD.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Dili", + locales="id_ID.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Dubai", + locales="ar_AE.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Dushanbe", + locales="tg_TJ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Famagusta", + locales="tr_TR.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Gaza", + locales="ar_PS.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Harbin", + locales="zh_CN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Hebron", + locales="ar_PS.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Ho_Chi_Minh", + locales="vi_VN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Hong_Kong", + locales="zh_HK.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Hovd", + locales="mn_MN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Irkutsk", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Istanbul", + locales="tr_TR.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Jakarta", + locales="id_ID.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Jayapura", + locales="id_ID.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Jerusalem", + locales="he_IL.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Kabul", + locales="fa_AF.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Kamchatka", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Karachi", + locales="ur_PK.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Kashgar", + locales="zh_CN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Kathmandu", + locales="ne_NP.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Katmandu", + locales="ne_NP.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Khandyga", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Kolkata", + locales="hi_IN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Krasnoyarsk", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Kuala_Lumpur", + locales="ms_MY.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Kuching", + locales="ms_MY.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Kuwait", + locales="ar_KW.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Macao", + locales="zh_MO.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Macau", + locales="zh_MO.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Magadan", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Makassar", + locales="id_ID.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Manila", + locales="tl_PH.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Muscat", + locales="ar_OM.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Nicosia", + locales="el_CY.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Novokuznetsk", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Novosibirsk", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Omsk", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Oral", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Phnom_Penh", + locales="kh_KH.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Pontianak", + locales="id_ID.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Pyongyang", + locales="ko_KP.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Qatar", + locales="ar_QA.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Qostanay", + locales="kk_KZ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Qyzylorda", + locales="kk_KZ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Rangoon", + locales="my_MM.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Riyadh", + locales="ar_SA.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Saigon", + locales="vi_VN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Sakhalin", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Samarkand", + locales="uz_UZ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Seoul", + locales="ko_KR.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Shanghai", + locales="zh_CN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Singapore", + locales="en_SG.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Srednekolymsk", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Taipei", + locales="zh_TW.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Tashkent", + locales="uz_UZ.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Tbilisi", + locales="ka_GE.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Tehran", + locales="fa_IR.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Tel_Aviv", + locales="he_IL.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Thimbu", + locales="ne_NP.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Thimphu", + locales="ne_NP.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Tokyo", + locales="ja_JP.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Tomsk", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Ujung_Pandang", + locales="id_ID.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Ulaanbaatar", + locales="mn_MN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Ulan_Bator", + locales="mn_MN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Urumqi", + locales="zh_CN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Ust-Nera", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Vientiane", + locales="vi_VN.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Vladivostok", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Yakutsk", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Yangon", + locales="my_MM.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Yekaterinburg", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Asia", + location="Yerevan", + locales="hy_AM.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/atlantic.py b/src/locales/atlantic.py new file mode 100644 index 0000000..e2a726a --- /dev/null +++ b/src/locales/atlantic.py @@ -0,0 +1,65 @@ +from jade_gui.classes.locale import locale + +atlantic = [ + locale( + region="atlantic", + location="Azores", + locales="pt_PT.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="Bermuda", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="Canary", + locales="es_ES.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="Cape_Verde", + locales="pt_PT.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="Faeroe", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="Faroe", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="Jan_Mayen", + locales="nb_NO.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="Madeira", + locales="pt_PT.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="Reykjavik", + locales="is_IS.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="South_Georgia", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="Stanley", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="atlantic", + location="St_Helena", + locales="en_GB.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/australia.py b/src/locales/australia.py new file mode 100644 index 0000000..809cb9d --- /dev/null +++ b/src/locales/australia.py @@ -0,0 +1,90 @@ +from jade_gui.classes.locale import locale + +australia = [ + locale( + region="Australia", + location="Adelaide", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Brisbane", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Broken_Hill", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Canberra", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Currie", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Darwin", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Eucla", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Hobart", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Lindeman", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Lord_Howe", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Melbourne", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Perth", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Queensland", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Sydney", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Tasmania", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Victoria", + locales="en_AU.UTF-8 UTF-8", + ), + locale( + region="Australia", + location="Yancowinna", + locales="en_AU.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/brazil.py b/src/locales/brazil.py new file mode 100644 index 0000000..a45308b --- /dev/null +++ b/src/locales/brazil.py @@ -0,0 +1,15 @@ +from jade_gui.classes.locale import locale + +brazil = [ + locale( + region="Brazil", + location="Acre", + locales="pt_BR.UTF-8 UTF-8", + ), + locale( + region="Brazil", + location="DeNoronha", + locales="pt_BR.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/canada.py b/src/locales/canada.py new file mode 100644 index 0000000..a7f07e7 --- /dev/null +++ b/src/locales/canada.py @@ -0,0 +1,40 @@ +from jade_gui.classes.locale import locale + +canada = [ + locale( + region="canada", + location="Atlantic", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="canada", + location="Central", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="canada", + location="Eastern", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="canada", + location="Mountain", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="canada", + location="Newfoundland", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="canada", + location="Pacific", + locales="en_CA.UTF-8 UTF-8", + ), + locale( + region="canada", + location="Yukon", + locales="en_CA.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/chile.py b/src/locales/chile.py new file mode 100644 index 0000000..cddc01b --- /dev/null +++ b/src/locales/chile.py @@ -0,0 +1,15 @@ +from jade_gui.classes.locale import locale + +chile = [ + locale( + region="Chile", + location="Continental", + locales="es_CL.UTF-8 UTF-8", + ), + locale( + region="Chile", + location="EasterIsland", + locales="es_CL.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/europe.py b/src/locales/europe.py new file mode 100644 index 0000000..66e5786 --- /dev/null +++ b/src/locales/europe.py @@ -0,0 +1,315 @@ +from jade_gui.classes.locale import locale + +europe = [ + locale( + region="Europe", + location="Amsterdam", + locales="nl_NL.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Andorra", + locales="ca_ES.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Athens", + locales="el_GR.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Belfast", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Belgrade", + locales="sr_RS.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Berlin", + locales="de_DE.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Bratislava", + locales="sk_SK.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Brussels", + locales="nl_BE.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Bucharest", + locales="ro_RO.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Budapest", + locales="hu_HU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Busingen", + locales="de_DE.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Chisinau", + locales="ro_RO.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Copenhagen", + locales="da_DK.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Dublin", + locales="en_IE.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Gibraltar", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Guernsey", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Helsinki", + locales="fi_FI.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Isle_of_Man", + locales="en_IM.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Istanbul", + locales="tr_TR.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Jersey", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Kaliningrad", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Kiev", + locales="uk_UA.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Kirov", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Lisbon", + locales="pt_PT.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Ljubljana", + locales="sl_SI.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="London", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Luxembourg", + locales="fr_LU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Madrid", + locales="es_ES.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Malta", + locales="en_GB.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Mariehamn", + locales="sv_SE.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Minsk", + locales="be_BY.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Monaco", + locales="fr_FR.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Moscow", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Nicosia", + locales="el_GR.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Oslo", + locales="no_NO.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Paris", + locales="fr_FR.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Podgorica", + locales="sr_RS.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Prague", + locales="cs_CZ.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Riga", + locales="lv_LV.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Rome", + locales="it_IT.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Samara", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="San_Marino", + locales="it_IT.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Sarajevo", + locales="bs_BA.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Saratov", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Simferopol", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Skopje", + locales="mk_MK.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Sofia", + locales="bg_BG.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Stockholm", + locales="sv_SE.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Tallinn", + locales="et_EE.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Tirane", + locales="sq_AL.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Tiraspol", + locales="ro_RO.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Ulyanovsk", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Uzhgorod", + locales="uk_UA.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Vaduz", + locales="de_AT.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Vatican", + locales="it_IT.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Vienna", + locales="de_AT.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Vilnius", + locales="lt_LT.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Volgograd", + locales="ru_RU.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Warsaw", + locales="pl_PL.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Zagreb", + locales="hr_HR.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Zaporozhye", + locales="uk_UA.UTF-8 UTF-8", + ), + locale( + region="Europe", + location="Zurich", + locales="de_CH.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/indian.py b/src/locales/indian.py new file mode 100644 index 0000000..f30c66e --- /dev/null +++ b/src/locales/indian.py @@ -0,0 +1,60 @@ +from jade_gui.classes.locale import locale + +indian = [ + locale( + region="Indian", + location="Antananarivo", + locales="fr_MG.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Chagos", + locales="en_IO.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Christmas", + locales="en_CX.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Cocos", + locales="en_CC.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Comoro", + locales="fr_KM.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Kerguelen", + locales="fr_TF.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Mahe", + locales="en_SC.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Maldives", + locales="en_MV.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Mauritius", + locales="en_MU.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Mayotte", + locales="fr_YT.UTF-8 UTF-8", + ), + locale( + region="Indian", + location="Reunion", + locales="fr_RE.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/locales_list.py b/src/locales/locales_list.py new file mode 100644 index 0000000..1b21e1d --- /dev/null +++ b/src/locales/locales_list.py @@ -0,0 +1,50 @@ +# locales.py + +# +# Copyright 2022 user + +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +from jade_gui.locales.africa import africa +from jade_gui.locales.america import america +from jade_gui.locales.antarctica import antarctica +from jade_gui.locales.arctic import arctic +from jade_gui.locales.asia import asia +from jade_gui.locales.atlantic import atlantic +from jade_gui.locales.australia import australia +from jade_gui.locales.brazil import brazil +from jade_gui.locales.canada import canada +from jade_gui.locales.chile import chile +from jade_gui.locales.europe import europe +from jade_gui.locales.indian import indian +from jade_gui.locales.mexico import mexico +from jade_gui.locales.pacific import pacific + +locations = [ + africa, + america, + antarctica, + arctic, + asia, + atlantic, + australia, + brazil, + canada, + chile, + europe, + indian, + mexico, + pacific +] diff --git a/src/locales/meson.build b/src/locales/meson.build new file mode 100644 index 0000000..d7d9d40 --- /dev/null +++ b/src/locales/meson.build @@ -0,0 +1,22 @@ +pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) +localesdir = join_paths(pkgdatadir, 'jade_gui/locales') + +jade_gui_sources = [ + '__init__.py', + 'africa.py', + 'america.py', + 'antarctica.py', + 'arctic.py', + 'asia.py', + 'atlantic.py', + 'australia.py', + 'brazil.py', + 'canada.py', + 'chile.py', + 'europe.py', + 'indian.py', + 'mexico.py', + 'pacific.py', + 'locales_list.py', +] +install_data(jade_gui_sources, install_dir: localesdir) \ No newline at end of file diff --git a/src/locales/mexico.py b/src/locales/mexico.py new file mode 100644 index 0000000..771eead --- /dev/null +++ b/src/locales/mexico.py @@ -0,0 +1,20 @@ +from jade_gui.classes.locale import locale + +mexico = [ + locale( + region="Mexico", + location="BajaNorte", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="Mexico", + location="BajaSur", + locales="es_MX.UTF-8 UTF-8", + ), + locale( + region="Mexico", + location="General", + locales="es_MX.UTF-8 UTF-8", + ), +] + diff --git a/src/locales/pacific.py b/src/locales/pacific.py new file mode 100644 index 0000000..c11355d --- /dev/null +++ b/src/locales/pacific.py @@ -0,0 +1,220 @@ +from jade_gui.classes.locale import locale + +pacific = [ + locale( + region="Pacific", + location="Apia", + locales="en_WS.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Auckland", + locales="en_NZ.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Bougainville", + locales="en_PG.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Chatham", + locales="en_NZ.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Chuuk", + locales="en_FM.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Easter", + locales="en_CL.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Efate", + locales="en_VU.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Enderbury", + locales="en_KI.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Fakaofo", + locales="en_TK.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Fiji", + locales="en_FJ.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Funafuti", + locales="en_TV.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Galapagos", + locales="en_EC.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Gambier", + locales="en_PF.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Guadalcanal", + locales="en_SB.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Guam", + locales="en_GU.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Honolulu", + locales="en_US.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Johnston", + locales="en_UM.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Kiritimati", + locales="en_KI.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Kosrae", + locales="en_FM.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Kwajalein", + locales="en_MH.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Majuro", + locales="en_MH.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Marquesas", + locales="en_PF.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Midway", + locales="en_UM.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Nauru", + locales="en_NR.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Niue", + locales="en_NU.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Norfolk", + locales="en_NF.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Noumea", + locales="en_NC.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Pago_Pago", + locales="en_AS.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Palau", + locales="en_PW.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Pitcairn", + locales="en_PN.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Pohnpei", + locales="en_FM.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Ponape", + locales="en_FM.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Port_Moresby", + locales="en_PG.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Rarotonga", + locales="en_CK.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Saipan", + locales="en_MP.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Samoa", + locales="en_AS.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Tahiti", + locales="en_PF.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Tarawa", + locales="en_KI.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Tongatapu", + locales="en_TO.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Truk", + locales="en_FM.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Wake", + locales="en_UM.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Wallis", + locales="en_WF.UTF-8 UTF-8", + ), + locale( + region="Pacific", + location="Yap", + locales="en_FM.UTF-8 UTF-8", + ), +] + diff --git a/src/meson.build b/src/meson.build index befcfd9..f925093 100644 --- a/src/meson.build +++ b/src/meson.build @@ -61,11 +61,14 @@ configure_file( subdir('widgets') subdir('functions') +subdir('classes') +subdir('locales') jade_gui_sources = [ '__init__.py', 'main.py', 'window.py', + 'keymaps.py', ] install_data(jade_gui_sources, install_dir: moduledir) diff --git a/src/pages/keyboard_screen.blp b/src/pages/keyboard_screen.blp index 707b80a..39dfa8b 100644 --- a/src/pages/keyboard_screen.blp +++ b/src/pages/keyboard_screen.blp @@ -14,14 +14,6 @@ template KeyboardScreen : Adw.Bin { vexpand: true; title: "Next question: keyboard layout?"; description: "What is it? Huh?"; - Gtk.Box { - orientation: vertical; - Gtk.SearchBar keyboard_search { - Gtk.SearchEntry keyboard_entry_search { - placeholder-text: "Search for a timezone..."; - } - } - } Adw.PreferencesPage { Adw.Carousel keyboard_carousel { orientation: horizontal; @@ -29,24 +21,29 @@ template KeyboardScreen : Adw.Bin { hexpand: true; Adw.PreferencesGroup keyboard_layouts { hexpand: true; - vexpand: true; - margin-end: 5; + margin-end: 20; + margin-start: 20; Gtk.ListBox list_keyboard_layouts { - //selection-mode: none; - hexpand: true; - vexpand: true; - // margin-end: 5; + Gtk.Box layout_search { + Gtk.SearchEntry layout_entry_search { + hexpand: true; + placeholder-text: _("Search for a keyboard layout"); + } + } styles ["boxed-list"] } } Adw.PreferencesGroup keyboard_variants { hexpand: true; - vexpand: true; - margin-start: 5; + margin-end: 20; + margin-start: 20; Gtk.ListBox list_keyboard_variants { - hexpand: true; - vexpand: true; - // margin-start: 5; + Gtk.Box variant_search { + Gtk.SearchEntry variant_entry_search { + hexpand: true; + placeholder-text: _("Search for a keyboard variant"); + } + } styles ["boxed-list"] } } diff --git a/src/pages/timezone_screen.blp b/src/pages/timezone_screen.blp index ebfc331..49f4573 100644 --- a/src/pages/timezone_screen.blp +++ b/src/pages/timezone_screen.blp @@ -4,26 +4,25 @@ using Adw 1; template TimezoneScreen : Adw.Bin { hexpand: true; vexpand: true; - Gtk.Box { - vexpand: true; + Gtk.Box { + vexpand: true; + hexpand: true; + Adw.StatusPage { hexpand: true; - //valign: center; - //halign: center; - Adw.StatusPage { - hexpand: true; - vexpand: true; - title: "Let's get started, shall we?"; - description: "What's your curent timezone?"; - Gtk.Box { - orientation: vertical; - Gtk.SearchBar timezone_search { - Gtk.SearchEntry timezone_entry_search { - placeholder-text: "Search for a timezone..."; - } - } + vexpand: true; + title: "Let's get started, shall we?"; + description: "What's your curent timezone?"; + Gtk.Box { + orientation: vertical; Adw.PreferencesPage { Adw.PreferencesGroup { Gtk.ListBox list_timezones { + Gtk.Box timezone_search { + Gtk.SearchEntry timezone_entry_search { + hexpand: true; + placeholder-text: _("Search for a timezone"); + } + } styles ["boxed-list"] } } diff --git a/src/widgets/timezone.blp b/src/widgets/timezone.blp index 983b4be..79c79f1 100644 --- a/src/widgets/timezone.blp +++ b/src/widgets/timezone.blp @@ -3,7 +3,6 @@ using Adw 1; template TimezoneEntry : Adw.ActionRow { title: "region/location"; - subtitle: "timezone UTC +XX:XX"; Gtk.Box { spacing: 6; Gtk.Label time_label { diff --git a/src/widgets/timezone.py b/src/widgets/timezone.py index a6a5d41..8713622 100644 --- a/src/widgets/timezone.py +++ b/src/widgets/timezone.py @@ -28,15 +28,14 @@ class TimezoneEntry(Adw.ActionRow): time_label = Gtk.Template.Child() - def __init__(self, window, location, region, locale, timezone, application, **kwargs): + def __init__(self, window, region, location, locale, application, **kwargs): super().__init__(**kwargs) self.set_title(region+"/"+location) - self.set_subtitle(timezone) + if location != "Argentina": # TODO: pytz for some reason doesn't like America/Argentina, fix this + self.time_label.set_text(self.calculate_time(location=location, region=region)) - self.time_label.set_text(self.calculate_time(location, region)) - - def calculate_time(widget, location, region): - timezone = pytz.timezone(location+"/"+region) + def calculate_time(self, location, region): + timezone = pytz.timezone(region+"/"+location) datetime_timezone = datetime.now(timezone) return datetime_timezone.strftime('%H:%M') diff --git a/src/window.py b/src/window.py index 70e6a4e..74b14fb 100644 --- a/src/window.py +++ b/src/window.py @@ -33,6 +33,8 @@ from .functions.partition_screen import PartitionScreen from .functions.summary_screen import SummaryScreen from .functions.install_screen import InstallScreen from .functions.finished_screen import FinishedScreen +from .locales.locales_list import locations +from .keymaps import keymaps @Gtk.Template(resource_path='/al/getcryst/jadegui/window.ui') class JadeGuiWindow(Gtk.ApplicationWindow): @@ -74,21 +76,19 @@ class JadeGuiWindow(Gtk.ApplicationWindow): ### --------- ### Test timezones - timezone_test = TimezoneEntry(window=self, location="Europe", region="Berlin", timezone="CEST UTC+2", locale="en_US.UTF-8", **kwargs) - timezone_test_two = TimezoneEntry(window=self, location="Europe", region="London", timezone="BST UTC+1", locale="en_US.UTF-8", **kwargs) - timezone_test_three = TimezoneEntry(window=self, location="America", region="Chihuahua", timezone="MDT UTC-6", locale="en_MX.UTF-8", **kwargs) - self.timezone_screen.list_timezones.append(timezone_test) - self.timezone_screen.list_timezones.append(timezone_test_two) - self.timezone_screen.list_timezones.append(timezone_test_three) + for i in locations: + for locale in i: + print(locale.region) + print(locale.location) + print(locale.locales) + self.timezone_screen.list_timezones.append(TimezoneEntry(window=self, region=locale.region, location=locale.location, locale=locale.locales, **kwargs)) ### --------- ### Test layouts - layout_test = KeyboardLayout(window=self, country="Germany", country_shorthand="DE", **kwargs) - layout_test_two = KeyboardLayout(window=self, country="United Kingdom", country_shorthand="GB", **kwargs) - layout_test_three = KeyboardLayout(window=self, country="United States", country_shorthand="US", **kwargs) - self.keyboard_screen.list_keyboard_layouts.append(layout_test) - self.keyboard_screen.list_keyboard_layouts.append(layout_test_two) - self.keyboard_screen.list_keyboard_layouts.append(layout_test_three) + for keymap in keymaps: + print(keymap.layout) + print(keymap.backend_layout) + self.keyboard_screen.list_keyboard_layouts.append(KeyboardLayout(window=self, country=keymap.layout, country_shorthand=keymap.backend_layout, **kwargs)) ### --------- ### Test variants