From 658ea3fd473ece5c0ddbcbcc23158993e684e37a Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sun, 19 May 2024 13:54:38 +0300 Subject: [PATCH] data_models: refactor --- rendercv/data_models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rendercv/data_models.py b/rendercv/data_models.py index 8bad4c8..fdf27ef 100644 --- a/rendercv/data_models.py +++ b/rendercv/data_models.py @@ -1067,10 +1067,12 @@ class LocaleCatalog(RenderCVBaseModel): "month", "months", "year", "years", "present", "abbreviations_for_months", "to" ) @classmethod - def check_translations(cls, value: str, info: pydantic.ValidationInfo) -> str: - """Check if the translations are provided correctly.""" + def update_translations(cls, value: str, info: pydantic.ValidationInfo) -> str: + """Update the `locale_catalog` dictionary with the provided translations.""" if value: locale_catalog[info.field_name] = value + + return value # ======================================================================================