From 951a8e58e3544a955c3eb9febbdc1428b1c2c4d6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 5 Feb 2025 20:41:55 +0530 Subject: [PATCH] Cleanup previous PR --- resources/default_tweaks.py | 10 ++++++---- src/calibre/utils/localization.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 1c123f214b..ae29a0d31f 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -583,10 +583,12 @@ calendar_start_day_of_week = 'Default' #: East Asian language to use for transliteration # Setting this tweak will make calibre use the specified language as the "base" -# language when transliterating East Asian languages to ASCII. This might be +# language when transliterating East Asian languages to English. This might be # useful if you run calibre in English but want text transliterated to -# Japanese. The valid values are 'ja', 'kr', 'vn', 'zh', and '' (empty string). -# The empty string means use the user interface language as the base language. -# Any value not in the above list will be treated as the empty string. +# Japanese instead of Chinese. The valid values are 'ja' for Japanese, 'kr' for Korean, +# 'vn' for Vietnamese, 'zh' for Chinese. +# Any other value will use the language set in calibre preferences as the base +# language. A base language other than those in the above list causes transliteration +# with a base language of Chinese. # Example: east_asian_base_language = 'ja' east_asian_base_language = '' diff --git a/src/calibre/utils/localization.py b/src/calibre/utils/localization.py index 5878060a9b..9cd67fdc08 100644 --- a/src/calibre/utils/localization.py +++ b/src/calibre/utils/localization.py @@ -549,7 +549,7 @@ def get_udc(): if _udc is None: from calibre.ebooks.unihandecode import Unihandecoder from calibre.utils.config_base import tweaks - lang = tweaks.get('east_asian_base_language') + lang = tweaks.get('east_asian_base_language', '') lang = lang if lang in ('ja', 'kr', 'vn', 'zh') else get_lang() _udc = Unihandecoder(lang=lang) return _udc