Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Override the calculated avatar font size in user info so that it isn'…
Browse files Browse the repository at this point in the history
…t tiny

Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Sep 7, 2023
2 parents 3ce5350 + c768e1c commit af9936b
Show file tree
Hide file tree
Showing 80 changed files with 7,161 additions and 6,767 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
echo "CYPRESS_RUST_CRYPTO=1" >> "$GITHUB_ENV"
- name: Run Cypress tests
uses: cypress-io/github-action@fa88e4afe551e64c8827a4b9e379afc63d8f691a
uses: cypress-io/github-action@2558ee6af05072a19de2ce92cb68b38616132726
with:
working-directory: matrix-react-sdk
# The built-in Electron runner seems to grind to a halt trying to run the tests, so use chrome.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/i18n_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: "Get modified files"
id: changed_files
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'RiotTranslateBot' && github.event.pull_request.user.login != 't3chguy'
uses: tj-actions/changed-files@1c26215f3fbd51eba03bc199e5cbabdfc3584ce3 # v38
uses: tj-actions/changed-files@48566bbcc22ceb7c5809ebdd27377309f2c3de8c # v39
with:
files: |
src/i18n/strings/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify-element-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'matrix-org/matrix-react-sdk'
steps:
- name: Notify element-web repo that a new SDK build is on develop
uses: peter-evans/repository-dispatch@26b39ed245ab8f31526069329e112ab2fb224588 # v2
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 # v2
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
repository: vector-im/element-web
Expand Down
1 change: 1 addition & 0 deletions src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2205,6 +2205,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
knocked={myMembership === "knock" || this.state.knocked}
onSubmitAskToJoin={this.onSubmitAskToJoin}
onCancelAskToJoin={this.onCancelAskToJoin}
onForgetClick={this.onForgetClick}
/>
</ErrorBoundary>
</div>
Expand Down
27 changes: 6 additions & 21 deletions src/components/views/dialogs/AnalyticsLearnMoreDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const AnalyticsLearnMoreDialog: React.FC<IProps> = ({
const privacyPolicyLink = privacyPolicyUrl ? (
<span>
{_t(
"You can read all our terms <PrivacyPolicyUrl>here</PrivacyPolicyUrl>",
"analytics|privacy_policy",
{},
{
PrivacyPolicyUrl: (sub) => {
Expand All @@ -71,33 +71,18 @@ export const AnalyticsLearnMoreDialog: React.FC<IProps> = ({
<BaseDialog
className="mx_AnalyticsLearnMoreDialog"
contentId="mx_AnalyticsLearnMore"
title={_t("Help improve %(analyticsOwner)s", { analyticsOwner })}
title={_t("analytics|enable_prompt", { analyticsOwner })}
onFinished={onFinished}
>
<div className="mx_Dialog_content">
<div className="mx_AnalyticsLearnMore_image_holder" />
<div className="mx_AnalyticsLearnMore_copy">
{_t(
"Help us identify issues and improve %(analyticsOwner)s by sharing anonymous usage data. To understand how people use multiple devices, we'll generate a random identifier, shared by your devices.",
{ analyticsOwner },
)}
{_t("analytics|pseudonymous_usage_data", { analyticsOwner })}
</div>
<ul className="mx_AnalyticsLearnMore_bullets">
<li>
{_t(
"We <Bold>don't</Bold> record or profile any account data",
{},
{ Bold: (sub) => <b>{sub}</b> },
)}
</li>
<li>
{_t(
"We <Bold>don't</Bold> share information with third parties",
{},
{ Bold: (sub) => <b>{sub}</b> },
)}
</li>
<li>{_t("You can turn this off anytime in settings")}</li>
<li>{_t("analytics|bullet_1", {}, { Bold: (sub) => <b>{sub}</b> })}</li>
<li>{_t("analytics|bullet_2", {}, { Bold: (sub) => <b>{sub}</b> })}</li>
<li>{_t("analytics|disable_prompt")}</li>
</ul>
{privacyPolicyLink}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/dialogs/SessionRestoreErrorDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class SessionRestoreErrorDialog extends React.Component<IProps> {
if (SdkConfig.get().bug_report_endpoint_url) {
dialogButtons = (
<DialogButtons
primaryButton={_t("Send Logs")}
primaryButton={_t("bug_reporting|send_logs")}
onPrimaryButtonClick={this.sendBugReport}
focus={true}
hasCancel={false}
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/dialogs/TermsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ export default class TermsDialog extends React.PureComponent<ITermsDialogProps,
case SERVICE_TYPES.IS:
return (
<div>
{_t("Identity server")}
{_t("common|identity_server")}
<br />({host})
</div>
);
case SERVICE_TYPES.IM:
return (
<div>
{_t("Integration manager")}
{_t("common|integration_manager")}
<br />({host})
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/elements/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class ErrorBoundary extends React.PureComponent<Props, IState> {
<React.Fragment>
<p>
{_t(
"Please <newIssueLink>create a new issue</newIssueLink> on GitHub so that we can investigate this bug.",
"bug_reporting|create_new_issue",
{},
{
newIssueLink: (sub) => {
Expand Down
70 changes: 35 additions & 35 deletions src/components/views/elements/EventListSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default class EventListSummary extends React.Component<

const desc = formatCommaSeparatedList(descs);

return _t("%(nameList)s %(transitionList)s", { nameList, transitionList: desc });
return _t("timeline|summary|format", { nameList, transitionList: desc });
});

if (!summaries) {
Expand Down Expand Up @@ -250,101 +250,101 @@ export default class EventListSummary extends React.Component<
case TransitionType.Joined:
res =
userCount > 1
? _t("%(severalUsers)sjoined %(count)s times", { severalUsers: "", count })
: _t("%(oneUser)sjoined %(count)s times", { oneUser: "", count });
? _t("timeline|summary|joined_multiple", { severalUsers: "", count })
: _t("timeline|summary|joined", { oneUser: "", count });
break;
case TransitionType.Left:
res =
userCount > 1
? _t("%(severalUsers)sleft %(count)s times", { severalUsers: "", count })
: _t("%(oneUser)sleft %(count)s times", { oneUser: "", count });
? _t("timeline|summary|left_multiple", { severalUsers: "", count })
: _t("timeline|summary|left", { oneUser: "", count });
break;
case TransitionType.JoinedAndLeft:
res =
userCount > 1
? _t("%(severalUsers)sjoined and left %(count)s times", { severalUsers: "", count })
: _t("%(oneUser)sjoined and left %(count)s times", { oneUser: "", count });
? _t("timeline|summary|joined_and_left_multiple", { severalUsers: "", count })
: _t("timeline|summary|joined_and_left", { oneUser: "", count });
break;
case TransitionType.LeftAndJoined:
res =
userCount > 1
? _t("%(severalUsers)sleft and rejoined %(count)s times", { severalUsers: "", count })
: _t("%(oneUser)sleft and rejoined %(count)s times", { oneUser: "", count });
? _t("timeline|summary|rejoined_multiple", { severalUsers: "", count })
: _t("timeline|summary|rejoined", { oneUser: "", count });
break;
case TransitionType.InviteReject:
res =
userCount > 1
? _t("%(severalUsers)srejected their invitations %(count)s times", {
? _t("timeline|summary|rejected_invite_multiple", {
severalUsers: "",
count,
})
: _t("%(oneUser)srejected their invitation %(count)s times", { oneUser: "", count });
: _t("timeline|summary|rejected_invite", { oneUser: "", count });
break;
case TransitionType.InviteWithdrawal:
res =
userCount > 1
? _t("%(severalUsers)shad their invitations withdrawn %(count)s times", {
? _t("timeline|summary|invite_withdrawn_multiple", {
severalUsers: "",
count,
})
: _t("%(oneUser)shad their invitation withdrawn %(count)s times", { oneUser: "", count });
: _t("timeline|summary|invite_withdrawn", { oneUser: "", count });
break;
case TransitionType.Invited:
res =
userCount > 1
? _t("were invited %(count)s times", { count })
: _t("was invited %(count)s times", { count });
? _t("timeline|summary|invited_multiple", { count })
: _t("timeline|summary|invited", { count });
break;
case TransitionType.Banned:
res =
userCount > 1
? _t("were banned %(count)s times", { count })
: _t("was banned %(count)s times", { count });
? _t("timeline|summary|banned_multiple", { count })
: _t("timeline|summary|banned", { count });
break;
case TransitionType.Unbanned:
res =
userCount > 1
? _t("were unbanned %(count)s times", { count })
: _t("was unbanned %(count)s times", { count });
? _t("timeline|summary|unbanned_multiple", { count })
: _t("timeline|summary|unbanned", { count });
break;
case TransitionType.Kicked:
res =
userCount > 1
? _t("were removed %(count)s times", { count })
: _t("was removed %(count)s times", { count });
? _t("timeline|summary|kicked_multiple", { count })
: _t("timeline|summary|kicked", { count });
break;
case TransitionType.ChangedName:
res =
userCount > 1
? _t("%(severalUsers)schanged their name %(count)s times", { severalUsers: "", count })
: _t("%(oneUser)schanged their name %(count)s times", { oneUser: "", count });
? _t("timeline|summary|changed_name_multiple", { severalUsers: "", count })
: _t("timeline|summary|changed_name", { oneUser: "", count });
break;
case TransitionType.ChangedAvatar:
res =
userCount > 1
? _t("%(severalUsers)schanged their profile picture %(count)s times", {
? _t("timeline|summary|changed_avatar_multiple", {
severalUsers: "",
count,
})
: _t("%(oneUser)schanged their profile picture %(count)s times", { oneUser: "", count });
: _t("timeline|summary|changed_avatar", { oneUser: "", count });
break;
case TransitionType.NoChange:
res =
userCount > 1
? _t("%(severalUsers)smade no changes %(count)s times", { severalUsers: "", count })
: _t("%(oneUser)smade no changes %(count)s times", { oneUser: "", count });
? _t("timeline|summary|no_change_multiple", { severalUsers: "", count })
: _t("timeline|summary|no_change", { oneUser: "", count });
break;
case TransitionType.ServerAcl:
res =
userCount > 1
? _t("%(severalUsers)schanged the server ACLs %(count)s times", { severalUsers: "", count })
: _t("%(oneUser)schanged the server ACLs %(count)s times", { oneUser: "", count });
? _t("timeline|summary|server_acls_multiple", { severalUsers: "", count })
: _t("timeline|summary|server_acls", { oneUser: "", count });
break;
case TransitionType.ChangedPins:
res =
userCount > 1
? _t(
"%(severalUsers)schanged the <a>pinned messages</a> for the room %(count)s times",
"timeline|summary|pinned_events_multiple",
{ severalUsers: "", count },
{
a: (sub) => (
Expand All @@ -355,7 +355,7 @@ export default class EventListSummary extends React.Component<
},
)
: _t(
"%(oneUser)schanged the <a>pinned messages</a> for the room %(count)s times",
"timeline|summary|pinned_events",
{ oneUser: "", count },
{
a: (sub) => (
Expand All @@ -369,14 +369,14 @@ export default class EventListSummary extends React.Component<
case TransitionType.MessageRemoved:
res =
userCount > 1
? _t("%(severalUsers)sremoved a message %(count)s times", { severalUsers: "", count })
: _t("%(oneUser)sremoved a message %(count)s times", { oneUser: "", count });
? _t("timeline|summary|redacted_multiple", { severalUsers: "", count })
: _t("timeline|summary|redacted", { oneUser: "", count });
break;
case TransitionType.HiddenEvent:
res =
userCount > 1
? _t("%(severalUsers)ssent %(count)s hidden messages", { severalUsers: "", count })
: _t("%(oneUser)ssent %(count)s hidden messages", { oneUser: "", count });
? _t("timeline|summary|hidden_event_multiple", { severalUsers: "", count })
: _t("timeline|summary|hidden_event", { oneUser: "", count });
break;
}

Expand Down
18 changes: 9 additions & 9 deletions src/components/views/emojipicker/EmojiPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,63 +87,63 @@ class EmojiPicker extends React.Component<IProps, IState> {
this.categories = [
{
id: "recent",
name: _t("Frequently Used"),
name: _t("emoji|category_frequently_used"),
enabled: this.recentlyUsed.length > 0,
visible: this.recentlyUsed.length > 0,
ref: React.createRef(),
},
{
id: "people",
name: _t("Smileys & People"),
name: _t("emoji|category_smileys_people"),
enabled: true,
visible: true,
ref: React.createRef(),
},
{
id: "nature",
name: _t("Animals & Nature"),
name: _t("emoji|category_animals_nature"),
enabled: true,
visible: false,
ref: React.createRef(),
},
{
id: "foods",
name: _t("Food & Drink"),
name: _t("emoji|category_food_drink"),
enabled: true,
visible: false,
ref: React.createRef(),
},
{
id: "activity",
name: _t("Activities"),
name: _t("emoji|category_activities"),
enabled: true,
visible: false,
ref: React.createRef(),
},
{
id: "places",
name: _t("Travel & Places"),
name: _t("emoji|category_travel_places"),
enabled: true,
visible: false,
ref: React.createRef(),
},
{
id: "objects",
name: _t("Objects"),
name: _t("emoji|category_objects"),
enabled: true,
visible: false,
ref: React.createRef(),
},
{
id: "symbols",
name: _t("Symbols"),
name: _t("emoji|category_symbols"),
enabled: true,
visible: false,
ref: React.createRef(),
},
{
id: "flags",
name: _t("Flags"),
name: _t("emoji|category_flags"),
enabled: true,
visible: false,
ref: React.createRef(),
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/emojipicker/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Header extends React.PureComponent<IProps> {
<nav
className="mx_EmojiPicker_header"
role="tablist"
aria-label={_t("Categories")}
aria-label={_t("emoji|categories")}
onKeyDown={this.onKeyDown}
>
{this.props.categories.map((category) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/emojipicker/QuickReactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ class QuickReactions extends React.Component<IProps, IState> {
<section className="mx_EmojiPicker_footer mx_EmojiPicker_quick mx_EmojiPicker_category">
<h2 className="mx_EmojiPicker_quick_header mx_EmojiPicker_category_label">
{!this.state.hover ? (
_t("Quick Reactions")
_t("emoji|quick_reactions")
) : (
<React.Fragment>
<span className="mx_EmojiPicker_name">{this.state.hover.label}</span>
<span className="mx_EmojiPicker_shortcode">{this.state.hover.shortcodes[0]}</span>
</React.Fragment>
)}
</h2>
<Toolbar className="mx_EmojiPicker_list" aria-label={_t("Quick Reactions")}>
<Toolbar className="mx_EmojiPicker_list" aria-label={_t("emoji|quick_reactions")}>
{QUICK_REACTIONS.map((emoji) => (
<Emoji
key={emoji.hexcode}
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/right_panel/EncryptionInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const EncryptionInfo: React.FC<IProps> = ({
"For extra security, verify this user by checking a one-time code on both of your devices.",
)}
</p>
<p>{_t("To be secure, do this in person or use a trusted way to communicate.")}</p>
<p>{_t("encryption|verification|in_person")}</p>
{content}
</div>
</div>
Expand Down
Loading

0 comments on commit af9936b

Please sign in to comment.