From 368f9ad0c83eaeb40d4f7ae293d73d11714271e0 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 12 Apr 2024 19:47:51 +0200 Subject: [PATCH] Fix: fix bug with incorrect translation context for themes --- src/Models/ThemeConfig/Conversion/PrepareTheme.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Models/ThemeConfig/Conversion/PrepareTheme.ts b/src/Models/ThemeConfig/Conversion/PrepareTheme.ts index 04d9e9232b..bcf0a79245 100644 --- a/src/Models/ThemeConfig/Conversion/PrepareTheme.ts +++ b/src/Models/ThemeConfig/Conversion/PrepareTheme.ts @@ -286,9 +286,10 @@ class AddContextToTranslationsInLayout extends DesugaringStep ) } - convert(json: LayoutConfigJson, context: ConversionContext): LayoutConfigJson { + convert(json: LayoutConfigJson): LayoutConfigJson { const conversion = new AddContextToTranslations("themes:") - return conversion.convert(json, context) + // The context is used to generate the 'context' in the translation .It _must_ be `json.id` to correctly link into weblate + return conversion.convert(json, ConversionContext.construct([json.id],["AddContextToTranslation"])) } }