You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Developer design a permissions dialog
This commit is contained in:
@@ -103,6 +103,8 @@ export interface IVariables {
|
||||
|
||||
type Tags = Record<string, (sub: string) => React.ReactNode>;
|
||||
|
||||
export type TranslatedString = string | React.ReactNode;
|
||||
|
||||
/*
|
||||
* Translates text and optionally also replaces XML-ish elements in the text with e.g. React components
|
||||
* @param {string} text The untranslated text, e.g "click <a>here</a> now to %(foo)s".
|
||||
@@ -121,7 +123,7 @@ type Tags = Record<string, (sub: string) => React.ReactNode>;
|
||||
*/
|
||||
export function _t(text: string, variables?: IVariables): string;
|
||||
export function _t(text: string, variables: IVariables, tags: Tags): React.ReactNode;
|
||||
export function _t(text: string, variables?: IVariables, tags?: Tags): string | React.ReactNode {
|
||||
export function _t(text: string, variables?: IVariables, tags?: Tags): TranslatedString {
|
||||
// Don't do substitutions in counterpart. We handle it ourselves so we can replace with React components
|
||||
// However, still pass the variables to counterpart so that it can choose the correct plural if count is given
|
||||
// It is enough to pass the count variable, but in the future counterpart might make use of other information too
|
||||
|
||||
Reference in New Issue
Block a user