Convert some capital letters to lowercase and capitalize months and days in Spanish(Final)#16627
Conversation
|
@luacmartins @thesahindia One of you needs to 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] |
|
@Julesssss @thesahindia @aldo-expensify new PR is ready for review with signed commit |
|
|
||
| this.monthNames = moment.localeData(props.preferredLocale).months(); | ||
| this.daysOfWeek = moment.localeData(props.preferredLocale).weekdays(); | ||
| this.monthNames = _.map(moment.localeData(props.preferredLocale).months(), month => month.replace(/^\w/, c => c.toUpperCase())); |
There was a problem hiding this comment.
NAB: Just wondering why we didn't do something simpler like:
| this.monthNames = _.map(moment.localeData(props.preferredLocale).months(), month => month.replace(/^\w/, c => c.toUpperCase())); | |
| this.monthNames = _.map(moment.localeData(props.preferredLocale).months(), month => month.toUpperCase()); |
There was a problem hiding this comment.
@aldo-expensify The first line of code converts the month names to title case (where the first letter of each word is capitalized), while the second line of code converts the month names to all uppercase. We just need to convert first letter of the month to uppercase
There was a problem hiding this comment.
I see, thanks for explaining!
There was a problem hiding this comment.
I was also confused by this. Could you please add a small comment explaining this for people in the future? Thanks
There was a problem hiding this comment.
Does this mean that we want sentence case for these? If so, I believe that we can use Str.recapitalize for that.
There was a problem hiding this comment.
you can check new change
Julesssss
left a comment
There was a problem hiding this comment.
Left a small comment, but thanks for getting the commits signed!
|
|
||
| this.monthNames = moment.localeData(props.preferredLocale).months(); | ||
| this.daysOfWeek = moment.localeData(props.preferredLocale).weekdays(); | ||
| this.monthNames = _.map(moment.localeData(props.preferredLocale).months(), month => month.replace(/^\w/, c => c.toUpperCase())); |
There was a problem hiding this comment.
Does this mean that we want sentence case for these? If so, I believe that we can use Str.recapitalize for that.
|
@thesahindia you can check the new changes |
|
|
||
| this.monthNames = moment.localeData(props.preferredLocale).months(); | ||
| this.daysOfWeek = moment.localeData(props.preferredLocale).weekdays(); | ||
| this.monthNames = _.map(moment.localeData(props.preferredLocale).months(), month => Str.recapitalize(month)); |
There was a problem hiding this comment.
| this.monthNames = _.map(moment.localeData(props.preferredLocale).months(), month => Str.recapitalize(month)); | |
| this.monthNames = _.map(moment.localeData(props.preferredLocale).months(), Str.recapitalize); |
NAB
There was a problem hiding this comment.
@aldo-expensify changed that line as suggested you can check it
|
@ayazhussain79, the fixed issues section should look like this - Fixed Issues$ #16403 And you will need to update the steps. You can check other PRs to understand how we write the steps.
Here's how I would write the test steps for the first two cases. You can follow the same for other cases.
Lastly I would not suggest using commit message like "This commit will do xyz". For example in your first commit, instead of writing "This commit will capitalize month and day names" you could just write "capitalize month and day names". |
|
@thesahindia updated fixed issues section you can check it and next time I will correct all my mistakes, Thank you |
Reviewer Checklist
Screenshots/Videos |
@ayazhussain79, what issue are you facing when using the app on iOS Safari?? |
|
@Julesssss @aldo-expensify all yours |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.2.93-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.93-4 🚀
|
|
|
||
| this.monthNames = moment.localeData(props.preferredLocale).months(); | ||
| this.daysOfWeek = moment.localeData(props.preferredLocale).weekdays(); | ||
| this.monthNames = _.map(moment.localeData(props.preferredLocale).months(), Str.recapitalize); |
There was a problem hiding this comment.
Coming from the #74615 checklist: with the new French language support, we should only uppercase the first letter










Details
We want to convert some capital characters to lowercase and capitalization for months and days in Spanish.
Fixed Issues
$ #16403
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests
Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
2023-03-25-05-02-23_IjBKQjEb.mp4
Mobile Web - Chrome
Screen.Recording.2023-03-27.at.10.49.36.PM.mov
Mobile Web - Safari
Desktop
Screen.Recording.2023-03-27.at.10.40.34.PM.mov
iOS
Screen.Recording.2023-03-27.at.10.46.35.PM.mov
Android
Screen.Recording.2023-03-27.at.11.02.56.PM.mov