]> git.ipfire.org Git - pbs.git/commitdiff
web: Drop locale selection module
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Oct 2022 17:44:38 +0000 (17:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Oct 2022 17:44:38 +0000 (17:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/modules/select/locale.html [deleted file]
src/web/__init__.py
src/web/ui_modules.py

index 62f781fc9f9cb862b159587894a38b61ca4757e5..8ccc55cc146d968dc68e929cb28611967bc93f1a 100644 (file)
@@ -284,11 +284,6 @@ dist_templates_modules_jobs_DATA = \
 
 templates_modules_jobsdir = $(templates_modulesdir)/jobs
 
-dist_templates_modules_select_DATA = \
-       src/templates/modules/select/locale.html
-
-templates_modules_selectdir = $(templates_modulesdir)/select
-
 dist_templates_repos_DATA = \
        src/templates/repos/create-custom.html \
        src/templates/repos/builds.html \
diff --git a/src/templates/modules/select/locale.html b/src/templates/modules/select/locale.html
deleted file mode 100644 (file)
index 33edb67..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<select class="form-control" name="{{ name }}" {% if id %}id="{{ id }}" aria-describedby="{{ id }}Help"{% end %}>
-       <option value="">- {{ _("Auto-select") }} -</option>
-
-       {% for code, name_en, name_loc in supported_locales %}
-               <option value="{{ code }}" {% if preselect and preselect == code %}selected="selected"{% end %}>
-                       {{ name_en }} - {{ name_loc }}
-               </option>
-       {% end %}
-</select>
index 4f2395206e1b14b2450041a44aca911c0f43bd53..f831ea36c64a85b9322dd76d56387648b46d902a 100644 (file)
@@ -81,8 +81,6 @@ class Application(tornado.web.Application):
                                "SourceTable"        : ui_modules.SourceTableModule,
 
                                "HeadingDate"        : ui_modules.HeadingDateModule,
-
-                               "SelectLocale"       : ui_modules.SelectLocaleModule,
                        },
                        ui_methods = {
                                "extract_hostname"   : self.extract_hostname,
index 2cd352f54c26ff1b0831b54ebc2263c31f4e655c..ff4a207f2f2dc4ced1addcca617ae376430ca42b 100644 (file)
@@ -279,33 +279,3 @@ class LinkToUserModule(UIModule):
 class BuildOffsetModule(UIModule):
        def render(self):
                return self.render_string("modules/build-offset.html")
-
-
-class SelectLocaleModule(UIModule):
-       LOCALE_NAMES = [
-               # local code, English name, name
-               ("ca_ES", "Catalan", "Catal\xc3\xa0"),
-               ("da_DK", "Danish", "Dansk"),
-               ("de_DE", "German", "Deutsch"),
-               ("en_GB", "English (UK)", "English (UK)"),
-               ("en_US", "English (US)", "English (US)"),
-               ("es_ES", "Spanish (Spain)", "Espa\xf1ol (Espa\xf1a)"),
-               ("es_LA", "Spanish", "Espa\xf1ol"),
-               ("fr_CA", "French (Canada)", "Fran\xe7ais (Canada)"),
-               ("fr_FR", "French", "Fran\xe7ais"),
-               ("it_IT", "Italian", "Italiano"),
-               ("km_KH", "Khmer", "\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a"),
-               ("nl_NL", "Dutch", "Nederlands"),
-               ("pt_BR", "Portuguese (Brazil)", "Portugu\xeas (Brasil)"),
-               ("pt_PT", "Portuguese (Portugal)", "Portugu\xeas (Portugal)"),
-               ("ro_RO", "Romanian", "Rom\xe2n\u0103"),
-               ("ru_RU", "Russian", "\u0440\u0443\u0441\u0441\u043a\u0438\u0439"),
-               ("uk_UA", "Ukrainian", "\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430"),
-       ]
-
-       # Sort the list of locales by their English name.
-       LOCALE_NAMES.sort(key=lambda x: x[1])
-
-       def render(self, name=None, id=None, preselect=None):
-               return self.render_string("modules/select/locale.html",
-                       name=name, id=id, preselect=preselect, supported_locales=self.LOCALE_NAMES)