Skip to content

Commit

Permalink
Component: Warn on setting page that the repo is outdated
Browse files Browse the repository at this point in the history
This should avoid confusion in cases like switching the repo and
merge failed.

Fixes #4535
  • Loading branch information
nijel committed Sep 18, 2020
1 parent b71af86 commit 420524c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions weblate/trans/views/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ def change_component(request, project, component):
else:
form = ComponentSettingsForm(request, instance=obj)

if obj.repo_needs_merge():
messages.warning(
request,
_(
"The repository is outdated, you might not get "
"expected results until you update it."
),
)

return render(
request,
"component-settings.html",
Expand Down

0 comments on commit 420524c

Please sign in to comment.