From 0ea4f9703da5544510af2d2d7a0c68f95750d790 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Mon, 9 Oct 2023 17:31:34 +0800 Subject: [PATCH] wip --- TeXmacs/progs/utils/misc/translation-list.scm | 10 ++++------ src/System/Language/dictionary.cpp | 3 +-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/TeXmacs/progs/utils/misc/translation-list.scm b/TeXmacs/progs/utils/misc/translation-list.scm index 5065d4590a..202d53d315 100644 --- a/TeXmacs/progs/utils/misc/translation-list.scm +++ b/TeXmacs/progs/utils/misc/translation-list.scm @@ -173,13 +173,11 @@ (define (tr-file language) (let* ((locale_tag (language-to-locale language)) - (lang_plugin_dir (string-append "plugins/lang_" locale_tag "/progs/")) - (lang_dic_file (string-append "english-" language ".scm")) + (lang_dic_file (string-append "plugins/lang_" locale_tag "/progs/data/from_en_US.scm")) (candidates - (url-or (url-append (url-append (get-texmacs-home-path) lang_plugin_dir) lang_dic_file) - (url-or (url-append (url-append (get-texmacs-path) lang_plugin_dir) lang_dic_file) - (system->url (string-append "$TEXMACS_PATH/langs/natural/dic/" lang_dic_file)))))) - (url-resolve candidates "r"))) + (url-or (url-append (get-texmacs-home-path) lang_dic_file) + (url-append (get-texmacs-path) lang_dic_file))) + (url-resolve candidates "r")))) (define (tr-miss language) (url-concretize diff --git a/src/System/Language/dictionary.cpp b/src/System/Language/dictionary.cpp index 600bbc4e9f..c53754cad0 100644 --- a/src/System/Language/dictionary.cpp +++ b/src/System/Language/dictionary.cpp @@ -65,11 +65,10 @@ void dictionary_rep::load (string from, string to) { string fname = from * "-" * to * ".scm"; if (DEBUG_CONVERT) debug_convert << "Loading " << fname << LF; - url u= url_system ("$TEXMACS_DIC_PATH") * url_wildcard ("*" * fname); string to_locale_tag= language_to_locale (to); string from_locale_tag= language_to_locale (from); string path_to_dic= string("plugins/lang_") * to_locale_tag * "/data/from_" * from_locale_tag * ".scm"; - url u2= get_texmacs_home_path () * path_to_dic | get_texmacs_path () * path_to_dic | u; + url u2= get_texmacs_home_path () * path_to_dic | get_texmacs_path () * path_to_dic; load (expand (complete (u2))); }