Skip to content

Commit

Permalink
Merge pull request Hubs-Foundation#5003 from vincentfretin/i18n-prefe…
Browse files Browse the repository at this point in the history
…rences

internationalize You and Preferences item in More menu
  • Loading branch information
matthewbcool authored Jan 14, 2022
2 parents 95258b0 + 7af8c07 commit fba67e5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
17 changes: 11 additions & 6 deletions src/react-components/room/InvitePopover.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ function InvitePopoverContent({ url, shortUrl, code, embed, inviteRequired, fetc
value={code}
buttonPreset="accent4"
description={
<>
Enter code on{" "}
<a href={shortUrl} target="_blank" rel="noopener noreferrer">
{shortUrl.replace("https://", "")}
</a>
</>
<FormattedMessage
id="invite-popover.enter-code"
defaultMessage="Enter code on {hubslink}"
values={{
hubslink: (
<a href={shortUrl} target="_blank" rel="noopener noreferrer">
{shortUrl.replace("https://", "")}
</a>
)
}}
/>
}
/>
<CopyableTextInputField
Expand Down
14 changes: 10 additions & 4 deletions src/react-components/ui-root.js
Original file line number Diff line number Diff line change
Expand Up @@ -1097,9 +1097,15 @@ class UIRoot extends Component {
const moreMenu = [
{
id: "user",
label:
"You" +
(this.state.signedIn ? ` (Signed in as: ${maskEmail(this.props.store.state.credentials.email)})` : ""),
label: !this.state.signedIn ? (
<FormattedMessage id="more-menu.you" defaultMessage="You" />
) : (
<FormattedMessage
id="more-menu.you-signed-in-as"
defaultMessage="You (Signed in as: {email})"
values={{ email: maskEmail(this.props.store.state.credentials.email) }}
/>
),
items: [
this.state.signedIn
? {
Expand Down Expand Up @@ -1149,7 +1155,7 @@ class UIRoot extends Component {
},
{
id: "preferences",
label: "Preferences",
label: <FormattedMessage id="more-menu.preferences" defaultMessage="Preferences" />,
icon: SettingsIcon,
onClick: () => this.setState({ showPrefs: true })
}
Expand Down

0 comments on commit fba67e5

Please sign in to comment.