mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-18 08:27:03 +02:00
remove use of deprecated method
This commit is contained in:
parent
7b7cd7768b
commit
13d792b6b6
@ -21,7 +21,7 @@ def check_and_install_models(force=False, load_only_lang_codes=None):
|
||||
package.update_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))
|
||||
|
||||
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)
|
||||
|
||||
# reload installed languages
|
||||
app.language.languages = translate.load_installed_languages()
|
||||
app.language.languages = translate.get_installed_languages()
|
||||
print(
|
||||
"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 New Issue
Block a user