mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-06 12:51:41 +01:00
[REMOVED] Unnecessary lambda statement
The `lambda` statement in `base.py` is unnecessary and has no effect.
```py
ugettext = lambda s: s
LANGUAGES = (
("en", ugettext("English")),
("de", ugettext("German")),
("es", ugettext("Spanish")),
("zh-hans", ugettext("Chinese Simplified")),
("ru", ugettext("Russian")),
("ko", ugettext("Korean")),
("fr", ugettext("French")),
("ja", ugettext("Japanese")),
("it", ugettext("Italian")),
)
```
In this case `ugettext = lambda s: s` is pretty much the same as:
```py
def ugettext(s):
return s
```
And would simply return the string the function receives as parameter.
So we can omit this completely and simplify the `LANGUAGES` list to:
```py
LANGUAGES = (
("en", "English"),
("de", "German"),
("es", "Spanish"),
("zh-hans", "Chinese Simplified"),
("ru", "Russian"),
("ko", "Korean"),
("fr", "French"),
("ja", "Japanese"),
("it", "Italian"),
)
```
This commit is contained in:
parent
273bda173e
commit
4026523a2e
@ -84,17 +84,16 @@ LOCALE_PATHS = (
|
||||
os.path.join(BASE_DIR, 'locale/'),
|
||||
)
|
||||
|
||||
ugettext = lambda s: s
|
||||
LANGUAGES = (
|
||||
('en', ugettext('English')),
|
||||
('de', ugettext('German')),
|
||||
('es', ugettext('Spanish')),
|
||||
('zh-hans', ugettext('Chinese Simplified')),
|
||||
('ru', ugettext('Russian')),
|
||||
('ko', ugettext('Korean')),
|
||||
('fr', ugettext('French')),
|
||||
('ja', ugettext('Japanese')),
|
||||
('it', ugettext('Italian')),
|
||||
("en", "English"),
|
||||
("de", "German"),
|
||||
("es", "Spanish"),
|
||||
("zh-hans", "Chinese Simplified"),
|
||||
("ru", "Russian"),
|
||||
("ko", "Korean"),
|
||||
("fr", "French"),
|
||||
("ja", "Japanese"),
|
||||
("it", "Italian"),
|
||||
)
|
||||
|
||||
TEMPLATES = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user