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: 0 additions & 2 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8107,15 +8107,13 @@ const CONST = {
SEARCH_KEYS: {
EXPENSES: 'expenses',
REPORTS: 'reports',
CHATS: 'chats',
SUBMIT: 'submit',
APPROVE: 'approve',
PAY: 'pay',
EXPORT: 'export',
STATEMENTS: 'statements',
UNAPPROVED_CASH: 'unapprovedCash',
UNAPPROVED_CARD: 'unapprovedCard',
EXPENSIFY_CARD: 'expensifyCard',
RECONCILIATION: 'reconciliation',
TOP_SPENDERS: 'topSpenders',
TOP_CATEGORIES: 'topCategories',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function SearchTabButton({selectedTab, isWideLayout}: SearchTabButtonProps) {

const lastQueryJSON = lastSearchParams?.queryJSON;
const lastQueryFromOnyx = lastQueryJSON ? buildSearchQueryString(lastQueryJSON) : undefined;
const defaultSearchQuery = buildCannedSearchQuery({type: CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT});
const defaultSearchQuery = buildCannedSearchQuery({type: CONST.SEARCH.DATA_TYPES.EXPENSE});
Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query: lastQueryFromOnyx ?? defaultSearchQuery}));
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import TopBar from '@components/Navigation/TopBar';
import type {SearchQueryJSON} from '@components/Search/types';
import useLocalize from '@hooks/useLocalize';
import useSearchTypeMenuSections from '@hooks/useSearchTypeMenuSections';
import CONST from '@src/CONST';

type SearchPageHeaderWideProps = {
queryJSON: SearchQueryJSON;
Expand All @@ -12,7 +13,22 @@ function SearchPageHeaderWide({queryJSON}: SearchPageHeaderWideProps) {
const {translate} = useLocalize();
const {typeMenuSections, activeItemIndex} = useSearchTypeMenuSections(queryJSON);
const selectedItem = typeMenuSections.flatMap((section) => section.menuItems).at(activeItemIndex);
const title = activeItemIndex >= 0 && selectedItem ? translate(selectedItem.translationPath) : translate('common.spend');

let title = translate('common.spend');
if (activeItemIndex >= 0 && selectedItem) {
title = translate(selectedItem.translationPath);
} else {
const {type} = queryJSON;
if (type === CONST.SEARCH.DATA_TYPES.TASK) {
title = translate(`common.tasks`);
} else if (type === CONST.SEARCH.DATA_TYPES.TRIP) {
title = translate(`travel.trips`);
} else if (type === CONST.SEARCH.DATA_TYPES.INVOICE) {
title = translate(`workspace.common.invoices`);
} else if (type === CONST.SEARCH.DATA_TYPES.CHAT) {
title = translate(`common.chats`);
}
}

return (
<TopBar
Expand Down
1 change: 0 additions & 1 deletion src/hooks/useSearchShouldCalculateTotals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function useSearchShouldCalculateTotals(searchKey: SearchKey | undefined, search
CONST.SEARCH.SEARCH_KEYS.STATEMENTS,
CONST.SEARCH.SEARCH_KEYS.UNAPPROVED_CASH,
CONST.SEARCH.SEARCH_KEYS.UNAPPROVED_CARD,
CONST.SEARCH.SEARCH_KEYS.EXPENSIFY_CARD,
CONST.SEARCH.SEARCH_KEYS.RECONCILIATION,
CONST.SEARCH.SEARCH_KEYS.TOP_CATEGORIES,
CONST.SEARCH.SEARCH_KEYS.TOP_MERCHANTS,
Expand Down
1 change: 0 additions & 1 deletion src/hooks/useSearchTypeMenuSections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ const useSearchTypeMenuSections = (queryParams?: UseSearchTypeMenuSectionsParams
const typeToGenericKey: Record<string, string> = {
[CONST.SEARCH.DATA_TYPES.EXPENSE]: CONST.SEARCH.SEARCH_KEYS.EXPENSES,
[CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT]: CONST.SEARCH.SEARCH_KEYS.REPORTS,
[CONST.SEARCH.DATA_TYPES.CHAT]: CONST.SEARCH.SEARCH_KEYS.CHATS,
};
const fallbackKey = type ? typeToGenericKey[type] : undefined;
if (fallbackKey) {
Expand Down
32 changes: 18 additions & 14 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ const translations: TranslationDeepObject<typeof en> = {
collapsed: 'Eingeklappt',
expanded: 'Ausgeklappt',
expenseReport: 'Spesenabrechnung',
expenseReports: 'Spesenabrechnungen',
rateOutOfPolicy: 'Satz außerhalb der Richtlinie',
leaveWorkspace: 'Arbeitsbereich verlassen',
leaveWorkspaceConfirmation: 'Wenn du diesen Workspace verlässt, kannst du keine Ausgaben mehr dafür einreichen.',
Expand All @@ -454,9 +453,6 @@ const translations: TranslationDeepObject<typeof en> = {
comments: 'Kommentare',
sharedIn: 'Geteilt in',
unreported: 'Nicht gemeldet',
explore: 'Entdecken',
insights: 'Insights',
todo: 'To-do',
invoice: 'Rechnung',
expense: 'Ausgabe',
chat: 'Chat',
Expand Down Expand Up @@ -4174,7 +4170,6 @@ ${amount} für ${merchant} – ${date}`,
everyone: 'Alle',
delete: 'Arbeitsbereich löschen',
settings: 'Einstellungen',
reimburse: 'Erstattungen',
categories: 'Kategorien',
tags: 'Tags',
customField1: 'Benutzerdefiniertes Feld 1',
Expand Down Expand Up @@ -7588,20 +7583,11 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
resetColumns: 'Spalten zurücksetzen',
groupColumns: 'Spalten gruppieren',
expenseColumns: 'Spalten für Ausgaben',
statements: 'Abrechnungen',
cardStatements: 'Kartenabrechnungen',
monthlyAccrual: 'Monatliche Abgrenzung',
unapprovedCash: 'Nicht genehmigtes Bargeld',
unapprovedCard: 'Nicht genehmigte Karte',
reconciliation: 'Abstimmung',
topSpenders: 'Top-Ausgaben',
saveSearch: 'Suche speichern',
deleteSavedSearch: 'Gespeicherte Suche löschen',
deleteSavedSearchConfirm: 'Möchtest du diese Suche wirklich löschen?',
searchName: 'Namen suchen',
savedSearchesMenuItemTitle: 'Gespeichert',
topCategories: 'Top-Kategorien',
topMerchants: 'Top-Händler',
groupedExpenses: 'gruppierte Ausgaben',
bulkActions: {
editMultiple: 'Mehrere bearbeiten',
Expand Down Expand Up @@ -7762,6 +7748,24 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
pleaseSelectDatesForBothFromAndTo: 'Bitte wähle Daten für Von und Bis',
},
spendOverTime: 'Ausgaben im Zeitverlauf',
tabs: {
expenseReports: 'Spesenabrechnungen',
reports: 'Alle Berichte',
expenses: 'Alle Ausgaben',
submit: 'Entwürfe',
approve: 'Genehmigung erforderlich',
pay: 'Zahlungsbereit',
accounting: 'Buchhaltung',
export: 'Export ausstehend',
unapprovedCash: 'Kassenabgrenzungen',
unapprovedCard: 'Kartenabgrenzungen',
statements: 'Kartenabrechnungen',
reconciliation: 'Bankabstimmung',
insights: 'Einblicke',
topSpenders: 'Höchste Ausgaben',
topCategories: 'Topkategorien',
topMerchants: 'Top-Händler',
},
},
genericErrorPage: {
title: 'Ups, da ist etwas schiefgelaufen!',
Expand Down
32 changes: 18 additions & 14 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ const translations = {
collapsed: 'Collapsed',
expanded: 'Expanded',
expenseReport: 'Expense Report',
expenseReports: 'Expense Reports',
// @context Rate as a noun, not a verb
rateOutOfPolicy: 'Rate out of policy',
leaveWorkspace: 'Leave workspace',
Expand All @@ -476,9 +475,6 @@ const translations = {
comments: 'Comments',
sharedIn: 'Shared in',
unreported: 'Unreported',
explore: 'Explore',
insights: 'Insights',
todo: 'To-do',
invoice: 'Invoice',
expense: 'Expense',
chat: 'Chat',
Expand Down Expand Up @@ -4238,7 +4234,6 @@ const translations = {
everyone: 'Everyone',
delete: 'Delete workspace',
settings: 'Settings',
reimburse: 'Reimbursements',
categories: 'Categories',
tags: 'Tags',
customField1: 'Custom field 1',
Expand Down Expand Up @@ -7514,6 +7509,24 @@ const translations = {
screenShareRequest: 'Expensify is inviting you to a screen share',
},
search: {
tabs: {
expenseReports: 'Expense reports',
reports: 'All reports',
expenses: 'All expenses',
submit: 'Drafts',
approve: 'Needs approval',
pay: 'Ready to pay',
accounting: 'Accounting',
export: 'Awaiting export',
unapprovedCash: 'Cash accruals',
unapprovedCard: 'Card accruals',
statements: 'Card statements',
reconciliation: 'Bank reconciliation',
insights: 'Insights',
topSpenders: 'Top spenders',
topCategories: 'Top categories',
topMerchants: 'Top merchants',
},
resultsAreLimited: 'Search results are limited.',
viewResults: 'View results',
appliedFilters: 'Applied filters',
Expand Down Expand Up @@ -7577,20 +7590,11 @@ const translations = {
resetColumns: 'Reset columns',
groupColumns: 'Group columns',
expenseColumns: 'Expense Columns',
statements: 'Statements',
cardStatements: 'Card statements',
monthlyAccrual: 'Monthly accrual',
unapprovedCash: 'Unapproved cash',
unapprovedCard: 'Unapproved card',
reconciliation: 'Reconciliation',
topSpenders: 'Top spenders',
saveSearch: 'Save search',
deleteSavedSearch: 'Delete saved search',
deleteSavedSearchConfirm: 'Are you sure you want to delete this search?',
searchName: 'Search name',
savedSearchesMenuItemTitle: 'Saved',
topCategories: 'Top categories',
topMerchants: 'Top merchants',
spendOverTime: 'Spend over time',
groupedExpenses: 'grouped expenses',
bulkActions: {
Expand Down
32 changes: 18 additions & 14 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ const translations: TranslationDeepObject<typeof en> = {
collapsed: 'Contraído',
expanded: 'Expandido',
expenseReport: 'Informe de Gastos',
expenseReports: 'Informes de Gastos',
rateOutOfPolicy: 'Tasa fuera de póliza',
leaveWorkspace: 'Salir del espacio de trabajo',
leaveWorkspaceConfirmation: 'Si sales de este espacio de trabajo, no podrás enviar gastos en él.',
Expand All @@ -379,9 +378,6 @@ const translations: TranslationDeepObject<typeof en> = {
comments: 'Comentarios',
sharedIn: 'Compartido en',
unreported: 'No reportado',
explore: 'Explorar',
insights: 'Información',
todo: 'Tereas',
invoice: 'Factura',
expense: 'Gasto',
chat: 'Chat',
Expand Down Expand Up @@ -4062,7 +4058,6 @@ ${amount} para ${merchant} - ${date}`,
everyone: 'Todos',
delete: 'Eliminar espacio de trabajo',
settings: 'Configuración',
reimburse: 'Reembolsos',
categories: 'Categorías',
tags: 'Etiquetas',
customField1: 'Campo personalizado 1',
Expand Down Expand Up @@ -7375,6 +7370,24 @@ ${amount} para ${merchant} - ${date}`,
screenShareRequest: 'Expensify te está invitando a compartir la pantalla',
},
search: {
tabs: {
expenseReports: 'Informes de gastos',
reports: 'Todos los informes',
expenses: 'Todos los gastos',
submit: 'Borradores',
approve: 'Necesita aprobación',
pay: 'Listo para pagar',
accounting: 'Contabilidad',
export: 'Pendiente de exportación',
unapprovedCash: 'Acumulaciones de efectivo',
unapprovedCard: 'Acumulaciones de tarjeta',
statements: 'Extractos de tarjeta',
reconciliation: 'Conciliación bancaria',
insights: 'Información',
topSpenders: 'Mayores gastadores',
topCategories: 'Categorías principales',
topMerchants: 'Principales comerciantes',
},
resultsAreLimited: 'Los resultados de búsqueda están limitados.',
viewResults: 'Ver resultados',
appliedFilters: 'Filtros aplicados',
Expand Down Expand Up @@ -7435,13 +7448,6 @@ ${amount} para ${merchant} - ${date}`,
resetColumns: 'Restablecer columnas',
groupColumns: 'Columnas de grupo',
expenseColumns: 'Columnas de gastos',
statements: 'Extractos',
cardStatements: 'Extractos de tarjeta',
monthlyAccrual: 'Devengo mensual',
unapprovedCash: 'Efectivo no aprobado',
unapprovedCard: 'Tarjeta no aprobada',
reconciliation: 'Conciliación',
topSpenders: 'Mayores gastadores',
display: {
label: 'Mostrar',
sortBy: 'Ordenar por',
Expand All @@ -7453,8 +7459,6 @@ ${amount} para ${merchant} - ${date}`,
view: {label: 'Ver', table: 'Tabla', bar: 'Barra', line: 'Línea', pie: 'Circular'},
saveSearch: 'Guardar búsqueda',
savedSearchesMenuItemTitle: 'Guardadas',
topCategories: 'Categorías principales',
topMerchants: 'Principales comerciantes',
spendOverTime: 'Evolución de gastos',
searchName: 'Nombre de la búsqueda',
deleteSavedSearch: 'Eliminar búsqueda guardada',
Expand Down
32 changes: 18 additions & 14 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ const translations: TranslationDeepObject<typeof en> = {
collapsed: 'Réduit',
expanded: 'Développé',
expenseReport: 'Note de frais',
expenseReports: 'Notes de frais',
rateOutOfPolicy: 'Taux hors politique',
leaveWorkspace: 'Quitter l’espace de travail',
leaveWorkspaceConfirmation: 'Si vous quittez cet espace de travail, vous ne pourrez plus lui soumettre de dépenses.',
Expand All @@ -454,9 +453,6 @@ const translations: TranslationDeepObject<typeof en> = {
comments: 'Commentaires',
sharedIn: 'Partagé dans',
unreported: 'Non déclarée',
explore: 'Explorer',
insights: 'Analyses',
todo: 'À faire',
invoice: 'Facture',
expense: 'Dépense',
chat: 'Discussion',
Expand Down Expand Up @@ -4183,7 +4179,6 @@ ${amount} pour ${merchant} - ${date}`,
everyone: 'Tout le monde',
delete: 'Supprimer l’espace de travail',
settings: 'Paramètres',
reimburse: 'Remboursements',
categories: 'Catégories',
tags: 'Tags',
customField1: 'Champ personnalisé 1',
Expand Down Expand Up @@ -7610,20 +7605,11 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
resetColumns: 'Réinitialiser les colonnes',
groupColumns: 'Regrouper les colonnes',
expenseColumns: 'Colonnes de dépenses',
statements: 'Relevés',
cardStatements: 'Relevés de carte',
monthlyAccrual: 'Régularisation mensuelle',
unapprovedCash: 'Espèces non approuvées',
unapprovedCard: 'Carte non approuvée',
reconciliation: 'Rapprochement',
topSpenders: 'Plus gros dépensiers',
saveSearch: 'Enregistrer la recherche',
deleteSavedSearch: 'Supprimer la recherche enregistrée',
deleteSavedSearchConfirm: 'Voulez-vous vraiment supprimer cette recherche ?',
searchName: 'Rechercher un nom',
savedSearchesMenuItemTitle: 'Enregistré',
topCategories: 'Catégories principales',
topMerchants: 'Commerçants principaux',
groupedExpenses: 'dépenses groupées',
bulkActions: {
editMultiple: 'Modifier plusieurs',
Expand Down Expand Up @@ -7784,6 +7770,24 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
pleaseSelectDatesForBothFromAndTo: 'Veuillez sélectionner des dates pour De et À',
},
spendOverTime: 'Dépenses dans le temps',
tabs: {
expenseReports: 'Notes de frais',
reports: 'Toutes les notes de frais',
expenses: 'Toutes les dépenses',
submit: 'Brouillons',
approve: 'Nécessite une approbation',
pay: 'Prêt à payer',
accounting: 'Comptabilité',
export: 'En attente d’exportation',
unapprovedCash: 'Provisions de trésorerie',
unapprovedCard: 'Provisions sur cartes',
statements: 'Relevés de carte',
reconciliation: 'Rapprochement bancaire',
insights: 'Analyses',
topSpenders: 'Plus gros dépensiers',
topCategories: 'Catégories principales',
topMerchants: 'Meilleurs commerçants',
},
},
genericErrorPage: {
title: 'Oups, quelque chose s’est mal passé !',
Expand Down
Loading
Loading