-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Workspace - The new WS names appear in English when Spanish is set up. #55850
base: main
Are you sure you want to change the base?
Conversation
…et up. Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@eVoloshchak, I haven't uploaded the recording for android native cause I'm facing app crash as soon as it starts. I will try to fix that and update the recordings if possible. |
src/languages/params.ts
Outdated
@@ -208,6 +208,8 @@ type UserIsAlreadyMemberParams = {login: string; name: string}; | |||
|
|||
type GoToRoomParams = {roomName: string}; | |||
|
|||
type NewWorksacepNameParams = {userName: string; workspaceNumber?: number}; |
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.
type NewWorksacepNameParams = {userName: string; workspaceNumber?: number}; | |
type NewWorksaceNameParams = {userName: string; workspaceNumber?: number}; |
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.
updated.
src/libs/actions/Policy/Policy.ts
Outdated
.map((policy) => workspaceRegex.exec(policy?.name ?? '')) | ||
.filter(Boolean) // Remove null matches | ||
.map((match) => Number(match?.[1] ?? '0')); | ||
const lastWorkspaceNumber = workspaceNumbers.length > 0 ? Math.max(...workspaceNumbers) : -Infinity; |
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.
Can we use null
or undefined
instead of -Infinity
?
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.
updated to undefined
src/libs/actions/Policy/Policy.ts
Outdated
.map((match) => Number(match?.[1] ?? '0')); | ||
const lastWorkspaceNumber = workspaceNumbers.length > 0 ? Math.max(...workspaceNumbers) : -Infinity; | ||
|
||
return lastWorkspaceNumber !== -Infinity |
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.
return lastWorkspaceNumber !== -Infinity | |
return translateLocal('workspace.new.workspaceName', {userName: displayNameForWorkspace, workspaceNumber: lastWorkspaceNumber ? lastWorkspaceNumber + 1 : undefined}) |
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.
updated
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
Explanation of Change
Fixed Issues
$ #53599
PROPOSAL: #53599 (comment)
Tests
New Workspace
{userName}'s Workspace
> ConfirmNew Workspace
{userName}'s Workspace 1
Offline tests
New Workspace
{userName}'s Workspace
> ConfirmNew Workspace
{userName}'s Workspace 1
QA Steps
New Workspace
{userName}'s Workspace
> ConfirmNew Workspace
{userName}'s Workspace 1
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4