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
2 changes: 1 addition & 1 deletion src/components/ReferralProgramCTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function ReferralProgramCTA({referralContentType, style, onDismiss}: ReferralPro
}}
style={[styles.touchableButtonImage]}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('common.close')}
accessibilityLabel={translate(`referralProgram.${referralContentType}.closeAccessibilityLabel`)}
Copy link
Contributor

Choose a reason for hiding this comment

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

❌ CONSISTENCY-3 (docs)

This PR introduces 20 new closeAccessibilityLabel translation strings across 10 language files, but each value is simply a composition of existing translations: translate('common.close') + the existing header + a "banner" suffix. This duplicates data that already exists in the header field and must be kept in sync manually across all languages.

The existing Banner.tsx (line 134) already solves this exact problem dynamically:

accessibilityLabel={text ? `${translate('common.close')}, ${text}` : translate('common.close')}

Apply the same pattern here to avoid 20 hardcoded translation strings that can drift out of sync with their corresponding header values:

accessibilityLabel={`${translate('common.close')}, ${translate(`referralProgram.${referralContentType}.header`)}`}

This eliminates all closeAccessibilityLabel keys from every language file and stays consistent with the established Banner.tsx pattern.


Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

sentryLabel={CONST.SENTRY_LABEL.REFERRAL_PROGRAM.DISMISS_BUTTON}
>
<Icon
Expand Down
2 changes: 2 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7856,11 +7856,13 @@ Fordern Sie Spesendetails wie Belege und Beschreibungen an, legen Sie Limits und
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: 'Beginne einen Chat, <success><strong>empfiehl eine:n Freund:in</strong></success>.',
header: 'Chat starten, Freund empfehlen',
closeAccessibilityLabel: 'Schließen, einen Chat starten, einen Freund empfehlen, Banner',
body: 'Möchtest du, dass deine Freund*innen Expensify auch nutzen? Starte einfach einen Chat mit ihnen, und wir kümmern uns um den Rest.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: 'Reiche eine Ausgabe ein, <success><strong>wirb dein Team</strong></success>.',
header: 'Reiche eine Ausgabe ein, wirb dein Team an',
closeAccessibilityLabel: 'Schließen, eine Ausgabe einreichen, dein Team einladen, Banner',
body: 'Möchtest du, dass dein Team Expensify auch nutzt? Reiche ihnen einfach eine Ausgabe ein und wir kümmern uns um den Rest.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
2 changes: 2 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7828,11 +7828,13 @@ const translations = {
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: 'Start a chat, <success><strong>refer a friend</strong></success>.',
header: 'Start a chat, refer a friend',
closeAccessibilityLabel: 'Close, start a chat, refer a friend, banner',
body: "Want your friends to use Expensify, too? Just start a chat with them and we'll take care of the rest.",
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: 'Submit an expense, <success><strong>refer your team</strong></success>.',
header: 'Submit an expense, refer your team',
closeAccessibilityLabel: 'Close, submit an expense, refer your team, banner',
body: "Want your team to use Expensify, too? Just submit an expense to them and we'll take care of the rest.",
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
2 changes: 2 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8073,11 +8073,13 @@ ${amount} para ${merchant} - ${date}`,
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: 'Inicia un chat y <success><strong>recomienda a un amigo</strong></success>',
header: 'Inicia un chat, recomienda a un amigo',
closeAccessibilityLabel: 'Cerrar, iniciar un chat, recomendar a un amigo, banner',
body: '¿Quieres que tus amigos también usen Expensify? Simplemente inicia un chat con ellos y nosotros nos encargaremos del resto.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: 'Presenta un gasto y <success><strong>recomienda a tu equipo</strong></success>',
header: 'Envía un gasto, recomienda a tu equipo',
closeAccessibilityLabel: 'Cerrar, enviar un gasto, recomendar a tu equipo, banner',
body: '¿Quieres que tu equipo también use Expensify? Simplemente envíale un gasto y nosotros nos encargaremos del resto.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
2 changes: 2 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7879,11 +7879,13 @@ Rendez obligatoires des informations de dépense comme les reçus et les descrip
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: 'Démarrez une discussion, <success><strong>parrainez un ami</strong></success>.',
header: 'Commencez une discussion, parrainez un ami',
closeAccessibilityLabel: 'Fermer, démarrer un chat, parrainer un ami, bannière',
body: 'Vous voulez que vos amis utilisent Expensify, eux aussi ? Il vous suffit de commencer une discussion avec eux et nous nous occupons du reste.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: 'Soumettez une dépense, <success><strong>parrainez votre équipe</strong></success>.',
header: 'Soumettez une dépense, parrainez votre équipe',
closeAccessibilityLabel: 'Fermer, soumettre une dépense, parrainer votre équipe, bannière',
body: 'Vous voulez que votre équipe utilise Expensify, elle aussi ? Soumettez-leur simplement une dépense et nous nous occupons du reste.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
2 changes: 2 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7843,11 +7843,13 @@ Richiedi dettagli sulle spese come ricevute e descrizioni, imposta limiti e valo
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: 'Avvia una chat, <success><strong>presenta un amico</strong></success>.',
header: 'Avvia una chat, invita un amico',
closeAccessibilityLabel: 'Chiudi, avvia una chat, invita un amico, banner',
body: 'Vuoi che anche i tuoi amici usino Expensify? Inizia una chat con loro e ci occuperemo noi del resto.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: 'Invia una nota spese, <success><strong>presenta il tuo team</strong></success>.',
header: 'Invia una spesa, invita il tuo team',
closeAccessibilityLabel: 'Chiudi, invia una spesa, invita il tuo team, banner',
body: 'Vuoi che anche il tuo team usi Expensify? Invia loro una spesa e noi ci occuperemo del resto.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
2 changes: 2 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7755,11 +7755,13 @@ ${reportName}
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: 'チャットを開始して、<success><strong>友達を紹介しましょう</strong></success>。',
header: 'チャットを開始、友達を紹介',
closeAccessibilityLabel: '閉じる、チャットを開始、友達を紹介、バナー',
body: '友だちにもExpensifyを使ってほしいですか?チャットを開始するだけで、あとはお任せください。',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: '経費を申請し、<success><strong>チームを紹介しましょう</strong></success>。',
header: '経費を提出し、チームを紹介する',
closeAccessibilityLabel: '閉じる、経費を提出、チームを紹介、バナー',
body: 'あなたのチームにもExpensifyを使ってほしいですか?チームに経費精算を1件提出するだけで、あとは私たちにお任せください。',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
2 changes: 2 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7821,11 +7821,13 @@ Vereis onkostendetails zoals bonnen en beschrijvingen, stel limieten en standaar
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: 'Begin een chat, <success><strong>verwijs een vriend</strong></success>.',
header: 'Begin een chat, verwijs een vriend',
closeAccessibilityLabel: 'Sluiten, een chat starten, een vriend doorverwijzen, banner',
body: 'Wil je dat je vrienden ook Expensify gebruiken? Begin gewoon een chat met hen en wij regelen de rest.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: 'Dien een uitgave in, <success><strong>verwijs je team door</strong></success>.',
header: 'Dien een uitgave in, verwijs je team',
closeAccessibilityLabel: 'Sluiten, een uitgave indienen, je team uitnodigen, banner',
body: 'Wil je dat je team Expensify ook gebruikt? Dien gewoon een uitgave bij hen in en wij zorgen voor de rest.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7809,11 +7809,13 @@ Wymagaj szczegółów wydatków, takich jak paragony i opisy, ustawiaj limity i
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: 'Rozpocznij czat, <success><strong>poleć znajomego</strong></success>.',
header: 'Rozpocznij czat, poleć znajomego',
closeAccessibilityLabel: 'Zamknij, rozpocznij czat, poleć znajomego, baner',
body: 'Chcesz, aby Twoi znajomi też korzystali z Expensify? Po prostu rozpocznij z nimi czat, a my zajmiemy się resztą.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: 'Złóż raport wydatków, <success><strong>poleć swój zespół</strong></success>.',
header: 'Wyślij wydatek, poleć swój zespół',
closeAccessibilityLabel: 'Zamknij, prześlij wydatek, poleć swój zespół, baner',
body: 'Chcesz, aby Twój zespół też korzystał z Expensify? Po prostu prześlij im wydatek, a my zajmiemy się resztą.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7813,11 +7813,13 @@ Exija dados de despesas como recibos e descrições, defina limites e padrões e
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: 'Inicie um chat, <success><strong>indique um amigo</strong></success>.',
header: 'Inicie um chat, indique um amigo',
closeAccessibilityLabel: 'Fechar, iniciar um chat, indicar um amigo, banner',
body: 'Quer que seus amigos também usem o Expensify? É só começar um chat com eles e nós cuidamos do resto.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: 'Envie uma despesa, <success><strong>indique sua equipe</strong></success>.',
header: 'Envie uma despesa, indique sua equipe',
closeAccessibilityLabel: 'Fechar, enviar uma despesa, indicar sua equipe, banner',
body: 'Quer que sua equipe também use o Expensify? Basta enviar uma despesa para eles e nós cuidaremos do resto.',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
2 changes: 2 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7621,11 +7621,13 @@ ${reportName}
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.START_CHAT]: {
buttonText: '开始聊天,<success><strong>推荐好友</strong></success>。',
header: '开始聊天,推荐好友',
closeAccessibilityLabel: '关闭、开始聊天、推荐朋友、横幅',
body: '也想让你的朋友使用 Expensify 吗?只需与他们开始一个聊天,剩下的交给我们。',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE]: {
buttonText: '提交报销,<success><strong>推荐你的团队</strong></success>。',
header: '报销一笔费用,推荐你的团队',
closeAccessibilityLabel: '关闭、提交费用、邀请团队、横幅',
body: '也想让你的团队使用 Expensify 吗?只需向他们提交一笔报销,我们会帮你处理剩下的一切。',
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
Expand Down
Loading