mirror of https://github.com/eyhc1/rendercv.git
data_models: refactor
This commit is contained in:
parent
6a44febecf
commit
658ea3fd47
|
@ -1067,10 +1067,12 @@ class LocaleCatalog(RenderCVBaseModel):
|
||||||
"month", "months", "year", "years", "present", "abbreviations_for_months", "to"
|
"month", "months", "year", "years", "present", "abbreviations_for_months", "to"
|
||||||
)
|
)
|
||||||
@classmethod
|
@classmethod
|
||||||
def check_translations(cls, value: str, info: pydantic.ValidationInfo) -> str:
|
def update_translations(cls, value: str, info: pydantic.ValidationInfo) -> str:
|
||||||
"""Check if the translations are provided correctly."""
|
"""Update the `locale_catalog` dictionary with the provided translations."""
|
||||||
if value:
|
if value:
|
||||||
locale_catalog[info.field_name] = value
|
locale_catalog[info.field_name] = value
|
||||||
|
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
# ======================================================================================
|
# ======================================================================================
|
||||||
|
|
Loading…
Reference in New Issue