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)