From b1deded2aee2ebdea86526273d3bb764f6c8a143 Mon Sep 17 00:00:00 2001 From: Sahin Vardar Date: Wed, 7 Jun 2023 20:39:13 +0200 Subject: [PATCH] fix: extractKeysFromComponent --- package.json | 2 +- src/extract-i18n-keys.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2796bb6..e438281 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vardario/svelte-i18next", - "version": "0.1.6", + "version": "0.1.7", "description": "", "license": "MIT", "author": "Sahin Vardar", diff --git a/src/extract-i18n-keys.ts b/src/extract-i18n-keys.ts index b36b84a..4a4dc38 100644 --- a/src/extract-i18n-keys.ts +++ b/src/extract-i18n-keys.ts @@ -23,7 +23,7 @@ function extractKeysFromComponent(ast: Ast, callIdentifier: string): string[] { } } - if (node.type === 'InlineComponent' && node.name === 'Input') { + if (node.type === 'InlineComponent' && ['Input', 'Checkbox'].includes(node.name)) { const nameAttribute = node.attributes?.find((attr: any) => attr.name === 'name'); if (nameAttribute) { result.push(nameAttribute.value[0].data);