-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[ESM] Localize system messages #43079
Merged
deetergp
merged 31 commits into
Expensify:main
from
software-mansion-labs:brtqkr/42923-localize-system-messages
Jul 1, 2024
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
1f35f3b
translations wip
BrtqKr 6df91bb
adjust params, cleanup
BrtqKr 0feb9d8
add spanish translations, update delayed message
BrtqKr 0566b14
update messages wip
BrtqKr e652a3e
apply types
BrtqKr ba75104
adjust types
BrtqKr 8164d80
revert deprecated messages
BrtqKr fd96a70
cleanup
BrtqKr a3f0195
cleanup
BrtqKr 2eedaf0
Merge remote-tracking branch 'origin/main' into brtqkr/42923-localize…
BrtqKr 47226ed
cleanup
BrtqKr c907cb6
cleanup
BrtqKr 6856ae3
update tests and remove depreacted messages
BrtqKr 4ce20e1
remove utility function for checking modified fields
BrtqKr 43a5ebd
fix unused types
BrtqKr 2979207
run prettier
BrtqKr a4f9d4f
add original message condition
BrtqKr fd87079
remove condition
BrtqKr 5d652b6
review fixes
BrtqKr 16cbf19
Merge remote-tracking branch 'origin/main' into brtqkr/42923-localize…
BrtqKr af11678
modify conditions
BrtqKr 641c337
Merge remote-tracking branch 'origin/main' into brtqkr/42923-localize…
BrtqKr 9fdbcd6
modify conditions
BrtqKr 32bdbe0
fix types
BrtqKr 7e7a294
add label to integrationsMessage
BrtqKr ab51f36
remove todo
BrtqKr 4b8c543
Merge remote-tracking branch 'origin/main' into brtqkr/42923-localize…
BrtqKr 98a4d0f
add condition for no field
BrtqKr 155937b
Merge remote-tracking branch 'origin/main' into brtqkr/42923-localize…
BrtqKr eb2550b
revert tests
BrtqKr a65a680
revert tests
BrtqKr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,26 +12,35 @@ import type { | |
BeginningOfChatHistoryAnnounceRoomPartTwo, | ||
BeginningOfChatHistoryDomainRoomPartOneParams, | ||
CanceledRequestParams, | ||
ChangeFieldParams, | ||
ChangePolicyParams, | ||
ChangeTypeParams, | ||
CharacterLimitParams, | ||
ConfirmThatParams, | ||
DateShouldBeAfterParams, | ||
DateShouldBeBeforeParams, | ||
DelegateSubmitParams, | ||
DeleteActionParams, | ||
DeleteConfirmationParams, | ||
DidSplitAmountMessageParams, | ||
DistanceRateOperationsParams, | ||
EditActionParams, | ||
ElectronicFundsParams, | ||
EnterMagicCodeParams, | ||
ExportedToIntegrationParams, | ||
FormattedMaxLengthParams, | ||
ForwardedParams, | ||
GoBackMessageParams, | ||
GoToRoomParams, | ||
InstantSummaryParams, | ||
IntegrationsMessageParams, | ||
LocalTimeParams, | ||
LoggedInAsParams, | ||
LogSizeParams, | ||
ManagerApprovedAmountParams, | ||
ManagerApprovedParams, | ||
MarkedReimbursedParams, | ||
MarkReimbursedFromIntegrationParams, | ||
NoLongerHaveAccessParams, | ||
NotAllowedExtensionParams, | ||
NotYouParams, | ||
|
@@ -65,17 +74,21 @@ import type { | |
SetTheRequestParams, | ||
SettledAfterAddedBankAccountParams, | ||
SettleExpensifyCardParams, | ||
ShareParams, | ||
SignUpNewFaceCodeParams, | ||
SizeExceededParams, | ||
SplitAmountParams, | ||
StepCounterParams, | ||
StripePaidParams, | ||
TaskCreatedActionParams, | ||
TermsParams, | ||
ThreadRequestReportNameParams, | ||
ThreadSentMoneyReportNameParams, | ||
ToValidateLoginParams, | ||
TransferParams, | ||
TranslationBase, | ||
UnapprovedParams, | ||
UnshareParams, | ||
UntilTimeParams, | ||
UpdatedTheDistanceParams, | ||
UpdatedTheRequestParams, | ||
|
@@ -3022,6 +3035,34 @@ export default { | |
genericUpdateReportFieldFailureMessage: 'Unexpected error updating the field. Please try again later.', | ||
genericUpdateReporNameEditFailureMessage: 'Unexpected error renaming the report. Please try again later.', | ||
noActivityYet: 'No activity yet', | ||
actions: { | ||
type: { | ||
changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `changed ${fieldName} from ${oldValue} to ${newValue}`, | ||
changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `changed ${fieldName} to ${newValue}`, | ||
changePolicy: ({fromPolicy, toPolicy}: ChangePolicyParams) => `changed policy from ${fromPolicy} to ${toPolicy}`, | ||
changeType: ({oldType, newType}: ChangeTypeParams) => `changed type from ${oldType} to ${newType}`, | ||
delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `sent this report to ${delegateUser} since ${originalManager} is on vacation`, | ||
exportedToCSV: `exported this report to CSV`, | ||
exportedToIntegration: ({label}: ExportedToIntegrationParams) => `exported this report to ${label}`, | ||
forwarded: ({amount, currency}: ForwardedParams) => `approved ${currency}${amount}`, | ||
integrationsMessage: ({errorMessage, label}: IntegrationsMessageParams) => `failed to export this report to ${label}. ${errorMessage}`, | ||
managerAttachReceipt: `added a receipt`, | ||
managerDetachReceipt: `removed the receipt`, | ||
markedReimbursed: ({amount, currency}: MarkedReimbursedParams) => `paid ${currency}${amount} elsewhere`, | ||
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `paid ${currency}${amount} via integration`, | ||
outdatedBankAccount: `couldn’t process the payment due to a problem with the payer’s bank account`, | ||
reimbursementACHBounce: `couldn’t process the payment, as the payer doesn’t have sufficient funds`, | ||
reimbursementACHCancelled: `canceled the payment`, | ||
reimbursementAccountChanged: `couldn’t process the payment, as the payer changed bank accounts`, | ||
reimbursementDelayed: `processed the payment but it’s delayed by 1-2 more business days`, | ||
selectedForRandomAudit: `[randomly selected](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule) for review`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this olddot action, it shows a message in a plain text instead of converted markdown which caused the issue #45819 |
||
share: ({to}: ShareParams) => `invited user ${to}`, | ||
unshare: ({to}: UnshareParams) => `removed user ${to}`, | ||
stripePaid: ({amount, currency}: StripePaidParams) => `paid ${currency}${amount}`, | ||
takeControl: `took control`, | ||
unapproved: ({amount, currency}: UnapprovedParams) => `unapproved ${currency}${amount}`, | ||
}, | ||
}, | ||
}, | ||
chronos: { | ||
oooEventSummaryFullDay: ({summary, dayCount, date}: OOOEventSummaryFullDayParams) => `${summary} for ${dayCount} ${dayCount === 1 ? 'day' : 'days'} until ${date}`, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go ahead and just remove all the deprecated actions. They are blocked at the back end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
sequenceNumber
case covered as well? This temporary fallback has been there for over a yearThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave that one be for now