Skip to content

Add tags support to i18n api#227

Open
florianduros wants to merge 2 commits intomainfrom
florianduros/i18n-tags
Open

Add tags support to i18n api#227
florianduros wants to merge 2 commits intomainfrom
florianduros/i18n-tags

Conversation

@florianduros
Copy link
Copy Markdown
Member

@florianduros florianduros commented Mar 26, 2026

@florianduros florianduros marked this pull request as ready for review March 26, 2026 14:06
@florianduros florianduros requested a review from a team as a code owner March 26, 2026 14:06
* The value a variable or tag can take for a translation interpolation.
* @public
*/
export type SubstitutionValue = number | string | ReactNode | ((sub: string) => ReactNode);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc for what sub means here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in a4c4d0c

Comment on lines 61 to +72
/**
* Perform a translation, with optional variables
* @param key - The key to translate
* @param variables - Optional variables to interpolate into the translation
*/
translate(this: void, key: keyof Translations, variables?: Variables): string;
/**
* Perform a translation, with optional variables
* @param key - The key to translate
* @param variables - Optional variables to interpolate into the translation
* @param tags - Optional tags to interpolate into the translation
*/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels a bit duplicative to have most of the doc doubled up

Copy link
Copy Markdown
Member Author

@florianduros florianduros Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep but if i don't the line is commented as undocumented in the generated api:

image

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.

2 participants