From dceab52854dcf918a960839ce77bea344e7671a0 Mon Sep 17 00:00:00 2001 From: Amy Evans Date: Wed, 1 Oct 2025 10:22:11 -0400 Subject: [PATCH] Revert "Feature: Display Custom Tag Name on Tags Page for Single-Level Tags" --- .../ImportedFromAccountingSoftware.tsx | 27 ++----------------- src/languages/de.ts | 4 +-- src/languages/en.ts | 4 +-- src/languages/es.ts | 4 +-- src/languages/fr.ts | 4 +-- src/languages/it.ts | 4 +-- src/languages/ja.ts | 4 +-- src/languages/nl.ts | 4 +-- src/languages/params.ts | 5 ---- src/languages/pl.ts | 4 +-- src/languages/pt-BR.ts | 4 +-- src/languages/zh-hans.ts | 4 +-- .../workspace/tags/WorkspaceTagsPage.tsx | 8 +----- tests/ui/WorkspaceTagsTest.tsx | 17 +++++------- 14 files changed, 20 insertions(+), 77 deletions(-) diff --git a/src/components/ImportedFromAccountingSoftware.tsx b/src/components/ImportedFromAccountingSoftware.tsx index 4412c64b59e3..48c44573702e 100644 --- a/src/components/ImportedFromAccountingSoftware.tsx +++ b/src/components/ImportedFromAccountingSoftware.tsx @@ -10,7 +10,6 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type {ConnectionName} from '@src/types/onyx/Policy'; import Icon from './Icon'; -import RenderHTML from './RenderHTML'; import Text from './Text'; import TextBlock from './TextBlock'; import TextLinkBlock from './TextLinkBlock'; @@ -27,32 +26,15 @@ type ImportedFromAccountingSoftwareProps = { /** The translated text for the "imported from" message */ translatedText: string; - - /** The custom tag name */ - customTagName?: string; - - /** Whether we are displaying the tags */ - isDisplayingTags?: boolean; }; -function ImportedFromAccountingSoftware({ - policyID, - currentConnectionName, - translatedText, - connectedIntegration, - customTagName, - isDisplayingTags = false, -}: ImportedFromAccountingSoftwareProps) { +function ImportedFromAccountingSoftware({policyID, currentConnectionName, translatedText, connectedIntegration}: ImportedFromAccountingSoftwareProps) { const styles = useThemeStyles(); const StyleUtils = useStyleUtils(); const {translate} = useLocalize(); const {environmentURL} = useEnvironment(); const icon = getIntegrationIcon(connectedIntegration); - if (!customTagName && isDisplayingTags) { - return null; - } - return ( - . - {isDisplayingTags && !!customTagName && ( - - - - )} + . ); } diff --git a/src/languages/de.ts b/src/languages/de.ts index 1b1f77f8cf6b..8fea408a237e 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -103,7 +103,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4882,8 +4881,7 @@ const translations = { existingTagError: 'Ein Tag mit diesem Namen existiert bereits', invalidTagNameError: 'Der Tag-Name darf nicht 0 sein. Bitte wählen Sie einen anderen Wert.', genericFailureMessage: 'Beim Aktualisieren des Tags ist ein Fehler aufgetreten, bitte versuchen Sie es erneut.', - importedFromAccountingSoftware: 'Tags werden in deiner', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => ` Mitarbeiter sehen Tags als ${customTagName}.`, + importedFromAccountingSoftware: 'Die unten stehenden Tags werden aus Ihrem', glCode: 'GL-Code', updateGLCodeFailureMessage: 'Beim Aktualisieren des GL-Codes ist ein Fehler aufgetreten, bitte versuchen Sie es erneut.', tagRules: 'Tag-Regeln', diff --git a/src/languages/en.ts b/src/languages/en.ts index 34a8723b7dfa..efa510d421e3 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -92,7 +92,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4855,8 +4854,7 @@ const translations = { existingTagError: 'A tag with this name already exists', invalidTagNameError: 'Tag name cannot be 0. Please choose a different value.', genericFailureMessage: 'An error occurred while updating the tag, please try again', - importedFromAccountingSoftware: 'Tags are managed in your', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => `Employees see tags as ${customTagName}.`, + importedFromAccountingSoftware: 'The tags below are imported from your', glCode: 'GL code', updateGLCodeFailureMessage: 'An error occurred while updating the GL code, please try again', tagRules: 'Tag rules', diff --git a/src/languages/es.ts b/src/languages/es.ts index e0cd43c7ba31..ed619a2699c5 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -90,7 +90,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4863,8 +4862,7 @@ const translations = { existingTagError: 'Ya existe una etiqueta con este nombre', invalidTagNameError: 'El nombre de la etiqueta no puede ser 0. Por favor, elige un valor diferente.', genericFailureMessage: 'Se ha producido un error al actualizar la etiqueta. Por favor, inténtelo nuevamente.', - importedFromAccountingSoftware: 'Las etiquetas se gestionan en tu', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => ` Los empleados ven las etiquetas como ${customTagName}.`, + importedFromAccountingSoftware: 'Etiquetas importadas desde', glCode: 'Código de Libro Mayor', updateGLCodeFailureMessage: 'Se produjo un error al actualizar el código de Libro Mayor. Por favor, inténtelo nuevamente.', tagRules: 'Reglas de etiquetas', diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 8a68eeae5591..ddd47968853a 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -103,7 +103,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4894,8 +4893,7 @@ const translations = { existingTagError: 'Un tag avec ce nom existe déjà', invalidTagNameError: 'Le nom de la balise ne peut pas être 0. Veuillez choisir une autre valeur.', genericFailureMessage: "Une erreur s'est produite lors de la mise à jour du tag, veuillez réessayer.", - importedFromAccountingSoftware: 'Les étiquettes sont gérées dans votre', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => ` Les employés voient les étiquettes comme ${customTagName}.`, + importedFromAccountingSoftware: 'Les balises ci-dessous sont importées de votre', glCode: 'Code GL', updateGLCodeFailureMessage: "Une erreur s'est produite lors de la mise à jour du code GL, veuillez réessayer.", tagRules: 'Règles de balise', diff --git a/src/languages/it.ts b/src/languages/it.ts index 3eea0cb3bb8b..ee1f74654001 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -103,7 +103,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4896,8 +4895,7 @@ const translations = { existingTagError: 'Un tag con questo nome esiste già', invalidTagNameError: 'Il nome del tag non può essere 0. Si prega di scegliere un valore diverso.', genericFailureMessage: "Si è verificato un errore durante l'aggiornamento del tag, riprova.", - importedFromAccountingSoftware: 'I tag sono gestiti nel tuo', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => ` I dipendenti vedono i tag come ${customTagName}.`, + importedFromAccountingSoftware: 'I tag qui sotto sono importati dal tuo', glCode: 'Codice GL', updateGLCodeFailureMessage: "Si è verificato un errore durante l'aggiornamento del codice GL, riprova.", tagRules: 'Regole dei tag', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 9fa1e780cf11..c09c40204ecc 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -103,7 +103,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4856,8 +4855,7 @@ const translations = { existingTagError: 'この名前のタグはすでに存在します', invalidTagNameError: 'タグ名は0にできません。別の値を選んでください。', genericFailureMessage: 'タグの更新中にエラーが発生しました。もう一度お試しください。', - importedFromAccountingSoftware: 'タグは次で管理されています:', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => ` 従業員にはタグが次のように表示されます: ${customTagName}.`, + importedFromAccountingSoftware: '以下のタグはあなたのからインポートされます', glCode: 'GLコード', updateGLCodeFailureMessage: 'GLコードの更新中にエラーが発生しました。もう一度お試しください。', tagRules: 'タグルール', diff --git a/src/languages/nl.ts b/src/languages/nl.ts index df38e5e8d44a..05130d6ac1a1 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -103,7 +103,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4889,8 +4888,7 @@ const translations = { existingTagError: 'Er bestaat al een tag met deze naam.', invalidTagNameError: 'Tagnaam kan niet 0 zijn. Kies een andere waarde.', genericFailureMessage: 'Er is een fout opgetreden bij het bijwerken van de tag, probeer het alstublieft opnieuw.', - importedFromAccountingSoftware: 'Tags worden beheerd in je', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => `Werknemers zien tags als ${customTagName}.`, + importedFromAccountingSoftware: 'De onderstaande labels zijn geïmporteerd uit uw', glCode: 'GL-code', updateGLCodeFailureMessage: 'Er is een fout opgetreden bij het bijwerken van de GL-code, probeer het alstublieft opnieuw.', tagRules: 'Tagregels', diff --git a/src/languages/params.ts b/src/languages/params.ts index cef0caa963e4..78cab888c574 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -9,10 +9,6 @@ type AddressLineParams = { lineNumber: number; }; -type EmployeesSeeTagsAsParams = { - customTagName: string; -}; - type CharacterLimitParams = { limit: number | string; }; @@ -1245,7 +1241,6 @@ export type { BusinessRegistrationNumberParams, DependentMultiLevelTagsSubtitleParams, PayAndDowngradeDescriptionParams, - EmployeesSeeTagsAsParams, DisconnectYourBankAccountParams, MergeAccountIntoParams, }; diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 82ca3242acc4..a6c2eee19719 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -103,7 +103,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4879,8 +4878,7 @@ const translations = { existingTagError: 'Tag o tej nazwie już istnieje', invalidTagNameError: 'Nazwa tagu nie może być 0. Proszę wybrać inną wartość.', genericFailureMessage: 'Wystąpił błąd podczas aktualizacji tagu, spróbuj ponownie.', - importedFromAccountingSoftware: 'Tagi są zarządzane w Twoim', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => `Pracownicy widzą tagi jako ${customTagName}.`, + importedFromAccountingSoftware: 'Tagi poniżej są importowane z twojego', glCode: 'Kod GL', updateGLCodeFailureMessage: 'Wystąpił błąd podczas aktualizacji kodu GL, spróbuj ponownie.', tagRules: 'Zasady tagów', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index f5e806f2c1ec..3b050f23a4f9 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -103,7 +103,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4884,8 +4883,7 @@ const translations = { existingTagError: 'Uma tag com este nome já existe', invalidTagNameError: 'O nome da tag não pode ser 0. Por favor, escolha um valor diferente.', genericFailureMessage: 'Ocorreu um erro ao atualizar a tag, por favor, tente novamente.', - importedFromAccountingSoftware: 'As tags são gerenciadas no seu', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => `Os funcionários veem as tags como ${customTagName}.`, + importedFromAccountingSoftware: 'As tags abaixo são importadas do seu', glCode: 'Código GL', updateGLCodeFailureMessage: 'Ocorreu um erro ao atualizar o código GL, por favor, tente novamente.', tagRules: 'Regras de tag', diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 0ba574fd9767..5aef698273ac 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -103,7 +103,6 @@ import type { EditDestinationSubtitleParams, ElectronicFundsParams, EmployeeInviteMessageParams, - EmployeesSeeTagsAsParams, EmptyCategoriesSubtitleWithAccountingParams, EmptyTagsSubtitleWithAccountingParams, EnableContinuousReconciliationParams, @@ -4794,8 +4793,7 @@ const translations = { existingTagError: '具有此名称的标签已存在', invalidTagNameError: '标签名称不能为0。请选择其他值。', genericFailureMessage: '更新标签时发生错误,请重试。', - importedFromAccountingSoftware: '标签在您的系统中管理', - employeesSeeTagsAs: ({customTagName}: EmployeesSeeTagsAsParams) => `员工看到的标签为 ${customTagName}。`, + importedFromAccountingSoftware: '以下标签是从您的...导入的', glCode: 'GL代码', updateGLCodeFailureMessage: '更新总账代码时发生错误,请重试。', tagRules: '标签规则', diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index 9c6c964bae10..1292546c8f2b 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -610,16 +610,10 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { currentConnectionName={currentConnectionName} connectedIntegration={connectedIntegration} translatedText={translate('workspace.tags.importedFromAccountingSoftware')} - customTagName={policyTagLists.at(0)?.name ?? ''} - isDisplayingTags /> ) : ( - {!hasDependentTags && !!policyTagLists.at(0)?.name && ( - - - - )} + {translate('workspace.tags.subtitle')} {hasDependentTags && ( - - - - - + + + ,