Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Chat - Most of the workspace modifying settings messages are not translated in #Admins. #53238

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
959c3df
fix: Chat - Most of the workspace modifying settings messages are not…
Krishna2323 Nov 28, 2024
db62a60
Merge branch 'Expensify:main' into krishna2323/issue/52984
Krishna2323 Dec 3, 2024
b06352b
add translations for 'CORPORATE_UPGRADE' & 'ADD_CATEGORY'.
Krishna2323 Dec 3, 2024
0c5061a
refactor and added more translations.
Krishna2323 Dec 3, 2024
a2487bf
minor fix.
Krishna2323 Dec 3, 2024
fb92c2c
Merge branch 'main' into krishna2323/issue/52984
Krishna2323 Dec 8, 2024
bde1c30
add translations form 'POLICYCHANGELOG_UPDATE_FIELD' & 'POLICYCHANGEL…
Krishna2323 Dec 8, 2024
2e7cd0f
minor update.
Krishna2323 Dec 8, 2024
5eb19d9
minor update.
Krishna2323 Dec 8, 2024
2e277b7
move action messages util function to ReportActionsUtils.ts.
Krishna2323 Dec 8, 2024
1e8fc36
fix merge conflicts.
Krishna2323 Dec 14, 2024
ce8a0a3
Merge branch 'main' into krishna2323/issue/52984
Krishna2323 Dec 14, 2024
f086d7c
update changes in PureReportActionItem.
Krishna2323 Dec 14, 2024
404a382
add translation for UPDATE_MAX_EXPENSE_AMOUNT_NO_RECEIPT & PREVENT_SE…
Krishna2323 Dec 15, 2024
a25ffaf
add translations form UPDATE_MAX_EXPENSE_AMOUNT & MAX_EXPENSE_AGE.
Krishna2323 Dec 15, 2024
ea07da4
add translations form UPDATE_DEFAULT_TITLE_ENFORCED & UPDATE_DEFAULT_…
Krishna2323 Dec 15, 2024
4d16405
minor update.
Krishna2323 Dec 15, 2024
c51c16e
Merge branch 'main' into krishna2323/issue/52984
Krishna2323 Dec 22, 2024
e569d7a
Merge branch 'main' into krishna2323/issue/52984
Krishna2323 Jan 4, 2025
9ca0ab3
Merge branch 'Expensify:main' into krishna2323/issue/52984
Krishna2323 Jan 7, 2025
e6552f5
add translation for description update.
Krishna2323 Jan 7, 2025
d26e83a
add translation for team downgrade policy change.
Krishna2323 Jan 7, 2025
206cb43
added report field addition policy change log translation.
Krishna2323 Jan 7, 2025
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
12 changes: 12 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2482,6 +2482,14 @@ const CONST = {
SMARTREPORT: 'SMARTREPORT',
BILLCOM: 'BILLCOM',
},
APPROVAL_MODE_VALUES: {
OPTIONAL: 'Submit and Close',
BASIC: 'Submit and Approve',
ADVANCED: 'ADVANCED',
DYNAMICEXTERNAL: 'DYNAMIC_EXTERNAL',
SMARTREPORT: 'SMARTREPORT',
BILLCOM: 'BILLCOM',
},
ROOM_PREFIX: '#',
CUSTOM_UNIT_RATE_BASE_OFFSET: 100,
OWNER_EMAIL_FAKE: '_FAKE_',
Expand Down Expand Up @@ -2558,6 +2566,10 @@ const CONST = {
AUTOREPORTING_OFFSET: 'autoReportingOffset',
GENERAL_SETTINGS: 'generalSettings',
},
EXPENSE_REPORT_RULES: {
PREVENT_SELF_APPROVAL: 'preventSelfApproval',
MAX_EXPENSE_AGE: 'maxExpenseAge',
},
CONNECTIONS: {
NAME: {
// Here we will add other connections names when we add support for them
Expand Down
31 changes: 31 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {Country} from '@src/CONST';
import type {
AccountOwnerParams,
ActionsAreCurrentlyRestricted,
AddedPolicyReportFieldParams,
AddEmployeeParams,
AddressLineParams,
AdminCanceledRequestParams,
Expand Down Expand Up @@ -171,6 +172,14 @@ import type {
UnapproveWithIntegrationWarningParams,
UnshareParams,
UntilTimeParams,
UpdatedPolicyCategoryNameParams,
UpdatedPolicyCategoryParams,
UpdatedPolicyCurrencyParams,
UpdatedPolicyDescriptionParams,
UpdatedPolicyFieldWithNewAndOldValueParams,
UpdatedPolicyFieldWithValueParam,
UpdatedPolicyFrequencyParams,
UpdatedPolicyPreventSelfApprovalParams,
UpdatedTheDistanceMerchantParams,
UpdatedTheRequestParams,
UpdateRoleParams,
Expand Down Expand Up @@ -1528,6 +1537,7 @@ const translations = {
},
frequencyDescription: 'Choose how often you’d like expenses to submit automatically, or make it manual',
frequencies: {
instant: 'Instant',
weekly: 'Weekly',
monthly: 'Monthly',
twiceAMonth: 'Twice a month',
Expand Down Expand Up @@ -4589,7 +4599,23 @@ const translations = {
},
},
workspaceActions: {
addCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `added the category "${categoryName}"`,
deleteCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `removed the category "${categoryName}"`,
updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'disabled' : 'enabled'} the category "${categoryName}"`,
setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `renamed the category "${oldName}" to "${newName}"`,
addedReportField: ({fieldType, fieldName}: AddedPolicyReportFieldParams) => `added ${fieldType} Report Field "${fieldName}"`,
preventSelfApproval: ({oldValue, newValue}: UpdatedPolicyPreventSelfApprovalParams) =>
`updated "Prevent Self-Approval" from "${oldValue === 'true' ? 'Enabled' : 'Disabled'}" to "${newValue === 'true' ? 'Enabled' : 'Disabled'}"`,
updateMaxExpenseAmountNoReceipt: ({oldValue, newValue}: UpdatedPolicyFieldWithNewAndOldValueParams) =>
`changed the maximum receipt required expense amount from ${oldValue} to ${newValue}`,
updateMaxExpenseAmount: ({oldValue, newValue}: UpdatedPolicyFieldWithNewAndOldValueParams) => `changed the maximum expense amount for violations from ${oldValue} to ${newValue}`,
updateMaxExpenseAge: ({oldValue, newValue}: UpdatedPolicyFieldWithNewAndOldValueParams) =>
`updated "Max Expense Age (Days)" from "${oldValue === 'false' ? CONST.POLICY.DEFAULT_MAX_EXPENSE_AGE : oldValue}" to "${newValue}"`,
updateDefaultBillable: ({oldValue, newValue}: UpdatedPolicyFieldWithNewAndOldValueParams) => `updated "Re-bill expenses to clients" from "${oldValue}" to "${newValue}"`,
updateDefaultTitleEnforced: ({value}: UpdatedPolicyFieldWithValueParam) => `turned "Enforce Default Report Title" ${value ? 'on' : 'off'}`,
renamedWorkspaceNameAction: ({oldName, newName}: RenamedRoomActionParams) => `updated the name of this workspace to "${newName}" (previously "${oldName}")`,
updateWorkspaceDescription: ({newDescription, oldDescription}: UpdatedPolicyDescriptionParams) =>
!oldDescription ? `set the description of this workspace to "${newDescription}"` : `updated the description of this workspace from "${oldDescription}" to "${newDescription}"`,
removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => {
let joinedNames = '';
if (submittersNames.length === 1) {
Expand All @@ -4604,6 +4630,11 @@ const translations = {
other: `removed you from ${joinedNames}'s approval workflows and workspace chats. Previously submitted reports will remain available for approval in your Inbox.`,
};
},
updatedWorkspaceCurrencyAction: ({oldCurrency, newCurrency}: UpdatedPolicyCurrencyParams) => `updated the default currency from ${oldCurrency} to ${newCurrency}`,
updatedWorkspaceFrequencyAction: ({oldFrequency, newFrequency}: UpdatedPolicyFrequencyParams) => `updated the auto-reporting frequency from "${oldFrequency}" to "${newFrequency}"`,
updatedWorkspaceCorporatePlan: 'upgraded this workspace to the Control plan',
updatedWorkspaceCorporatePlanDowngrade: 'downgraded this workspace to the Collect plan',
updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `updated the Approval Mode from "${oldValue}" to "${newValue}".`,
},
roomMembersPage: {
memberNotFound: 'Member not found.',
Expand Down
34 changes: 34 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type en from './en';
import type {
AccountOwnerParams,
ActionsAreCurrentlyRestricted,
AddedPolicyReportFieldParams,
AddEmployeeParams,
AddressLineParams,
AdminCanceledRequestParams,
Expand Down Expand Up @@ -170,6 +171,14 @@ import type {
UnapproveWithIntegrationWarningParams,
UnshareParams,
UntilTimeParams,
UpdatedPolicyCategoryNameParams,
UpdatedPolicyCategoryParams,
UpdatedPolicyCurrencyParams,
UpdatedPolicyDescriptionParams,
UpdatedPolicyFieldWithNewAndOldValueParams,
UpdatedPolicyFieldWithValueParam,
UpdatedPolicyFrequencyParams,
UpdatedPolicyPreventSelfApprovalParams,
UpdatedTheDistanceMerchantParams,
UpdatedTheRequestParams,
UpdateRoleParams,
Expand Down Expand Up @@ -1529,6 +1538,7 @@ const translations = {
},
frequencyDescription: 'Elige la frecuencia de presentación automática de gastos, o preséntalos manualmente',
frequencies: {
instant: 'Instante',
weekly: 'Semanal',
monthly: 'Mensual',
twiceAMonth: 'Dos veces al mes',
Expand Down Expand Up @@ -4637,6 +4647,24 @@ const translations = {
},
},
workspaceActions: {
addCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `agregó la categoría "${categoryName}"`,
deleteCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `eliminó la categoría "${categoryName}"`,
updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'deshabilitó' : 'habilitó'} la categoría "${categoryName}"`,
addedReportField: ({fieldType, fieldName}: AddedPolicyReportFieldParams) => `agregó el Campo de Informe ${fieldType} "${fieldName}"`,
setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `Renombró la categoría "${oldName}" a "${newName}".`,
preventSelfApproval: ({oldValue, newValue}: UpdatedPolicyPreventSelfApprovalParams) =>
`actualizó "Evitar la autoaprobación" de "${oldValue === 'true' ? 'Habilitado' : 'Deshabilitado'}" a "${newValue === 'true' ? 'Habilitado' : 'Deshabilitado'}"`,
updateMaxExpenseAmountNoReceipt: ({oldValue, newValue}: UpdatedPolicyFieldWithNewAndOldValueParams) =>
`cambió el monto máximo de gasto requerido sin recibo de ${oldValue} a ${newValue}`,
updateMaxExpenseAmount: ({oldValue, newValue}: UpdatedPolicyFieldWithNewAndOldValueParams) => `cambió el monto máximo de gasto para violaciones de ${oldValue} a ${newValue}`,
updateMaxExpenseAge: ({oldValue, newValue}: UpdatedPolicyFieldWithNewAndOldValueParams) =>
`actualizó "Antigüedad Máxima de Gastos (días)" de "${oldValue === 'false' ? CONST.POLICY.DEFAULT_MAX_EXPENSE_AGE : oldValue}" a "${newValue}"`,
updateDefaultBillable: ({oldValue, newValue}: UpdatedPolicyFieldWithNewAndOldValueParams) => `actualizó "Refacturar gastos a clientes" de "${oldValue}" a "${newValue}"`,
updateDefaultTitleEnforced: ({value}: UpdatedPolicyFieldWithValueParam) => `cambió "Aplicar título predeterminado de informe" a ${value ? 'activado' : 'desactivado'}`,
updateWorkspaceDescription: ({newDescription, oldDescription}: UpdatedPolicyDescriptionParams) =>
!oldDescription
? `estableció la descripción de este espacio de trabajo en "${newDescription}"`
: `actualizó la descripción de este espacio de trabajo de "${oldDescription}" a "${newDescription}"`,
renamedWorkspaceNameAction: ({oldName, newName}: RenamedRoomActionParams) => `actualizó el nombre de este espacio de trabajo a "${newName}" (previamente "${oldName}")`,
removedFromApprovalWorkflow: ({submittersNames}: RemovedFromApprovalWorkflowParams) => {
let joinedNames = '';
Expand All @@ -4652,6 +4680,12 @@ const translations = {
other: `te eliminó de los flujos de trabajo de aprobaciones y de los chats del espacio de trabajo de ${joinedNames}. Los informes enviados anteriormente seguirán estando disponibles para su aprobación en tu bandeja de entrada.`,
};
},
updatedWorkspaceCurrencyAction: ({oldCurrency, newCurrency}: UpdatedPolicyCurrencyParams) => `actualizó la moneda predeterminada de ${oldCurrency} a ${newCurrency}`,
updatedWorkspaceFrequencyAction: ({oldFrequency, newFrequency}: UpdatedPolicyFrequencyParams) =>
`actualizó la frecuencia de generación automática de informes de "${oldFrequency}" a "${newFrequency}"`,
updatedWorkspaceCorporatePlan: 'mejoró este espacio de trabajo al plan Controlar',
updatedWorkspaceCorporatePlanDowngrade: 'degradó este espacio de trabajo al plan Collect',
updateApprovalMode: ({newValue, oldValue}: ChangeFieldParams) => `Actualizó el Modo de Aprobación de "${oldValue}" a "${newValue}".`,
},
roomMembersPage: {
memberNotFound: 'Miembro no encontrado.',
Expand Down
27 changes: 27 additions & 0 deletions src/languages/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,24 @@ type ChangeFieldParams = {oldValue?: string; newValue: string; fieldName: string

type ChangePolicyParams = {fromPolicy: string; toPolicy: string};

type UpdatedPolicyDescriptionParams = {oldDescription: string; newDescription: string};

type UpdatedPolicyCurrencyParams = {oldCurrency: string; newCurrency: string};

type UpdatedPolicyCategoryParams = {categoryName: string; oldValue?: boolean};

type UpdatedPolicyCategoryNameParams = {oldName: string; newName?: string};

type AddedPolicyReportFieldParams = {fieldType: string; fieldName?: string};

type UpdatedPolicyPreventSelfApprovalParams = {oldValue: string; newValue: string};

type UpdatedPolicyFieldWithNewAndOldValueParams = {oldValue: string; newValue: string};

type UpdatedPolicyFieldWithValueParam = {value: boolean};

type UpdatedPolicyFrequencyParams = {oldFrequency: string; newFrequency: string};

type ChangeTypeParams = {oldType: string; newType: string};

type DelegateSubmitParams = {delegateUser: string; originalManager: string};
Expand Down Expand Up @@ -814,9 +832,18 @@ export type {
CompanyNameParams,
CustomUnitRateParams,
ChatWithAccountManagerParams,
UpdatedPolicyCurrencyParams,
UpdatedPolicyFrequencyParams,
UpdatedPolicyCategoryParams,
UpdatedPolicyCategoryNameParams,
UpdatedPolicyPreventSelfApprovalParams,
UpdatedPolicyFieldWithNewAndOldValueParams,
UpdatedPolicyFieldWithValueParam,
UpdatedPolicyDescriptionParams,
FirstDayTextParams,
LastDayTextParams,
TripLengthTextParams,
EditDestinationSubtitleParams,
FlightLayoverParams,
AddedPolicyReportFieldParams,
};
Loading
Loading