diff --git a/resources/dictionaries/es-ES/locales b/resources/dictionaries/es-ES/locales index a11c9c0edd..91c4d4cbc9 100644 --- a/resources/dictionaries/es-ES/locales +++ b/resources/dictionaries/es-ES/locales @@ -1,3 +1,4 @@ +es-ES es-AR es-BO es-CL @@ -6,7 +7,6 @@ es-CR es-CU es-DO es-EC -es-ES es-GT es-HN es-MX diff --git a/src/calibre/spell/import_from.py b/src/calibre/spell/import_from.py index 39b81b6ef5..615bac39f4 100644 --- a/src/calibre/spell/import_from.py +++ b/src/calibre/spell/import_from.py @@ -62,6 +62,7 @@ def import_from_libreoffice_source_tree(source_path): df = os.path.join(dest, locale + os.path.splitext(src)[1]) shutil.copyfile(src, df) with open(os.path.join(dest, 'locales'), 'wb') as f: + locales.sort(key=lambda x: (0, x) if x == locale else (1, x)) f.write(('\n'.join(locales)).encode('utf-8')) if want_locales: