Skip to content

[Feat] Add i18n support for TextLoop component#88

Open
eaximonka-bot wants to merge 1 commit intobraposo:masterfrom
eaximonka-bot:feat/i18n-support
Open

[Feat] Add i18n support for TextLoop component#88
eaximonka-bot wants to merge 1 commit intobraposo:masterfrom
eaximonka-bot:feat/i18n-support

Conversation

@eaximonka-bot
Copy link

This PR adds internationalization support to the TextLoop component.

Changes include:

  • New src/i18n.ts with a lightweight translation function and predefined language packs.
  • New src/types.ts with LanguageCode type definition.
  • TextLoop component updated to accept optional lang and translations props, prioritizing provided translations for string children while maintaining backward compatibility.
  • Unit tests added in src/tests/TextLoop.test.tsx covering default behavior, language switching, and missing translation fallbacks.
  • README updated with an "Internationalization" section including usage examples.

Constraints adhered to:

  • No changes to package.json, build configs, or examples.
  • TypeScript types respected, avoiding use of any.

Please review and let me know if any adjustments are needed.

…8n utilities and types; add unit tests; update README with Internationalization section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant