Skip to content

Commit

Permalink
Merge pull request #7 from vardario/sahin/fix
Browse files Browse the repository at this point in the history
fix: extractKeysFromComponent
  • Loading branch information
sahinvardar authored Jun 7, 2023
2 parents 00d5066 + b1deded commit 15fbb6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vardario/svelte-i18next",
"version": "0.1.6",
"version": "0.1.7",
"description": "",
"license": "MIT",
"author": "Sahin Vardar",
Expand Down
2 changes: 1 addition & 1 deletion src/extract-i18n-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 15fbb6d

Please sign in to comment.