Skip to content

Commit

Permalink
fix: missing key for the i18n contribute string (#624)
Browse files Browse the repository at this point in the history
* refactor: use the discord invite constant for the welcome notice

* fix: add back the key for the i18n contribute string
  • Loading branch information
FedeIlLeone authored Jun 2, 2024
1 parent 1cd87ce commit 75076c9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const DISCORD_INVITE = "https://discord.gg/HnYFUhv4x4";
export const DISCORD_INVITE = "HnYFUhv4x4";
export const WEBLATE_URL = "https://i18n.replugged.dev";
export const WEBSITE_URL = "https://replugged.dev";
export const BETA_WEBSITE_URL = "https://beta.replugged.dev";
Expand Down
7 changes: 4 additions & 3 deletions src/renderer/coremods/badges/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ const cache = new Map<string, BadgeCache>();
const REFRESH_INTERVAL = 1000 * 60 * 30;

const contributorsUrl = `${generalSettings.get("apiUrl")}/contributors`;
const inviteUrl = `https://discord.gg/${DISCORD_INVITE}`;

const badgeElements = [
{
id: "booster",
description: Messages.REPLUGGED_BADGES_BOOSTER,
component: Badges.Booster,
link: DISCORD_INVITE,
link: inviteUrl,
},
{
id: "contributor",
Expand All @@ -84,13 +85,13 @@ const badgeElements = [
id: "staff",
description: Messages.REPLUGGED_BADGES_STAFF,
component: Badges.Staff,
link: DISCORD_INVITE,
link: inviteUrl,
},
{
id: "support",
description: Messages.REPLUGGED_BADGES_SUPPORT,
component: Badges.Support,
link: DISCORD_INVITE,
link: inviteUrl,
},
{
id: "translator",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/coremods/language/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function Card(): React.ReactElement {
return (
<FormNotice
title={Messages.REPLUGGED_I18N}
body={Messages.REPLUGGED_I18N_CONTRIBUTE.format({ WEBLATE_URL })}
body={Messages.REPLUGGED_I18N_CONTRIBUTE.format({ weblateUrl: WEBLATE_URL })}
type={FormNotice.Types.PRIMARY}
style={{ marginBottom: 20 }}
/>
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/coremods/welcome/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { generalSettings } from "../settings/pages/General";
import { notices, util } from "@replugged";
import { Messages } from "@common/i18n";
import { DISCORD_INVITE } from "src/constants";

export function start(): void {
if (!generalSettings.get("showWelcomeNoticeOnOpen")) return;
Expand All @@ -9,7 +10,7 @@ export function start(): void {
button: {
text: Messages.REPLUGGED_NOTICES_JOIN_SERVER_BUTTON,
onClick: () => {
void util.goToOrJoinServer("HnYFUhv4x4");
void util.goToOrJoinServer(DISCORD_INVITE);
generalSettings.set("showWelcomeNoticeOnOpen", false);
},
},
Expand Down

0 comments on commit 75076c9

Please sign in to comment.