From 2dbe41160ec6a3f21658e59d33429698cbb8beaf Mon Sep 17 00:00:00 2001 From: Shubham Agrawal Date: Mon, 21 Jul 2025 18:54:28 +0530 Subject: [PATCH] Merge empty tag and category subtitle translations --- .../BaseHTMLEngineProvider.tsx | 6 +++ src/languages/de.ts | 20 ++++------ src/languages/en.ts | 20 ++++------ src/languages/es.ts | 20 ++++------ src/languages/fr.ts | 20 ++++------ src/languages/it.ts | 20 ++++------ src/languages/ja.ts | 20 ++++------ src/languages/nl.ts | 20 ++++------ src/languages/params.ts | 10 +++++ src/languages/pl.ts | 20 ++++------ src/languages/pt-BR.ts | 20 ++++------ src/languages/zh-hans.ts | 20 ++++------ .../categories/WorkspaceCategoriesPage.tsx | 34 ++++++++--------- .../workspace/tags/WorkspaceTagsPage.tsx | 38 +++++++------------ 14 files changed, 114 insertions(+), 174 deletions(-) diff --git a/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx b/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx index b97f22c1dd2b..67b03c9d50f8 100755 --- a/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx +++ b/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx @@ -73,6 +73,11 @@ function BaseHTMLEngineProvider({textSelectable = false, children, enableExperim mixedUAStyles: {...styles.mutedNormalTextLabel, ...styles.mb0}, contentModel: HTMLContentModel.block, }), + 'centered-text': HTMLElementModel.fromCustomModel({ + tagName: 'centered-text', + mixedUAStyles: {...styles.textAlignCenter}, + contentModel: HTMLContentModel.block, + }), comment: HTMLElementModel.fromCustomModel({ tagName: 'comment', getMixedUAStyles: (tnode) => { @@ -168,6 +173,7 @@ function BaseHTMLEngineProvider({textSelectable = false, children, enableExperim styles.blockquote, styles.onlyEmojisTextLineHeight, styles.subTextFileUpload, + styles.textAlignCenter, ], ); /* eslint-enable @typescript-eslint/naming-convention */ diff --git a/src/languages/de.ts b/src/languages/de.ts index 736f7e1a7e11..28af64c60620 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -93,6 +93,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4445,11 +4447,8 @@ const translations = { emptyCategories: { title: 'Sie haben noch keine Kategorien erstellt.', subtitle: 'Fügen Sie eine Kategorie hinzu, um Ihre Ausgaben zu organisieren.', - }, - emptyCategoriesWithAccounting: { - subtitle1: 'Ihre Kategorien werden derzeit aus einer Buchhaltungsverbindung importiert. Gehen Sie zu', - subtitle2: 'Buchhaltung', - subtitle3: 'um Änderungen vorzunehmen.', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `Ihre Kategorien werden derzeit aus einer Buchhaltungsverbindung importiert. Gehen Sie zur Buchhaltung, um Änderungen vorzunehmen.`, }, updateFailureMessage: 'Beim Aktualisieren der Kategorie ist ein Fehler aufgetreten, bitte versuchen Sie es erneut.', createFailureMessage: 'Beim Erstellen der Kategorie ist ein Fehler aufgetreten, bitte versuchen Sie es erneut.', @@ -4714,14 +4713,9 @@ const translations = { title: 'Sie haben noch keine Tags erstellt.', // We need to remove the subtitle and use the below one when we remove the canUseMultiLevelTags beta subtitle: 'Fügen Sie ein Tag hinzu, um Projekte, Standorte, Abteilungen und mehr zu verfolgen.', - subtitle1: 'Importieren Sie eine Tabelle, um Tags für die Verfolgung von Projekten, Standorten, Abteilungen und mehr hinzuzufügen.', - subtitle2: 'Erfahren Sie mehr', - subtitle3: 'über das Formatieren von Tag-Dateien.', - }, - emptyTagsWithAccounting: { - subtitle1: 'Ihre Tags werden derzeit aus einer Buchhaltungsverbindung importiert. Gehen Sie zu', - subtitle2: 'Buchhaltung', - subtitle3: 'um Änderungen vorzunehmen.', + subtitleHTML: `Importieren Sie eine Kalkulationstabelle, um Tags für die Verfolgung von Projekten, Standorten, Abteilungen und mehr hinzuzufügen. Erfahren Sie mehr über die Formatierung von Tag-Dateien.`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `Your tags are currently importing from an accounting connection. Gehen Sie zur Buchhaltung, um Änderungen vorzunehmen.`, }, deleteTag: 'Tag löschen', deleteTags: 'Tags löschen', diff --git a/src/languages/en.ts b/src/languages/en.ts index b3feb0833787..6b39012fdab0 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -81,6 +81,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4426,11 +4428,8 @@ const translations = { emptyCategories: { title: "You haven't created any categories", subtitle: 'Add a category to organize your spend.', - }, - emptyCategoriesWithAccounting: { - subtitle1: 'Your categories are currently importing from an accounting connection. Head over to ', - subtitle2: 'accounting', - subtitle3: ' to make any changes.', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `Your categories are currently importing from an accounting connection. Head over to accounting to make any changes.`, }, updateFailureMessage: 'An error occurred while updating the category, please try again', createFailureMessage: 'An error occurred while creating the category, please try again', @@ -4692,14 +4691,9 @@ const translations = { title: "You haven't created any tags", // We need to remove the subtitle and use the below one when we remove the canUseMultiLevelTags beta subtitle: 'Add a tag to track projects, locations, departments, and more.', - subtitle1: 'Import a spreadsheet to add tags for tracking projects, locations, departments, and more.', - subtitle2: ' Learn more', - subtitle3: ' about formatting tag files.', - }, - emptyTagsWithAccounting: { - subtitle1: 'Your tags are currently importing from an accounting connection. Head over to ', - subtitle2: 'accounting', - subtitle3: ' to make any changes.', + subtitleHTML: `Import a spreadsheet to add tags for tracking projects, locations, departments, and more. Learn more about formatting tag files.`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `Your tags are currently importing from an accounting connection. Head over to accounting to make any changes.`, }, deleteTag: 'Delete tag', deleteTags: 'Delete tags', diff --git a/src/languages/es.ts b/src/languages/es.ts index dad6c6c7b2c4..62d1375d23b9 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -80,6 +80,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4437,11 +4439,8 @@ const translations = { emptyCategories: { title: 'No has creado ninguna categoría', subtitle: 'Añade una categoría para organizar tu gasto.', - }, - emptyCategoriesWithAccounting: { - subtitle1: 'Tus categorías se están importando actualmente desde una conexión de contabilidad. Dirígete a ', - subtitle2: 'contabilidad', - subtitle3: ' para hacer cualquier cambio.', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `Tus categorías se están importando actualmente desde una conexión de contabilidad. Dirígete a contabilidad para hacer cualquier cambio.`, }, updateFailureMessage: 'Se ha producido un error al intentar eliminar la categoría. Por favor, inténtalo más tarde.', createFailureMessage: 'Se ha producido un error al intentar crear la categoría. Por favor, inténtalo más tarde.', @@ -4705,14 +4704,9 @@ const translations = { emptyTags: { title: 'No has creado ninguna etiqueta', subtitle: 'Añade una etiqueta para realizar el seguimiento de proyectos, ubicaciones, departamentos y otros.', - subtitle1: 'Importa una hoja de cálculo para añadir etiquetas y organizar proyectos, ubicaciones, departamentos y más.', - subtitle2: ' Obtén más información', - subtitle3: ' sobre cómo dar formato a los archivos de etiquetas.', - }, - emptyTagsWithAccounting: { - subtitle1: 'Tus etiquetas se están importando actualmente desde una conexión de contabilidad. Dirígete a ', - subtitle2: 'contabilidad', - subtitle3: ' para hacer cualquier cambio.', + subtitleHTML: `Importa una hoja de cálculo para añadir etiquetas y organizar proyectos, ubicaciones, departamentos y más. Obtén más información sobre cómo dar formato a los archivos de etiquetas.`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `Tus etiquetas se están importando actualmente desde una conexión de contabilidad. Dirígete a contabilidad para hacer cualquier cambio.`, }, deleteTag: 'Eliminar etiqueta', deleteTags: 'Eliminar etiquetas', diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 0a93058fe15f..46ac811ad364 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -93,6 +93,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4456,11 +4458,8 @@ const translations = { emptyCategories: { title: "Vous n'avez créé aucune catégorie", subtitle: 'Ajoutez une catégorie pour organiser vos dépenses.', - }, - emptyCategoriesWithAccounting: { - subtitle1: 'Vos catégories sont actuellement importées depuis une connexion comptable. Rendez-vous sur', - subtitle2: 'comptabilité', - subtitle3: 'pour apporter des modifications.', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `Vos catégories sont actuellement importées à partir d'une connexion comptable. Allez dans la comptabilité pour faire des changements.`, }, updateFailureMessage: "Une erreur s'est produite lors de la mise à jour de la catégorie, veuillez réessayer.", createFailureMessage: "Une erreur s'est produite lors de la création de la catégorie, veuillez réessayer.", @@ -4728,14 +4727,9 @@ const translations = { title: "Vous n'avez créé aucun tag", // We need to remove the subtitle and use the below one when we remove the canUseMultiLevelTags beta subtitle: 'Ajoutez une étiquette pour suivre les projets, les emplacements, les départements, et plus encore.', - subtitle1: 'Importez une feuille de calcul pour ajouter des étiquettes afin de suivre les projets, les emplacements, les départements, et plus encore.', - subtitle2: 'En savoir plus', - subtitle3: 'à propos des fichiers de balises de formatage.', - }, - emptyTagsWithAccounting: { - subtitle1: "Vos balises sont actuellement importées à partir d'une connexion comptable. Rendez-vous sur", - subtitle2: 'comptabilité', - subtitle3: 'pour apporter des modifications.', + subtitleHTML: `Importez une feuille de calcul pour ajouter des balises permettant de suivre les projets, les lieux, les services, etc. En savoir plus sur le formatage des fichiers de balises.`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `Vos étiquettes sont actuellement importées à partir d'une connexion comptable. Allez dans la comptabilité pour faire des changements.`, }, deleteTag: 'Supprimer le tag', deleteTags: 'Supprimer les balises', diff --git a/src/languages/it.ts b/src/languages/it.ts index 0eb90ebe2243..02383835595f 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -93,6 +93,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4459,11 +4461,8 @@ const translations = { emptyCategories: { title: 'Non hai creato nessuna categoria', subtitle: 'Aggiungi una categoria per organizzare le tue spese.', - }, - emptyCategoriesWithAccounting: { - subtitle1: 'Le tue categorie sono attualmente in fase di importazione da una connessione contabile. Vai su', - subtitle2: 'contabilità', - subtitle3: 'per apportare qualsiasi modifica.', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `Le categorie vengono attualmente importate da una connessione contabile. Passare alla contabilità per apportare eventuali modifiche.`, }, updateFailureMessage: "Si è verificato un errore durante l'aggiornamento della categoria, riprova.", createFailureMessage: 'Si è verificato un errore durante la creazione della categoria, per favore riprova.', @@ -4728,14 +4727,9 @@ const translations = { title: 'Non hai creato alcun tag', // We need to remove the subtitle and use the below one when we remove the canUseMultiLevelTags beta subtitle: 'Aggiungi un tag per tracciare progetti, sedi, reparti e altro.', - subtitle1: 'Importa un foglio di calcolo per aggiungere tag per il monitoraggio di progetti, sedi, dipartimenti e altro.', - subtitle2: 'Scopri di più', - subtitle3: 'about formatting tag files.', - }, - emptyTagsWithAccounting: { - subtitle1: 'I tuoi tag sono attualmente in fase di importazione da una connessione contabile. Vai su', - subtitle2: 'contabilità', - subtitle3: 'per apportare qualsiasi modifica.', + subtitleHTML: `Importare un foglio di calcolo per aggiungere tag per tracciare progetti, sedi, reparti e altro ancora. Ulteriori informazioni sulla formattazione dei file di tag.`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `I tag vengono attualmente importati da una connessione contabile. Passare alla contabilità per apportare eventuali modifiche.`, }, deleteTag: 'Elimina tag', deleteTags: 'Elimina tag', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 2f1832db095e..1f667766c2a4 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -93,6 +93,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4441,11 +4443,8 @@ const translations = { emptyCategories: { title: 'カテゴリが作成されていません', subtitle: '支出を整理するためにカテゴリーを追加してください。', - }, - emptyCategoriesWithAccounting: { - subtitle1: 'あなたのカテゴリは現在、会計接続からインポートされています。こちらに移動してください', - subtitle2: '会計', - subtitle3: '変更を加えるために。', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `あなたのカテゴリーは現在、会計接続からインポートされています。会計に移動して変更してください。`, }, updateFailureMessage: 'カテゴリの更新中にエラーが発生しました。もう一度お試しください。', createFailureMessage: 'カテゴリの作成中にエラーが発生しました。もう一度お試しください。', @@ -4708,14 +4707,9 @@ const translations = { title: 'タグが作成されていません', // We need to remove the subtitle and use the below one when we remove the canUseMultiLevelTags beta subtitle: 'プロジェクト、場所、部門などを追跡するためのタグを追加します。', - subtitle1: 'スプレッドシートをインポートして、プロジェクト、場所、部門などの追跡用タグを追加します。', - subtitle2: '詳細を確認', - subtitle3: 'フォーマットタグファイルについて。', - }, - emptyTagsWithAccounting: { - subtitle1: 'あなたのタグは現在、会計接続からインポートされています。こちらに移動して', - subtitle2: '会計', - subtitle3: '変更を加えるために。', + subtitleHTML: `スプレッドシートをインポートして、プロジェクト、場所、部署などを追跡するためのタグを追加できます。タグファイルのフォーマットについてはこちらをご覧ください。`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `タグは現在、会計接続からインポートされています。アカウンティングに移動して変更してください。`, }, deleteTag: 'タグを削除', deleteTags: 'タグを削除', diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 5d1c2e5184ac..5ee226f0454f 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -93,6 +93,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4464,11 +4466,8 @@ const translations = { emptyCategories: { title: 'Je hebt nog geen categorieën aangemaakt', subtitle: 'Voeg een categorie toe om uw uitgaven te organiseren.', - }, - emptyCategoriesWithAccounting: { - subtitle1: 'Je categorieën worden momenteel geïmporteerd vanuit een boekhoudkoppeling. Ga naar', - subtitle2: 'boekhouding', - subtitle3: 'om wijzigingen aan te brengen.', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `Je categorieën worden momenteel geïmporteerd vanuit een boekhoudkoppeling. Ga naar de boekhouding om wijzigingen aan te brengen.`, }, updateFailureMessage: 'Er is een fout opgetreden bij het bijwerken van de categorie, probeer het alstublieft opnieuw.', createFailureMessage: 'Er is een fout opgetreden bij het aanmaken van de categorie, probeer het alstublieft opnieuw.', @@ -4730,14 +4729,9 @@ const translations = { title: 'Je hebt nog geen tags aangemaakt', // We need to remove the subtitle and use the below one when we remove the canUseMultiLevelTags beta subtitle: 'Voeg een tag toe om projecten, locaties, afdelingen en meer bij te houden.', - subtitle1: 'Importeer een spreadsheet om tags toe te voegen voor het bijhouden van projecten, locaties, afdelingen en meer.', - subtitle2: 'Meer informatie', - subtitle3: 'over het formatteren van tagbestanden.', - }, - emptyTagsWithAccounting: { - subtitle1: 'Uw tags worden momenteel geïmporteerd vanuit een boekhoudkoppeling. Ga naar', - subtitle2: 'boekhouding', - subtitle3: 'om wijzigingen aan te brengen.', + subtitleHTML: `Importeer een spreadsheet om tags toe te voegen voor het volgen van projecten, locaties, afdelingen en meer. Meer informatie over het opmaken van tagbestanden.`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `Je tags worden momenteel geïmporteerd vanuit een boekhoudverbinding. Ga naar de boekhouding om wijzigingen aan te brengen.`, }, deleteTag: 'Verwijder tag', deleteTags: 'Verwijder tags', diff --git a/src/languages/params.ts b/src/languages/params.ts index e90b92435fe8..9f0150166cdc 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -793,6 +793,14 @@ type BusinessTaxIDParams = { country: string; }; +type EmptyCategoriesSubtitleWithAccountingParams = { + accountingPageURL: string; +}; + +type EmptyTagsSubtitleWithAccountingParams = { + accountingPageURL: string; +}; + export type { ContactMethodsRouteParams, ContactMethodParams, @@ -1070,4 +1078,6 @@ export type { WorkspacesListRouteParams, WorkspaceRouteParams, BusinessTaxIDParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, }; diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 7175fe2e439d..8cb8af90da6b 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -93,6 +93,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4451,11 +4453,8 @@ const translations = { emptyCategories: { title: 'Nie utworzyłeś żadnych kategorii', subtitle: 'Dodaj kategorię, aby zorganizować swoje wydatki.', - }, - emptyCategoriesWithAccounting: { - subtitle1: 'Twoje kategorie są obecnie importowane z połączenia księgowego. Przejdź do', - subtitle2: 'księgowość', - subtitle3: 'aby wprowadzić jakiekolwiek zmiany.', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `Twoje kategorie są obecnie importowane z połączenia księgowego. Przejdź do działu księgowości, aby wprowadzić zmiany.`, }, updateFailureMessage: 'Wystąpił błąd podczas aktualizacji kategorii, spróbuj ponownie.', createFailureMessage: 'Wystąpił błąd podczas tworzenia kategorii, spróbuj ponownie.', @@ -4719,14 +4718,9 @@ const translations = { title: 'Nie utworzyłeś żadnych tagów', // We need to remove the subtitle and use the below one when we remove the canUseMultiLevelTags beta subtitle: 'Dodaj tag, aby śledzić projekty, lokalizacje, działy i inne.', - subtitle1: 'Zaimportuj arkusz kalkulacyjny, aby dodać tagi do śledzenia projektów, lokalizacji, działów i innych.', - subtitle2: 'Dowiedz się więcej', - subtitle3: 'about formatting tag files.', - }, - emptyTagsWithAccounting: { - subtitle1: 'Twoje tagi są obecnie importowane z połączenia księgowego. Przejdź do', - subtitle2: 'księgowość', - subtitle3: 'aby wprowadzić jakiekolwiek zmiany.', + subtitleHTML: `Zaimportuj arkusz kalkulacyjny, aby dodać tagi do śledzenia projektów, lokalizacji, działów i nie tylko. Dowiedz się więcej o formatowaniu plików tagów.`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `Twoje tagi są obecnie importowane z połączenia księgowego. Przejdź do działu księgowości, aby wprowadzić zmiany.`, }, deleteTag: 'Usuń tag', deleteTags: 'Usuń tagi', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 1d43d58ff60f..33d320be4851 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -93,6 +93,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4457,11 +4459,8 @@ const translations = { emptyCategories: { title: 'Você não criou nenhuma categoria', subtitle: 'Adicione uma categoria para organizar seus gastos.', - }, - emptyCategoriesWithAccounting: { - subtitle1: 'Suas categorias estão sendo importadas de uma conexão contábil. Vá para', - subtitle2: 'contabilidade', - subtitle3: 'fazer quaisquer alterações.', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `No momento, suas categorias estão sendo importadas de uma conexão de contabilidade. Vá para a contabilidade para fazer alterações.`, }, updateFailureMessage: 'Ocorreu um erro ao atualizar a categoria, por favor, tente novamente.', createFailureMessage: 'Ocorreu um erro ao criar a categoria, por favor, tente novamente.', @@ -4724,14 +4723,9 @@ const translations = { title: 'Você não criou nenhuma tag', // We need to remove the subtitle and use the below one when we remove the canUseMultiLevelTags beta subtitle: 'Adicione uma tag para rastrear projetos, locais, departamentos e mais.', - subtitle1: 'Importe uma planilha para adicionar tags para rastrear projetos, locais, departamentos e mais.', - subtitle2: 'Saiba mais', - subtitle3: 'sobre arquivos de formatação de tags.', - }, - emptyTagsWithAccounting: { - subtitle1: 'Seus tags estão sendo importados de uma conexão contábil. Vá para', - subtitle2: 'contabilidade', - subtitle3: 'fazer quaisquer alterações.', + subtitleHTML: `Importe uma planilha para adicionar tags para rastrear projetos, locais, departamentos e muito mais. Saiba mais sobre a formatação de arquivos de tags.`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `No momento, suas tags estão sendo importadas de uma conexão de contabilidade. Vá para a contabilidade para fazer alterações.`, }, deleteTag: 'Excluir tag', deleteTags: 'Excluir tags', diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 5d7b2e39b964..4e662e3679d2 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -93,6 +93,8 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, + EmptyCategoriesSubtitleWithAccountingParams, + EmptyTagsSubtitleWithAccountingParams, EnterMagicCodeParams, ExportAgainModalDescriptionParams, ExportedToIntegrationParams, @@ -4382,11 +4384,8 @@ const translations = { emptyCategories: { title: '您尚未创建任何类别', subtitle: '添加一个类别来组织您的支出。', - }, - emptyCategoriesWithAccounting: { - subtitle1: '您的类别目前正在从会计连接中导入。前往', - subtitle2: '会计', - subtitle3: '进行任何更改。', + subtitleWithAccounting: ({accountingPageURL}: EmptyCategoriesSubtitleWithAccountingParams) => + `您的类别目前是从会计连接导入的。请前往会计部门进行更改。`, }, updateFailureMessage: '更新类别时发生错误,请重试。', createFailureMessage: '创建类别时发生错误,请重试。', @@ -4646,14 +4645,9 @@ const translations = { title: '您尚未创建任何标签', // We need to remove the subtitle and use the below one when we remove the canUseMultiLevelTags beta subtitle: '添加标签以跟踪项目、地点、部门等。', - subtitle1: '导入电子表格以添加标签,用于跟踪项目、地点、部门等。', - subtitle2: '了解更多', - subtitle3: '关于格式化标签文件。', - }, - emptyTagsWithAccounting: { - subtitle1: '您的标签目前正在从会计连接导入。前往', - subtitle2: '会计', - subtitle3: '进行任何更改。', + subtitleHTML: `导入电子表格,为跟踪项目、地点、部门等添加标签。了解有关标签文件格式的更多信息。`, + subtitleWithAccounting: ({accountingPageURL}: EmptyTagsSubtitleWithAccountingParams) => + `您的标签目前是从会计连接导入的。请前往会计部门进行更改。`, }, deleteTag: '删除标签', deleteTags: '删除标签', diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index 53accfba95be..51f8678d9f7a 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -10,6 +10,7 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton'; import * as Expensicons from '@components/Icon/Expensicons'; import * as Illustrations from '@components/Icon/Illustrations'; import LottieAnimations from '@components/LottieAnimations'; +import RenderHTML from '@components/RenderHTML'; import ScreenWrapper from '@components/ScreenWrapper'; import ScrollView from '@components/ScrollView'; import SearchBar from '@components/SearchBar'; @@ -437,25 +438,20 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { )} ); - const subtitleText = useMemo( - () => ( - - {!policyHasAccountingConnections ? translate('workspace.categories.emptyCategories.subtitle') : translate(`workspace.categories.emptyCategoriesWithAccounting.subtitle1`)} - {policyHasAccountingConnections && ( - <> - Navigation.navigate(ROUTES.POLICY_ACCOUNTING.getRoute(policyId))} - > - {translate(`workspace.categories.emptyCategoriesWithAccounting.subtitle2`)} - - {translate(`workspace.categories.emptyCategoriesWithAccounting.subtitle3`)}{' '} - - )} - - ), - [styles.textAlignCenter, styles.textSupporting, styles.textNormal, policyHasAccountingConnections, translate, policyId], - ); + const subtitleText = useMemo(() => { + if (!policyHasAccountingConnections) { + return {translate('workspace.categories.emptyCategories.subtitle')}; + } + return ( + + + + ); + }, [policyHasAccountingConnections, styles.renderHTML, styles.textAlignCenter, styles.textSupporting, styles.textNormal, translate, environmentURL, policyId]); return ( ); - const emptyTagsCopy = hasAccountingConnections ? 'emptyTagsWithAccounting' : 'emptyTags'; - const subtitleText = useMemo( - () => ( - - {translate(`workspace.tags.${emptyTagsCopy}.subtitle1`)} - {hasAccountingConnections ? ( - Navigation.navigate(ROUTES.POLICY_ACCOUNTING.getRoute(policyID))} - > - {translate(`workspace.tags.${emptyTagsCopy}.subtitle2`)} - - ) : ( - - {translate(`workspace.tags.${emptyTagsCopy}.subtitle2`)} - - )} - {translate(`workspace.tags.${emptyTagsCopy}.subtitle3`)} - - ), - [styles.textAlignCenter, styles.textNormal, styles.textSupporting, translate, emptyTagsCopy, hasAccountingConnections, policyID], - ); + const subtitleText = useMemo(() => { + const emptyTagsSubtitle = hasAccountingConnections + ? translate('workspace.tags.emptyTags.subtitleWithAccounting', { + accountingPageURL: `${environmentURL}/${ROUTES.POLICY_ACCOUNTING.getRoute(policyID)}`, + }) + : translate('workspace.tags.emptyTags.subtitleHTML'); + return ( + + + + ); + }, [hasAccountingConnections, translate, environmentURL, policyID, styles.renderHTML]); return ( <>