Skip to content

Commit

Permalink
fix: use display create instead of submit expense
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Nov 26, 2024
1 parent afad1ac commit 314657a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/ReportWelcomeText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
import * as OptionsListUtils from '@libs/OptionsListUtils';
import Permissions from '@libs/Permissions';
import {getPolicy} from '@libs/PolicyUtils';
import * as ReportUtils from '@libs/ReportUtils';
import SidebarUtils from '@libs/SidebarUtils';
Expand Down Expand Up @@ -51,7 +52,12 @@ function ReportWelcomeText({report, policy}: ReportWelcomeTextProps) {
item !== CONST.IOU.TYPE.INVOICE,
);
const additionalText = filteredOptions
.map((item, index) => `${index === filteredOptions.length - 1 && index > 0 ? `${translate('common.or')} ` : ''}${translate(`reportActionsView.iouTypes.${item}`)}`)
.map(
(item, index) =>
`${index === filteredOptions.length - 1 && index > 0 ? `${translate('common.or')} ` : ''}${translate(
Permissions.canUseCombinedTrackSubmit() && item === 'submit' ? `reportActionsView.create` : `reportActionsView.iouTypes.${item}`,
)}`,
)
.join(', ');
const canEditPolicyDescription = ReportUtils.canEditPolicyDescription(policy);
const reportName = ReportUtils.getReportName(report);
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ const translations = {
welcomeToRoom: ({roomName}: WelcomeToRoomParams) => `Welcome to ${roomName}!`,
usePlusButton: ({additionalText}: UsePlusButtonParams) => `\nUse the + button to ${additionalText} an expense.`,
askConcierge: '\nAsk questions and get 24/7 realtime support.',
create: 'create',
iouTypes: {
pay: 'pay',
split: 'split',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ const translations = {
welcomeToRoom: ({roomName}: WelcomeToRoomParams) => `¡Bienvenido a ${roomName}!`,
usePlusButton: ({additionalText}: UsePlusButtonParams) => `\nUsa el botón + para ${additionalText} un gasto`,
askConcierge: 'Haz preguntas y obtén soporte en tiempo real las 24/7.',
create: 'crear',
iouTypes: {
pay: 'pagar',
split: 'dividir',
Expand Down

0 comments on commit 314657a

Please sign in to comment.