diff --git a/package.json b/package.json index 8202f3d..2796bb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vardario/svelte-i18next", - "version": "0.1.5", + "version": "0.1.6", "description": "", "license": "MIT", "author": "Sahin Vardar", diff --git a/src/i18n-preprocessor.ts b/src/i18n-preprocessor.ts index 62e61f2..13e634d 100644 --- a/src/i18n-preprocessor.ts +++ b/src/i18n-preprocessor.ts @@ -50,7 +50,7 @@ export function adjustI18nCall(ast: Ast, prefix: string, callIdentifier: string export function adjustInputElementLabels(ast: Ast, prefix: string, callIdentifier: string = '$i18n') { compiler.walk(ast.html, { enter: (node: TemplateNode) => { - 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'); const labelAttribute = node.attributes?.find((attr: any) => attr.name === 'label');