[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:
Peter Pfeufer 2022-09-13 20:59:14 +02:00
parent 273bda173e
commit 4026523a2e
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27

View File

@ -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 = [