"""Typed translation-key primitives for localized AEAT messages.Defines :class:`Translatable`, the string subtype imported as ``tr`` bycatalogues and diagnostic records whose importance is carried separately by:class:`BaseSeverity`."""from__future__importannotationsfrompydanticimportGetCoreSchemaHandlerfrompydantic_coreimportcore_schema
[docs]classTranslatable(str):"""A strictly-typed marker for abstract i18n keys. Used to type-hint fields that hold translation keys rather than raw user-facing strings, ensuring all translatable text can be statically identified and routed through ``tr``. """@classmethoddef__get_pydantic_core_schema__(cls,source_type:type[object],handler:GetCoreSchemaHandler,)->core_schema.CoreSchema:delsource_type,handlerreturncore_schema.no_info_after_validator_function(cls,core_schema.str_schema())