Skip to content

Add data updater #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 29, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added reloading languages.ini
  • Loading branch information
Ayuto committed Jul 4, 2017
commit 24b2bb14a56a148150c8dcb60a4f8f889951f987
5 changes: 5 additions & 0 deletions addons/source-python/packages/source-python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,16 @@ def setup_data_update():
_sp_logger.log_info('Checking for data updates...')

from core.update import is_new_data_available, update_data
from translations.manager import language_manager

try:
if is_new_data_available():
_sp_logger.log_info('New data is available. Downloading...')
update_data()

# languages.ini is loaded before the data has been updated. Thus,
# we need to reload the file.
language_manager.reload()
else:
_sp_logger.log_info('No new data is available.')
except:
Expand Down