From 2750b4021a04985fe74ee76992562c0d7e5a2357 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 10 May 2024 01:16:29 +0200 Subject: [PATCH] Process base symbols after other dictionaries Definitions from base/symbols.dic should really be used as last resort: notably if Orca provides some translations we should use them instead. --- config/speechd.conf | 1 + locale/Makefile.am | 2 +- locale/base/{symbols.dic => symbols-fallback.dic} | 0 locale/import-symbols.py | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) rename locale/base/{symbols.dic => symbols-fallback.dic} (100%) diff --git a/config/speechd.conf b/config/speechd.conf index 1cde33af..ebcc3c9e 100644 --- a/config/speechd.conf +++ b/config/speechd.conf @@ -174,6 +174,7 @@ SymbolsPreprocFile "symbols.dic" SymbolsPreprocFile "emojis.dic" SymbolsPreprocFile "orca.dic" SymbolsPreprocFile "orca-chars.dic" +SymbolsPreprocFile "symbols-fallback.dic" # The DefaultCapLetRecognition: if set to "spell", capital letters # should be spelled (e.g. "capital b"), if set to "icon", diff --git a/locale/Makefile.am b/locale/Makefile.am index 890827cd..bf7ba4cb 100644 --- a/locale/Makefile.am +++ b/locale/Makefile.am @@ -19,7 +19,7 @@ nobase_localedata_DATA = \ base/font-variants.dic \ - base/symbols.dic \ + base/symbols-fallback.dic \ \ af/emojis.dic \ am/emojis.dic \ diff --git a/locale/base/symbols.dic b/locale/base/symbols-fallback.dic similarity index 100% rename from locale/base/symbols.dic rename to locale/base/symbols-fallback.dic diff --git a/locale/import-symbols.py b/locale/import-symbols.py index fb673d80..d767f256 100755 --- a/locale/import-symbols.py +++ b/locale/import-symbols.py @@ -135,7 +135,7 @@ def createCLDRAnnotationsDict(sources): with codecs.open(path.join(NVDALang, "symbols.dic"), "w", "utf_8_sig", errors="replace") as dicFile: dicFile.write(docHeader) dicFile.write(NVDADic) -copy("en/symbols.dic", "base/symbols.dic") +copy("en/symbols.dic", "base/symbols-fallback.dic") # Create all emojis dictionaries processedFiles = ["root.xml","en_001.xml","sr_Cyrl.xml","sr_Cyrl_BA.xml"] # To avoid creating too much directories when we process a file in a non-standard language