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

Remove t from miscellaneous components #27058

Merged
merged 10 commits into from
May 24, 2024
Merged

Remove t from miscellaneous components #27058

merged 10 commits into from
May 24, 2024

Conversation

hmhealey
Copy link
Member

Summary

This is part of my mission to eradicate t from last week. Most of it is pretty straightforward replacement of t with defineMessage/defineMessages, and I also occasionally removed some use of localizeMessage as well, but I'll comment on anything noteworthy below.

Ticket Link

https://mattermost.atlassian.net/browse/MM-58324

Release Note

NONE

@hmhealey hmhealey added the 2: Dev Review Requires review by a developer label May 17, 2024
@mm-cloud-bot mm-cloud-bot added the release-note-none Denotes a PR that doesn't merit a release note. label May 17, 2024
@@ -316,7 +315,8 @@ export default class SidebarCategory extends React.PureComponent<Props, State> {

let displayName = category.display_name;
if (category.type !== CategoryTypes.CUSTOM) {
displayName = localizeMessage(`sidebar.types.${category.type}`, category.display_name);
const message = categoryNames[category.type as keyof typeof categoryNames];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spent a while fighting with this, but I could not get it to stop complaining that categoryNames didn't have an entry for 'custom' even though the above line says that it can't be that value specifically. It also didn't work if I changed the above check to category.type in categoryNames either, so I eventually just gave up and went with the type assertion

Copy link
Member

@M-ZubairAhmed M-ZubairAhmed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excited to see how few we have t functions left after this

@hmhealey hmhealey added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a developer labels May 24, 2024
@hmhealey hmhealey enabled auto-merge (squash) May 24, 2024 16:20
@hmhealey hmhealey disabled auto-merge May 24, 2024 19:41
@hmhealey hmhealey merged commit 310261e into master May 24, 2024
12 of 13 checks passed
@hmhealey hmhealey deleted the hh_may17-t-6 branch May 24, 2024 19:41
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants