forked from mirrors/LibreTranslate
Merge pull request #313 from dingedi/main
remove use of deprecated method
This commit is contained in:
commit
5aa3f1eee8
1 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ def check_and_install_models(force=False, load_only_lang_codes=None):
|
||||||
package.update_package_index()
|
package.update_package_index()
|
||||||
|
|
||||||
# Load available packages from local package index
|
# Load available packages from local package index
|
||||||
available_packages = package.load_available_packages()
|
available_packages = package.get_available_packages()
|
||||||
print("Found %s models" % len(available_packages))
|
print("Found %s models" % len(available_packages))
|
||||||
|
|
||||||
if load_only_lang_codes is not None:
|
if load_only_lang_codes is not None:
|
||||||
|
@ -55,10 +55,10 @@ def check_and_install_models(force=False, load_only_lang_codes=None):
|
||||||
package.install_from_path(download_path)
|
package.install_from_path(download_path)
|
||||||
|
|
||||||
# reload installed languages
|
# reload installed languages
|
||||||
app.language.languages = translate.load_installed_languages()
|
app.language.languages = translate.get_installed_languages()
|
||||||
print(
|
print(
|
||||||
"Loaded support for %s languages (%s models total)!"
|
"Loaded support for %s languages (%s models total)!"
|
||||||
% (len(translate.load_installed_languages()), len(available_packages))
|
% (len(translate.get_installed_languages()), len(available_packages))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue