From 4feb684c893baa80c183a5ed94b0772d60ff3e25 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 9 Nov 2019 13:46:46 +0530 Subject: [PATCH] Exclude improperly named entries from ISO-639-3 Fixes #1851909 [Some strange languages is shown in the list](https://bugs.launchpad.net/calibre/+bug/1851909) --- setup/translations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/translations.py b/setup/translations.py index 7862b39326..02964e8c91 100644 --- a/setup/translations.py +++ b/setup/translations.py @@ -813,6 +813,8 @@ class ISO639(Command): # {{{ name = x.get('name') if name: name = unicode_type(name) + if not name or name[0] in '!~=/\'"': + continue if two is not None: by_2[two] = name