Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii committed Oct 9, 2023
1 parent b10f381 commit 0ea4f97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 4 additions & 6 deletions TeXmacs/progs/utils/misc/translation-list.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/System/Language/dictionary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}

Expand Down

0 comments on commit 0ea4f97

Please sign in to comment.