Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ function BaseHTMLEngineProvider({textSelectable = false, children, enableExperim
mixedUAStyles: {...styles.mutedNormalTextLabel, ...styles.mb0},
contentModel: HTMLContentModel.block,
}),
'muted-text-micro': HTMLElementModel.fromCustomModel({
tagName: 'muted-text-micro',
mixedUAStyles: {...styles.textMicroSupporting, ...styles.mb0},
contentModel: HTMLContentModel.block,
}),
'centered-text': HTMLElementModel.fromCustomModel({
tagName: 'centered-text',
mixedUAStyles: {...styles.textAlignCenter},
Expand Down Expand Up @@ -181,6 +186,7 @@ function BaseHTMLEngineProvider({textSelectable = false, children, enableExperim
styles.subTextFileUpload,
styles.textAlignCenter,
styles.textSuccess,
styles.textMicroSupporting,
],
);
/* eslint-enable @typescript-eslint/naming-convention */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ function AnchorRenderer({tnode, style, key}: AnchorRendererProps) {
];
}

// Special handling for links in RBR to maintain consistent font size
// Special handling for links in label font to maintain consistent font size
if (HTMLEngineUtils.isChildOfMutedTextLabel(tnode)) {
linkStyle = [styles.mutedNormalTextLabel, styles.link];
}

// Special handling for links in micro font to maintain consistent font size
if (HTMLEngineUtils.isChildOfMutedTextMicro(tnode)) {
linkStyle = [styles.textMicroSupporting, styles.link];
}

if (tnode.classes.includes('no-style-link')) {
// If the link has a class of a no-style-link, we don't apply any styles
linkStyle = {...(style as TextStyle)};
Expand Down
26 changes: 25 additions & 1 deletion src/components/HTMLEngineProvider/htmlEngineUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,28 @@ function isChildOfMutedTextLabel(tnode: TNode): boolean {
return isChildOfMutedTextLabel(tnode.parent);
}

export {computeEmbeddedMaxWidth, isChildOfComment, isChildOfH1, isDeletedNode, isChildOfTaskTitle, isChildOfRBR, isCommentTag, getFontSizeOfRBRChild, isChildOfMutedTextLabel};
/**
* @returns Whether the node is a child of muted-text-label
*/
function isChildOfMutedTextMicro(tnode: TNode): boolean {
if (!tnode.parent) {
return false;
}
if (tnode.parent.tagName === 'muted-text-micro') {
return true;
}
return isChildOfMutedTextMicro(tnode.parent);
}

export {
computeEmbeddedMaxWidth,
isChildOfComment,
isChildOfH1,
isDeletedNode,
isChildOfTaskTitle,
isChildOfRBR,
isCommentTag,
getFontSizeOfRBRChild,
isChildOfMutedTextLabel,
isChildOfMutedTextMicro,
};
13 changes: 2 additions & 11 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1654,12 +1654,7 @@ const translations = {
restoreStashed: 'Wiederherstellen des zwischengespeicherten Logins',
signOutConfirmationText: 'Sie verlieren alle Offline-Änderungen, wenn Sie sich abmelden.',
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: 'Lesen Sie die',
phrase2: 'Nutzungsbedingungen',
phrase3: 'und',
phrase4: 'Datenschutz',
},
readTheTermsAndPrivacy: `<muted-text-micro>Lesen Sie die <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Nutzungsbedingungen</a> und <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Datenschutzbestimmungen</a>.</muted-text-micro>`,
help: 'Hilfe',
whatIsNew: 'Was ist neu',
accountSettings: 'Kontoeinstellungen',
Expand Down Expand Up @@ -5435,11 +5430,7 @@ const translations = {
changeOwnerPageTitle: 'Besitzer übertragen',
addPaymentCardTitle: 'Geben Sie Ihre Zahlungskarte ein, um die Eigentümerschaft zu übertragen.',
addPaymentCardButtonText: 'Bedingungen akzeptieren & Zahlungskarte hinzufügen',
addPaymentCardReadAndAcceptTextPart1: 'Lesen und akzeptieren',
addPaymentCardReadAndAcceptTextPart2: 'Richtlinie zum Hinzufügen Ihrer Karte',
addPaymentCardTerms: 'Bedingungen',
addPaymentCardPrivacy: 'Datenschutz',
addPaymentCardAnd: '&',
addPaymentCardReadAndAcceptText: `<muted-text-micro>Lesen und akzeptieren Sie die <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Bedingungen</a> und <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Datenschutzbestimmungen</a>, um Ihre Karte hinzuzufügen.</muted-text-micro>`,
addPaymentCardPciCompliant: 'PCI-DSS-konform',
addPaymentCardBankLevelEncrypt: 'Verschlüsselung auf Bankniveau',
addPaymentCardRedundant: 'Redundante Infrastruktur',
Expand Down
13 changes: 2 additions & 11 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1637,12 +1637,7 @@ const translations = {
restoreStashed: 'Restore stashed login',
signOutConfirmationText: "You'll lose any offline changes if you sign out.",
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: 'Read the',
phrase2: 'Terms of Service',
phrase3: 'and',
phrase4: 'Privacy',
},
readTheTermsAndPrivacy: `<muted-text-micro>Read the <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Terms of Service</a> and <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Privacy</a>.</muted-text-micro>`,
help: 'Help',
whatIsNew: "What's new",
accountSettings: 'Account settings',
Expand Down Expand Up @@ -5414,11 +5409,7 @@ const translations = {
changeOwnerPageTitle: 'Transfer owner',
addPaymentCardTitle: 'Enter your payment card to transfer ownership',
addPaymentCardButtonText: 'Accept terms & add payment card',
addPaymentCardReadAndAcceptTextPart1: 'Read and accept',
addPaymentCardReadAndAcceptTextPart2: 'policy to add your card',
addPaymentCardTerms: 'terms',
addPaymentCardPrivacy: 'privacy',
addPaymentCardAnd: '&',
addPaymentCardReadAndAcceptText: `<muted-text-micro>Read and accept <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">terms</a> & <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">privacy</a> policy to add your card.</muted-text-micro>`,
addPaymentCardPciCompliant: 'PCI-DSS compliant',
addPaymentCardBankLevelEncrypt: 'Bank level encryption',
addPaymentCardRedundant: 'Redundant infrastructure',
Expand Down
13 changes: 2 additions & 11 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1630,12 +1630,7 @@ const translations = {
signOut: 'Desconectar',
signOutConfirmationText: 'Si cierras sesión perderás los cambios hechos mientras estabas desconectado',
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: 'Leer los',
phrase2: 'Términos de Servicio',
phrase3: 'y',
phrase4: 'Privacidad',
},
readTheTermsAndPrivacy: `<muted-text-micro>Leer los <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Términos de Servicio</a> y <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Privacidad</a>.</muted-text-micro>`,
help: 'Ayuda',
whatIsNew: 'Qué hay de nuevo',
accountSettings: 'Configuración de la cuenta',
Expand Down Expand Up @@ -5426,11 +5421,7 @@ const translations = {
changeOwnerPageTitle: 'Transferir la propiedad',
addPaymentCardTitle: 'Ingrese tu tarjeta de pago para transferir la propiedad',
addPaymentCardButtonText: 'Aceptar términos y agregar tarjeta de pago',
addPaymentCardReadAndAcceptTextPart1: 'Lea y acepte',
addPaymentCardReadAndAcceptTextPart2: 'para agregar tu tarjeta',
addPaymentCardTerms: 'los términos',
addPaymentCardPrivacy: 'la política de privacidad',
addPaymentCardAnd: 'y',
addPaymentCardReadAndAcceptText: `<muted-text-micro>Lea y acepte <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">los términos</a> y <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">la política de privacidad</a> para agregar tu tarjeta.</muted-text-micro>`,
addPaymentCardPciCompliant: 'PCI-DSS obediente',
addPaymentCardBankLevelEncrypt: 'Cifrado a nivel bancario',
addPaymentCardRedundant: 'Infraestructura redundante',
Expand Down
13 changes: 2 additions & 11 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1655,12 +1655,7 @@ const translations = {
restoreStashed: 'Restaurer la connexion mise en attente',
signOutConfirmationText: 'Vous perdrez toutes les modifications hors ligne si vous vous déconnectez.',
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: 'Lire le',
phrase2: "Conditions d'utilisation",
phrase3: 'et',
phrase4: 'Confidentialité',
},
readTheTermsAndPrivacy: `<muted-text-micro>Lisez les <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Conditions d'utilisation</a> et de <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Confidentialité</a>.</muted-text-micro>`,
help: 'Aide',
whatIsNew: 'Quoi de neuf',
accountSettings: 'Paramètres du compte',
Expand Down Expand Up @@ -5451,11 +5446,7 @@ const translations = {
changeOwnerPageTitle: 'Transférer le propriétaire',
addPaymentCardTitle: 'Entrez votre carte de paiement pour transférer la propriété',
addPaymentCardButtonText: 'Accepter les conditions et ajouter une carte de paiement',
addPaymentCardReadAndAcceptTextPart1: 'Lire et accepter',
addPaymentCardReadAndAcceptTextPart2: 'politique pour ajouter votre carte',
addPaymentCardTerms: 'termes',
addPaymentCardPrivacy: 'confidentialité',
addPaymentCardAnd: '&',
addPaymentCardReadAndAcceptText: `<muted-text-micro>Lisez et acceptez les <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">termes</a> et la <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">politique de confidentialité</a> pour ajouter votre carte.</muted-text-micro>`,
addPaymentCardPciCompliant: 'Conforme à la norme PCI-DSS',
addPaymentCardBankLevelEncrypt: 'Chiffrement de niveau bancaire',
addPaymentCardRedundant: 'Infrastructure redondante',
Expand Down
13 changes: 2 additions & 11 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1648,12 +1648,7 @@ const translations = {
restoreStashed: 'Ripristina accesso nascosto',
signOutConfirmationText: 'Perderai tutte le modifiche offline se esci.',
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: 'Leggi il',
phrase2: 'Termini di Servizio',
phrase3: 'e',
phrase4: 'Privacy',
},
readTheTermsAndPrivacy: `<muted-text-micro>Leggete i <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Termini di servizioe</a> e la <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Privacy</a>.</muted-text-micro>`,
help: 'Aiuto',
whatIsNew: 'Novità',
accountSettings: 'Impostazioni account',
Expand Down Expand Up @@ -5448,11 +5443,7 @@ const translations = {
changeOwnerPageTitle: 'Trasferisci proprietario',
addPaymentCardTitle: 'Inserisci la tua carta di pagamento per trasferire la proprietà',
addPaymentCardButtonText: 'Accetta i termini e aggiungi una carta di pagamento',
addPaymentCardReadAndAcceptTextPart1: 'Leggi e accetta',
addPaymentCardReadAndAcceptTextPart2: 'politica per aggiungere la tua carta',
addPaymentCardTerms: 'termini',
addPaymentCardPrivacy: 'privacy',
addPaymentCardAnd: '&',
addPaymentCardReadAndAcceptText: `<muted-text-micro>Leggere e accettare i <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">termini</a> e <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">l'informativa sulla privacy</a> per aggiungere la carta.</muted-text-micro>`,
addPaymentCardPciCompliant: 'Conforme a PCI-DSS',
addPaymentCardBankLevelEncrypt: 'Crittografia a livello bancario',
addPaymentCardRedundant: 'Infrastruttura ridondante',
Expand Down
13 changes: 2 additions & 11 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1647,12 +1647,7 @@ const translations = {
restoreStashed: '隠されたログインを復元',
signOutConfirmationText: 'サインアウトすると、オフラインでの変更が失われます。',
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: '読む',
phrase2: '利用規約',
phrase3: 'および',
phrase4: 'プライバシー',
},
readTheTermsAndPrivacy: `<muted-text-micro><a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">利用規約</a>と<a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">プライバシー</a>をお読みください。</muted-text-micro>`,
help: '助けて',
whatIsNew: '新着情報',
accountSettings: 'アカウント設定',
Expand Down Expand Up @@ -5419,11 +5414,7 @@ const translations = {
changeOwnerPageTitle: 'オーナーを移行',
addPaymentCardTitle: '所有権を移転するために支払いカードを入力してください。',
addPaymentCardButtonText: '利用規約に同意して支払いカードを追加',
addPaymentCardReadAndAcceptTextPart1: '読み取りと承認',
addPaymentCardReadAndAcceptTextPart2: 'カードを追加するためのポリシー',
addPaymentCardTerms: '利用規約',
addPaymentCardPrivacy: 'プライバシー',
addPaymentCardAnd: '&',
addPaymentCardReadAndAcceptText: `<muted-text-micro><a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">規約</a>と<a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">プライバシー</a>ポリシーに同意してカードを追加してください。</muted-text-micro>`,
addPaymentCardPciCompliant: 'PCI-DSS 準拠',
addPaymentCardBankLevelEncrypt: '銀行レベルの暗号化',
addPaymentCardRedundant: '冗長インフラストラクチャー',
Expand Down
13 changes: 2 additions & 11 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1649,12 +1649,7 @@ const translations = {
restoreStashed: 'Herstel opgeslagen login',
signOutConfirmationText: 'U verliest alle offline wijzigingen als u zich afmeldt.',
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: 'Lees de',
phrase2: 'Servicevoorwaarden',
phrase3: 'en',
phrase4: 'Privacy',
},
readTheTermsAndPrivacy: `<muted-text-micro>Lees de <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Servicevoorwaarden</a> en <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Privacy</a>.</muted-text-micro>`,
help: 'Help',
whatIsNew: 'Wat is nieuw',
accountSettings: 'Accountinstellingen',
Expand Down Expand Up @@ -5447,11 +5442,7 @@ const translations = {
changeOwnerPageTitle: 'Eigenaar overdragen',
addPaymentCardTitle: 'Voer uw betaalkaart in om het eigendom over te dragen',
addPaymentCardButtonText: 'Accepteer voorwaarden & voeg betaalkaart toe',
addPaymentCardReadAndAcceptTextPart1: 'Lezen en accepteren',
addPaymentCardReadAndAcceptTextPart2: 'beleid om uw kaart toe te voegen',
addPaymentCardTerms: 'voorwaarden',
addPaymentCardPrivacy: 'privacy',
addPaymentCardAnd: '&',
addPaymentCardReadAndAcceptText: `<muted-text-micro>Lees en accepteer de <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">voorwaarden</a> en het <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">privacybeleid</a> om je kaart toe te voegen.</muted-text-micro>`,
addPaymentCardPciCompliant: 'PCI-DSS-conform',
addPaymentCardBankLevelEncrypt: 'Versleuteling op bankniveau',
addPaymentCardRedundant: 'Redundante infrastructuur',
Expand Down
13 changes: 2 additions & 11 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1645,12 +1645,7 @@ const translations = {
restoreStashed: 'Przywróć zapisane logowanie',
signOutConfirmationText: 'Utracisz wszystkie zmiany offline, jeśli się wylogujesz.',
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: 'Przeczytaj',
phrase2: 'Warunki korzystania z usługi',
phrase3: 'i',
phrase4: 'Prywatność',
},
readTheTermsAndPrivacy: `<muted-text-micro>Zapoznaj się z <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Warunkami korzystania z usługi</a> i <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Polityką prywatności</a>.</muted-text-micro>`,
help: 'Pomoc',
whatIsNew: 'Co nowego',
accountSettings: 'Ustawienia konta',
Expand Down Expand Up @@ -5434,11 +5429,7 @@ const translations = {
changeOwnerPageTitle: 'Przenieś właściciela',
addPaymentCardTitle: 'Wprowadź swoją kartę płatniczą, aby przenieść własność',
addPaymentCardButtonText: 'Zaakceptuj warunki i dodaj kartę płatniczą',
addPaymentCardReadAndAcceptTextPart1: 'Przeczytaj i zaakceptuj',
addPaymentCardReadAndAcceptTextPart2: 'zasady dodawania karty',
addPaymentCardTerms: 'warunki',
addPaymentCardPrivacy: 'prywatność',
addPaymentCardAnd: '&',
addPaymentCardReadAndAcceptText: `<muted-text-micro>Przeczytaj i zaakceptuj <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">warunki</a> i <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">politykę prywatności</a>, aby dodać swoją kartę.</muted-text-micro>`,
addPaymentCardPciCompliant: 'Zgodny z PCI-DSS',
addPaymentCardBankLevelEncrypt: 'Szyfrowanie na poziomie bankowym',
addPaymentCardRedundant: 'Nadmierna infrastruktura',
Expand Down
13 changes: 2 additions & 11 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1646,12 +1646,7 @@ const translations = {
restoreStashed: 'Restaurar login armazenado',
signOutConfirmationText: 'Você perderá todas as alterações offline se sair.',
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: 'Leia o',
phrase2: 'Termos de Serviço',
phrase3: 'e',
phrase4: 'Privacidade',
},
readTheTermsAndPrivacy: `<muted-text-micro>Leia os <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Termos de Serviço</a> e <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Privacidade</a>.</muted-text-micro>`,
help: 'Ajuda',
whatIsNew: 'O que há de novo',
accountSettings: 'Configurações da conta',
Expand Down Expand Up @@ -5446,11 +5441,7 @@ const translations = {
changeOwnerPageTitle: 'Transferir proprietário',
addPaymentCardTitle: 'Insira seu cartão de pagamento para transferir a propriedade',
addPaymentCardButtonText: 'Aceitar os termos e adicionar cartão de pagamento',
addPaymentCardReadAndAcceptTextPart1: 'Ler e aceitar',
addPaymentCardReadAndAcceptTextPart2: 'política para adicionar seu cartão',
addPaymentCardTerms: 'termos',
addPaymentCardPrivacy: 'privacidade',
addPaymentCardAnd: '&',
addPaymentCardReadAndAcceptText: `<muted-text-micro>Leia e aceite os <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">termos</a> e a <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">política de privacidade</a> para adicionar seu cartão.</muted-text-micro>`,
addPaymentCardPciCompliant: 'Compatível com PCI-DSS',
addPaymentCardBankLevelEncrypt: 'Criptografia de nível bancário',
addPaymentCardRedundant: 'Infraestrutura redundante',
Expand Down
Loading
Loading