alle sprachtexte mit dot-strings ersetzt
This commit is contained in:
parent
87e2e6d401
commit
fc17f51752
1 changed files with 3 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ from modules.auth import limiter
|
||||||
|
|
||||||
# Import the attribute definition and helper functions
|
# Import the attribute definition and helper functions
|
||||||
from modules.shared.attributeUtils import getModelClasses, getModelAttributeDefinitions, AttributeResponse, AttributeDefinition
|
from modules.shared.attributeUtils import getModelClasses, getModelAttributeDefinitions, AttributeResponse, AttributeDefinition
|
||||||
from modules.shared.i18nRegistry import apiRouteContext
|
from modules.shared.i18nRegistry import apiRouteContext, _CURRENT_LANGUAGE
|
||||||
|
|
||||||
routeApiMsg = apiRouteContext("routeAttributes")
|
routeApiMsg = apiRouteContext("routeAttributes")
|
||||||
|
|
||||||
|
|
@ -51,8 +51,9 @@ def get_entity_attributes(
|
||||||
|
|
||||||
# Get model class and derive attributes from it
|
# Get model class and derive attributes from it
|
||||||
modelClass = modelClasses[entityType]
|
modelClass = modelClasses[entityType]
|
||||||
|
userLanguage = _CURRENT_LANGUAGE.get()
|
||||||
try:
|
try:
|
||||||
attribute_defs = getModelAttributeDefinitions(modelClass)
|
attribute_defs = getModelAttributeDefinitions(modelClass, userLanguage=userLanguage)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error getting attribute definitions for {entityType}: {str(e)}", exc_info=True)
|
logger.error(f"Error getting attribute definitions for {entityType}: {str(e)}", exc_info=True)
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue