Skip to content

Commit

Permalink
addons: add deprecation warning to misstyped LangaugeConsistencyAddon
Browse files Browse the repository at this point in the history
  • Loading branch information
SukiCZ committed Oct 5, 2024
1 parent 8ff2859 commit 4fe2ce0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion weblate/addons/consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later

import warnings

from django.utils.translation import gettext_lazy

from weblate.addons.base import BaseAddon
from weblate.addons.events import AddonEvent
from weblate.addons.tasks import language_consistency


class LangaugeConsistencyAddon(BaseAddon):
class LanguageConsistencyAddon(BaseAddon):
events = (AddonEvent.EVENT_DAILY, AddonEvent.EVENT_POST_ADD)
name = "weblate.consistency.languages"
verbose = gettext_lazy("Add missing languages")
Expand All @@ -35,3 +37,11 @@ def post_add(self, translation) -> None:
[translation.language_id],
translation.component.project_id,
)


class LangaugeConsistencyAddon(LanguageConsistencyAddon):
warnings.warn(
"LangaugeConsistencyAddon is deprecated, use LanguageConsistencyAddon",
DeprecationWarning,
stacklevel=1,
)

0 comments on commit 4fe2ce0

Please sign in to comment.