[fix] i18n import error
This commit is contained in:
@@ -61,6 +61,12 @@ from app.i18n.logger import (
|
|||||||
log_translation_error,
|
log_translation_error,
|
||||||
)
|
)
|
||||||
from app.i18n.middleware import LanguageMiddleware
|
from app.i18n.middleware import LanguageMiddleware
|
||||||
|
from app.i18n.serializers import (
|
||||||
|
I18nResponseMixin,
|
||||||
|
WorkspaceSerializer,
|
||||||
|
WorkspaceMemberSerializer,
|
||||||
|
WorkspaceInviteSerializer,
|
||||||
|
)
|
||||||
from app.i18n.service import (
|
from app.i18n.service import (
|
||||||
TranslationService,
|
TranslationService,
|
||||||
get_translation_service,
|
get_translation_service,
|
||||||
@@ -86,6 +92,11 @@ __all__ = [
|
|||||||
"get_translation_logger",
|
"get_translation_logger",
|
||||||
"log_missing_translation",
|
"log_missing_translation",
|
||||||
"log_translation_error",
|
"log_translation_error",
|
||||||
|
# Serializers
|
||||||
|
"I18nResponseMixin",
|
||||||
|
"WorkspaceSerializer",
|
||||||
|
"WorkspaceMemberSerializer",
|
||||||
|
"WorkspaceInviteSerializer",
|
||||||
# Exception classes
|
# Exception classes
|
||||||
"I18nException",
|
"I18nException",
|
||||||
"BadRequestError",
|
"BadRequestError",
|
||||||
|
|||||||
@@ -72,7 +72,9 @@ class I18nResponseMixin:
|
|||||||
Returns:
|
Returns:
|
||||||
添加了 _display 字段的字典
|
添加了 _display 字段的字典
|
||||||
"""
|
"""
|
||||||
from app.i18n.service import translation_service
|
from app.i18n.service import get_translation_service
|
||||||
|
|
||||||
|
translation_service = get_translation_service()
|
||||||
|
|
||||||
result = data.copy()
|
result = data.copy()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user