diff --git a/src/plugins/_api/serverList.ts b/src/plugins/_api/serverList.ts index 6597c121..dfd40de7 100644 --- a/src/plugins/_api/serverList.ts +++ b/src/plugins/_api/serverList.ts @@ -32,7 +32,7 @@ export default definePlugin({ } }, { - find: "#{intl::SERVERS},children", + find: "#{intl::SERVERS}),children", replacement: { match: /(?<=#{intl::SERVERS}\),children:)\i\.map\(\i\)/, replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)" diff --git a/src/plugins/alwaysAnimate/index.ts b/src/plugins/alwaysAnimate/index.ts index 20cb4f97..97593990 100644 --- a/src/plugins/alwaysAnimate/index.ts +++ b/src/plugins/alwaysAnimate/index.ts @@ -41,7 +41,7 @@ export default definePlugin({ }, { // Status emojis - find: ".Messages.GUILD_OWNER,", + find: "#{intl::GUILD_OWNER}", replacement: { match: /(?<=\.activityEmoji,.+?animate:)\i/, replace: "!0" diff --git a/src/plugins/anonymiseFileNames/index.tsx b/src/plugins/anonymiseFileNames/index.tsx index 0e97bc7f..21f4e5c8 100644 --- a/src/plugins/anonymiseFileNames/index.tsx +++ b/src/plugins/anonymiseFileNames/index.tsx @@ -86,9 +86,9 @@ export default definePlugin({ } }, { - find: ".Messages.ATTACHMENT_UTILITIES_SPOILER", + find: "#{intl::ATTACHMENT_UTILITIES_SPOILER}", replacement: { - match: /(?<=children:\[)(?=.{10,80}tooltip:.{0,100}\i\.\i\.Messages\.ATTACHMENT_UTILITIES_SPOILER)/, + match: /(?<=children:\[)(?=.{10,80}tooltip:.{0,100}#{intl::ATTACHMENT_UTILITIES_SPOILER})/, replace: "arguments[0].canEdit!==false?$self.renderIcon(arguments[0]):null," }, }, diff --git a/src/plugins/banger/index.ts b/src/plugins/banger/index.ts index eca80f9e..f13fd351 100644 --- a/src/plugins/banger/index.ts +++ b/src/plugins/banger/index.ts @@ -36,7 +36,7 @@ export default definePlugin({ settings, patches: [ { - find: "BAN_CONFIRM_TITLE.", + find: "#{intl::BAN_CONFIRM_TITLE}", replacement: { match: /src:\i\("?\d+"?\)/g, replace: "src:$self.source" diff --git a/src/plugins/betterGifAltText/index.ts b/src/plugins/betterGifAltText/index.ts index 55fa2252..5d9b188e 100644 --- a/src/plugins/betterGifAltText/index.ts +++ b/src/plugins/betterGifAltText/index.ts @@ -34,9 +34,9 @@ export default definePlugin({ }, }, { - find: ".Messages.GIF,", + find: "#{intl::GIF}", replacement: { - match: /alt:(\i)=(\i\.\i\.Messages\.GIF)(?=,[^}]*\}=(\i))/, + match: /alt:(\i)=(\i\.\i\.string\(\i\.\i#{intl::GIF}\))(?=,[^}]*\}=(\i))/, replace: // rename prop so we can always use default value "alt_$$:$1=$self.altify($3)||$2", diff --git a/src/plugins/betterNotes/index.tsx b/src/plugins/betterNotes/index.tsx index 63fcf647..68aa70c6 100644 --- a/src/plugins/betterNotes/index.tsx +++ b/src/plugins/betterNotes/index.tsx @@ -63,9 +63,9 @@ export default definePlugin({ } }, { - find: "Messages.NOTE_PLACEHOLDER", + find: "#{intl::NOTE_PLACEHOLDER}", replacement: { - match: /\.NOTE_PLACEHOLDER,/, + match: /#{intl::NOTE_PLACEHOLDER}\),/, replace: "$&spellCheck:!$self.noSpellCheck," } } diff --git a/src/plugins/betterSessions/index.tsx b/src/plugins/betterSessions/index.tsx index 598e0104..9347c398 100644 --- a/src/plugins/betterSessions/index.tsx +++ b/src/plugins/betterSessions/index.tsx @@ -60,7 +60,7 @@ export default definePlugin({ patches: [ { - find: "Messages.AUTH_SESSIONS_SESSION_LOG_OUT", + find: "#{intl::AUTH_SESSIONS_SESSION_LOG_OUT}", replacement: [ // Replace children with a single label with state { diff --git a/src/plugins/betterSettings/index.tsx b/src/plugins/betterSettings/index.tsx index f0dd89a7..15618faf 100644 --- a/src/plugins/betterSettings/index.tsx +++ b/src/plugins/betterSettings/index.tsx @@ -111,7 +111,7 @@ export default definePlugin({ predicate: () => settings.store.disableFade }, { // Load menu TOC eagerly - find: "Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format", + find: "#{intl::USER_SETTINGS_WITH_BUILD_OVERRIDE}", replacement: { match: /(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?null!=\i&&.{0,100}?(await Promise\.all[^};]*?\)\)).*?,(?=\1\(this)/, replace: "$&(async ()=>$2)()," @@ -119,7 +119,7 @@ export default definePlugin({ predicate: () => settings.store.eagerLoad }, { // Settings cog context menu - find: "Messages.USER_SETTINGS_ACTIONS_MENU_LABEL", + find: "#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}", replacement: [ { match: /(EXPERIMENTS:.+?)(\(0,\i.\i\)\(\))(?=\.filter\(\i=>\{let\{section:\i\}=)/, diff --git a/src/plugins/copyFileContents/index.tsx b/src/plugins/copyFileContents/index.tsx index 13b64917..28b5bb92 100644 --- a/src/plugins/copyFileContents/index.tsx +++ b/src/plugins/copyFileContents/index.tsx @@ -25,7 +25,7 @@ export default definePlugin({ authors: [Devs.Obsidian, Devs.Nuckyz], patches: [ { - find: ".Messages.PREVIEW_BYTES_LEFT.format(", + find: "#{intl::PREVIEW_BYTES_LEFT}", replacement: { match: /\.footerGap.+?url:\i,fileName:\i,fileSize:\i}\),(?<=fileContents:(\i),bytesLeft:(\i).+?)/g, replace: "$&$self.addCopyButton({fileContents:$1,bytesLeft:$2})," diff --git a/src/plugins/crashHandler/index.ts b/src/plugins/crashHandler/index.ts index 221b115f..57703a56 100644 --- a/src/plugins/crashHandler/index.ts +++ b/src/plugins/crashHandler/index.ts @@ -67,7 +67,7 @@ export default definePlugin({ patches: [ { - find: ".Messages.ERRORS_UNEXPECTED_CRASH", + find: "#{intl:;ERRORS_UNEXPECTED_CRASH}", replacement: { match: /this\.setState\((.+?)\)/, replace: "$self.handleCrash(this,$1);" diff --git a/src/plugins/disableCallIdle/index.ts b/src/plugins/disableCallIdle/index.ts index c36fce6c..1fdc862c 100644 --- a/src/plugins/disableCallIdle/index.ts +++ b/src/plugins/disableCallIdle/index.ts @@ -27,7 +27,7 @@ export default definePlugin({ authors: [Devs.Nuckyz], patches: [ { - find: ".Messages.BOT_CALL_IDLE_DISCONNECT", + find: "#{intl::BOT_CALL_IDLE_DISCONNECT}", replacement: { match: /,?(?=\i\(this,"idleTimeout",new \i\.\i\))/, replace: ";return;" diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index ca348c61..087bb555 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -285,7 +285,7 @@ export default definePlugin({ }, // Remove boost requirements to stream with high quality { - find: "STREAM_FPS_OPTION.format", + find: "#{intl::STREAM_FPS_OPTION}", predicate: () => settings.store.enableStreamQualityBypass, replacement: { match: /guildPremiumTier:\i\.\i\.TIER_\d,?/g, @@ -356,7 +356,7 @@ export default definePlugin({ ] }, { - find: ".Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format", + find: "#{intl::STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION}", predicate: () => settings.store.transformStickers, replacement: [ { @@ -381,7 +381,7 @@ export default definePlugin({ } }, { - find: ".Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION", + find: "#{intl::EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION}", predicate: () => settings.store.transformEmojis, replacement: { // Add the fake nitro emoji notice diff --git a/src/plugins/fakeProfileThemes/index.tsx b/src/plugins/fakeProfileThemes/index.tsx index 708c961a..d546650b 100644 --- a/src/plugins/fakeProfileThemes/index.tsx +++ b/src/plugins/fakeProfileThemes/index.tsx @@ -126,7 +126,7 @@ export default definePlugin({ } }, { - find: ".USER_SETTINGS_RESET_PROFILE_THEME", + find: "#{intl::USER_SETTINGS_RESET_PROFILE_THEME}", replacement: { match: /RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/, replace: "$&,$self.addCopy3y3Button({primary:$1,accent:$2})" diff --git a/src/plugins/forceOwnerCrown/index.ts b/src/plugins/forceOwnerCrown/index.ts index 444bfab3..b21de489 100644 --- a/src/plugins/forceOwnerCrown/index.ts +++ b/src/plugins/forceOwnerCrown/index.ts @@ -27,7 +27,7 @@ export default definePlugin({ authors: [Devs.D3SOX, Devs.Nickyux], patches: [ { - find: ".Messages.GUILD_OWNER,", + find: "#{intl::GUILD_OWNER}", replacement: { match: /,isOwner:(\i),/, replace: ",_isOwner:$1=$self.isGuildOwner(e)," diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx index a2a1311d..0f4016ad 100644 --- a/src/plugins/friendsSince/index.tsx +++ b/src/plugins/friendsSince/index.tsx @@ -26,7 +26,7 @@ export default definePlugin({ { find: ".PANEL}),nicknameIcons", replacement: { - match: /#{intl::USER_PROFILE_MEMBER_SINCE},.{0,100}userId:(\i\.id)}\)}\)/, + match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id)}\)}\)/, replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})" } }, @@ -34,7 +34,7 @@ export default definePlugin({ { find: "action:\"PRESS_APP_CONNECTION\"", replacement: { - match: /#{intl::USER_PROFILE_MEMBER_SINCE},.{0,100}userId:(\i\.id),.{0,100}}\)}\),/, + match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/, replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false})," } } diff --git a/src/plugins/gameActivityToggle/index.tsx b/src/plugins/gameActivityToggle/index.tsx index 7aeb470d..32d72fdb 100644 --- a/src/plugins/gameActivityToggle/index.tsx +++ b/src/plugins/gameActivityToggle/index.tsx @@ -92,7 +92,7 @@ export default definePlugin({ patches: [ { - find: ".Messages.ACCOUNT_SPEAKING_WHILE_MUTED", + find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}", replacement: { match: /this\.renderNameZone\(\).+?children:\[/, replace: "$&$self.GameActivityToggleButton()," diff --git a/src/plugins/greetStickerPicker/index.tsx b/src/plugins/greetStickerPicker/index.tsx index 438fa40c..3ab5fca4 100644 --- a/src/plugins/greetStickerPicker/index.tsx +++ b/src/plugins/greetStickerPicker/index.tsx @@ -166,7 +166,7 @@ export default definePlugin({ patches: [ { - find: "Messages.WELCOME_CTA_LABEL", + find: "#{intl::WELCOME_CTA_LABEL}", replacement: { match: /innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/, replace: "$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1)," diff --git a/src/plugins/ignoreActivities/index.tsx b/src/plugins/ignoreActivities/index.tsx index 19f22e61..fac83687 100644 --- a/src/plugins/ignoreActivities/index.tsx +++ b/src/plugins/ignoreActivities/index.tsx @@ -260,9 +260,9 @@ export default definePlugin({ } }, { - find: ".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY", + find: "#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}", replacement: { - match: /\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/, + match: /#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/, replace: (m, props, nowPlaying) => `${m}$self.renderToggleGameActivityButton(${props},${nowPlaying}),` } }, diff --git a/src/plugins/implicitRelationships/index.ts b/src/plugins/implicitRelationships/index.ts index 7fefb39b..868e1355 100644 --- a/src/plugins/implicitRelationships/index.ts +++ b/src/plugins/implicitRelationships/index.ts @@ -32,7 +32,7 @@ export default definePlugin({ patches: [ // Counts header { - find: ".FRIENDS_ALL_HEADER", + find: "#{intl::FRIENDS_ALL_HEADER}", replacement: { match: /toString\(\)\}\);case (\i\.\i)\.BLOCKED/, replace: 'toString()});case $1.IMPLICIT:return "Implicit — "+arguments[1];case $1.BLOCKED' @@ -48,7 +48,7 @@ export default definePlugin({ }, // Sections header { - find: ".FRIENDS_SECTION_ONLINE", + find: "#{intl::FRIENDS_SECTION_ONLINE}", replacement: { match: /(\(0,\i\.jsx\)\(\i\.TabBar\.Item,\{id:\i\.\i)\.BLOCKED,className:([^\s]+?)\.item,children:\i\.\i\.Messages\.BLOCKED\}\)/, replace: "$1.IMPLICIT,className:$2.item,children:\"Implicit\"}),$&" diff --git a/src/plugins/invisibleChat.desktop/index.tsx b/src/plugins/invisibleChat.desktop/index.tsx index c7eb29e7..1af8f4e5 100644 --- a/src/plugins/invisibleChat.desktop/index.tsx +++ b/src/plugins/invisibleChat.desktop/index.tsx @@ -111,7 +111,7 @@ export default definePlugin({ patches: [ { // Indicator - find: ".Messages.MESSAGE_EDITED,", + find: "#{intl::MESSAGE_EDITED}", replacement: { match: /let\{className:\i,message:\i[^}]*\}=(\i)/, replace: "try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&" diff --git a/src/plugins/loadingQuotes/index.ts b/src/plugins/loadingQuotes/index.ts index 7d85cc90..9bfc88a7 100644 --- a/src/plugins/loadingQuotes/index.ts +++ b/src/plugins/loadingQuotes/index.ts @@ -62,7 +62,7 @@ export default definePlugin({ patches: [ { - find: ".LOADING_DID_YOU_KNOW", + find: "#{intl::LOADING_DID_YOU_KNOW}", replacement: [ { match: /"_loadingText".+?(?=(\i)\[.{0,10}\.random)/, diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index a08aeccc..080be776 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -445,7 +445,7 @@ export default definePlugin({ { // Message content renderer - find: "Messages.MESSAGE_EDITED,\")\"", + find: "#{intl::MESSAGE_EDITED}", replacement: [ { // Render editHistory in the deepest div for message content @@ -497,7 +497,7 @@ export default definePlugin({ }, { // Message group rendering - find: "Messages.NEW_MESSAGES_ESTIMATED_WITH_DATE", + find: "#{intl::NEW_MESSAGES_ESTIMATED_WITH_DATE}", replacement: [ { match: /(\i).type===\i\.\i\.MESSAGE_GROUP_BLOCKED\|\|/, diff --git a/src/plugins/moreUserTags/index.tsx b/src/plugins/moreUserTags/index.tsx index 7a56131a..119d02c3 100644 --- a/src/plugins/moreUserTags/index.tsx +++ b/src/plugins/moreUserTags/index.tsx @@ -187,7 +187,7 @@ export default definePlugin({ } }, { - find: ".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP_OFFICIAL,", + find: "#{intl::DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP_OFFICIAL}", replacement: [ // make the tag show the right text { @@ -217,7 +217,7 @@ export default definePlugin({ }, // in the member list { - find: ".Messages.GUILD_OWNER,", + find: "#{intl::GUILD_OWNER}", replacement: { match: /(?\i)=\(null==.{0,100}\.BOT;return null!=(?\i)&&\i\.bot/, replace: "$ = $self.getTag({user: $, channel: arguments[0].channel, origType: $.bot ? 0 : null, location: 'not-chat' }); return typeof $ === 'number'" @@ -232,7 +232,7 @@ export default definePlugin({ } }, { - find: ".Messages.USER_PROFILE_PRONOUNS", + find: "#{ìntl::USER_PROFILE_PRONOUNS}", replacement: { match: /(?=,hideBotTag:!0)/, replace: ",moreTags_channelId:arguments[0].moreTags_channelId" diff --git a/src/plugins/noBlockedMessages/index.ts b/src/plugins/noBlockedMessages/index.ts index d3b37b02..7884aa29 100644 --- a/src/plugins/noBlockedMessages/index.ts +++ b/src/plugins/noBlockedMessages/index.ts @@ -37,7 +37,7 @@ export default definePlugin({ authors: [Devs.rushii, Devs.Samu], patches: [ { - find: "Messages.BLOCKED_MESSAGES_HIDE", + find: "#{intl::BLOCKED_MESSAGES_HIDE}", replacement: [ { match: /let\{[^}]*collapsedReason[^}]*\}/, diff --git a/src/plugins/noOnboardingDelay/index.ts b/src/plugins/noOnboardingDelay/index.ts index 6211e97c..28510976 100644 --- a/src/plugins/noOnboardingDelay/index.ts +++ b/src/plugins/noOnboardingDelay/index.ts @@ -25,7 +25,7 @@ export default definePlugin({ authors: [Devs.nekohaxx], patches: [ { - find: "Messages.ONBOARDING_COVER_WELCOME_SUBTITLE", + find: "#{intl::ONBOARDING_COVER_WELCOME_SUBTITLE}", replacement: { match: "3e3", replace: "0" diff --git a/src/plugins/normalizeMessageLinks/index.ts b/src/plugins/normalizeMessageLinks/index.ts index cac36e65..82076ef2 100644 --- a/src/plugins/normalizeMessageLinks/index.ts +++ b/src/plugins/normalizeMessageLinks/index.ts @@ -13,7 +13,7 @@ export default definePlugin({ authors: [Devs.bb010g], patches: [ { - find: ".Messages.COPY_MESSAGE_LINK,", + find: "#{intl::COPY_MESSAGE_LINK}", replacement: { match: /\.concat\(location\.host\)/, replace: ".concat($self.normalizeHost(location.host))", diff --git a/src/plugins/pauseInvitesForever/index.tsx b/src/plugins/pauseInvitesForever/index.tsx index 666f0af8..ff292a6d 100644 --- a/src/plugins/pauseInvitesForever/index.tsx +++ b/src/plugins/pauseInvitesForever/index.tsx @@ -43,15 +43,15 @@ export default definePlugin({ patches: [ { - find: "Messages.GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION", + find: "#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}", group: true, replacement: [ { - match: /children:\i\.\i\.\i\.GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION/, + match: /children:\i\.\i\.string\(\i\.\i#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}\)/, replace: "children: $self.renderInvitesLabel({guildId:arguments[0].guildId,setChecked})", }, { - match: /\.INVITES_DISABLED\)(?=.+?\.Messages\.INVITES_PERMANENTLY_DISABLED_TIP.+?checked:(\i)).+?\[\1,(\i)\]=\i.useState\(\i\)/, + match: /\.INVITES_DISABLED\)(?=.+?#{intl::INVITES_PERMANENTLY_DISABLED_TIP}.+?checked:(\i)).+?\[\1,(\i)\]=\i.useState\(\i\)/, replace: "$&,setChecked=$2" } ] diff --git a/src/plugins/permissionFreeWill/index.ts b/src/plugins/permissionFreeWill/index.ts index 96e110b6..c45cbff6 100644 --- a/src/plugins/permissionFreeWill/index.ts +++ b/src/plugins/permissionFreeWill/index.ts @@ -32,7 +32,7 @@ export default definePlugin({ patches: [ // Permission lockout, just set the check to true { - find: ".STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION", + find: "#{intl::STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION}", replacement: [ { match: /case"DENY":.{0,50}if\((?=\i\.\i\.can)/, @@ -43,7 +43,7 @@ export default definePlugin({ }, // Onboarding, same thing but we need to prevent the check { - find: ".ONBOARDING_CHANNEL_THRESHOLD_WARNING", + find: "#{intl::ONBOARDING_CHANNEL_THRESHOLD_WARNING}", replacement: [ { match: /{(\i:function\(\){return \i},?){2}}/, diff --git a/src/plugins/replyTimestamp/index.tsx b/src/plugins/replyTimestamp/index.tsx index b0a01add..a50640e9 100644 --- a/src/plugins/replyTimestamp/index.tsx +++ b/src/plugins/replyTimestamp/index.tsx @@ -67,7 +67,7 @@ export default definePlugin({ patches: [ { - find: ".REPLY_QUOTE_MESSAGE_BLOCKED", + find: "#[intl::REPLY_QUOTE_MESSAGE_BLOCKED}", replacement: { match: /\.onClickReply,.+?}\),(?=\i,\i,\i\])/, replace: "$&$self.ReplyTimestamp(arguments[0])," diff --git a/src/plugins/reverseImageSearch/index.tsx b/src/plugins/reverseImageSearch/index.tsx index 728156b2..eb87240c 100644 --- a/src/plugins/reverseImageSearch/index.tsx +++ b/src/plugins/reverseImageSearch/index.tsx @@ -108,7 +108,7 @@ export default definePlugin({ patches: [ { - find: ".Messages.MESSAGE_ACTIONS_MENU_LABEL,shouldHideMediaOptions", + find: "#{intl::MESSAGE_ACTIONS_MENU_LABEL}", replacement: { match: /favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/, replace: (m, target) => `${m}reverseImageSearchType:${target}.getAttribute("data-role"),` diff --git a/src/plugins/roleColorEverywhere/index.tsx b/src/plugins/roleColorEverywhere/index.tsx index 108ed00c..204bc0be 100644 --- a/src/plugins/roleColorEverywhere/index.tsx +++ b/src/plugins/roleColorEverywhere/index.tsx @@ -104,7 +104,7 @@ export default definePlugin({ predicate: () => settings.store.memberList, }, { - find: ".Messages.THREAD_BROWSER_PRIVATE", + find: "#{intl::THREAD_BROWSER_PRIVATE}", replacement: [ { match: /children:\[\i," — ",\i\]/, @@ -132,7 +132,7 @@ export default definePlugin({ predicate: () => settings.store.reactorsList, }, { - find: '.Messages.MESSAGE_EDITED,")"', + find: "#{intl::MESSAGE_EDITED}", replacement: { match: /(?<=isUnsupported\]:(\i)\.isUnsupported\}\),)(?=children:\[)/, replace: "style:{color:$self.useMessageColor($1)}," diff --git a/src/plugins/shikiCodeblocks.desktop/index.ts b/src/plugins/shikiCodeblocks.desktop/index.ts index e6676a86..1092f89a 100644 --- a/src/plugins/shikiCodeblocks.desktop/index.ts +++ b/src/plugins/shikiCodeblocks.desktop/index.ts @@ -46,7 +46,7 @@ export default definePlugin({ } }, { - find: ".PREVIEW_NUM_LINES", + find: "#{intl::PREVIEW_NUM_LINES}", replacement: { match: /(?<=function \i\((\i)\)\{)(?=let\{text:\i,language:)/, replace: "return $self.renderHighlighter({lang:$1.language,content:$1.text});" diff --git a/src/plugins/showAllMessageButtons/index.ts b/src/plugins/showAllMessageButtons/index.ts index 44a5741c..1d689013 100644 --- a/src/plugins/showAllMessageButtons/index.ts +++ b/src/plugins/showAllMessageButtons/index.ts @@ -26,7 +26,7 @@ export default definePlugin({ patches: [ { - find: ".Messages.MESSAGE_UTILITIES_A11Y_LABEL", + find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}", replacement: { match: /isExpanded:\i&&(.+?),/, replace: "isExpanded:$1," diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index d220d0c1..38730371 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -274,7 +274,7 @@ export default definePlugin({ } }, { - find: ".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE", + find: "#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}", replacement: [ { // Change the role permission check to CONNECT if the channel is locked @@ -336,7 +336,7 @@ export default definePlugin({ ] }, { - find: ".Messages.CHANNEL_CALL_CURRENT_SPEAKER.format", + find: "#{intl::CHANNEL_CALL_CURRENT_SPEAKER}", replacement: [ { // Remove the divider and the open chat button for the HiddenChannelLockScreen @@ -351,7 +351,7 @@ export default definePlugin({ ] }, { - find: ".Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR", + find: "#{intl::EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR}", replacement: [ { // Render our HiddenChannelLockScreen component instead of the main voice channel component @@ -401,7 +401,7 @@ export default definePlugin({ ] }, { - find: ".Messages.STAGE_FULL_MODERATOR_TITLE", + find: "#{intl::STAGE_FULL_MODERATOR_TITLE}", replacement: [ { // Remove the divider and amount of users in stage channel components for the HiddenChannelLockScreen @@ -463,7 +463,7 @@ export default definePlugin({ ] }, { - find: ".Messages.FORM_LABEL_MUTED", + find: "#{intl::FORM_LABEL_MUTED}", replacement: { // Make GuildChannelStore.getChannels return hidden channels match: /(?<=getChannels\(\i)(?=\))/, diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index bab0b303..8fd6ef82 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -68,7 +68,7 @@ export default definePlugin({ }, // fixes a bug where Members page must be loaded to see highest role, why is Discord depending on MemberSafetyStore.getEnhancedMember for something that can be obtained here? { - find: "Messages.GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL,allowOverflow", + find: "#{intl::GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL}", predicate: () => settings.store.showModView, replacement: { match: /(role:)\i(?=,guildId.{0,100}role:(\i\[))/, diff --git a/src/plugins/showTimeoutDuration/index.tsx b/src/plugins/showTimeoutDuration/index.tsx index bfe80680..c0f5e918 100644 --- a/src/plugins/showTimeoutDuration/index.tsx +++ b/src/plugins/showTimeoutDuration/index.tsx @@ -65,10 +65,10 @@ export default definePlugin({ patches: [ { - find: ".GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY", + find: "#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}", replacement: [ { - match: /(\i)\.Tooltip,{(text:.{0,30}\.Messages\.GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY)/, + match: /(\i)\.Tooltip,{(text:.{0,30}#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}\))/, replace: "$self.TooltipWrapper,{message:arguments[0].message,$2" } ] diff --git a/src/plugins/sortFriendRequests/index.tsx b/src/plugins/sortFriendRequests/index.tsx index 64eb13fe..6ce1af14 100644 --- a/src/plugins/sortFriendRequests/index.tsx +++ b/src/plugins/sortFriendRequests/index.tsx @@ -45,7 +45,7 @@ export default definePlugin({ replace: "}).sortBy(row => $self.wrapSort(($1), row)).value()" } }, { - find: ".Messages.FRIEND_REQUEST_CANCEL", + find: "#{intl::FRIEND_REQUEST_CANCEL}", replacement: { predicate: () => settings.store.showDates, match: /subText:(\i)(?<=user:(\i).+?)/, diff --git a/src/plugins/startupTimings/index.tsx b/src/plugins/startupTimings/index.tsx index 5051fdf4..aabc786a 100644 --- a/src/plugins/startupTimings/index.tsx +++ b/src/plugins/startupTimings/index.tsx @@ -26,7 +26,7 @@ export default definePlugin({ description: "Adds Startup Timings to the Settings menu", authors: [Devs.Megu], patches: [{ - find: "Messages.ACTIVITY_SETTINGS", + find: "#{intl::ACTIVITY_SETTINGS}", replacement: { match: /(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\)}\))/, replace: (_, commaOrSemi, settings, elements) => "" + diff --git a/src/plugins/themeAttributes/index.ts b/src/plugins/themeAttributes/index.ts index 2a613967..8e1e022b 100644 --- a/src/plugins/themeAttributes/index.ts +++ b/src/plugins/themeAttributes/index.ts @@ -38,7 +38,7 @@ export default definePlugin({ // add --avatar-url- css variable to avatar img elements // popout profiles { - find: ".LABEL_WITH_ONLINE_STATUS", + find: "#{intl::LABEL_WITH_ONLINE_STATUS}", replacement: { match: /src:null!=\i\?(\i).{1,50}"aria-hidden":!0/, replace: "$&,style:$self.getAvatarStyles($1)" diff --git a/src/plugins/unlockedAvatarZoom/index.ts b/src/plugins/unlockedAvatarZoom/index.ts index 08503eb8..79c20474 100644 --- a/src/plugins/unlockedAvatarZoom/index.ts +++ b/src/plugins/unlockedAvatarZoom/index.ts @@ -25,7 +25,7 @@ export default definePlugin({ settings, patches: [ { - find: ".Messages.AVATAR_UPLOAD_EDIT_MEDIA", + find: "#{intl::AVATAR_UPLOAD_EDIT_MEDIA}", replacement: { match: /maxValue:\d/, replace: "maxValue:$self.settings.store.zoomMultiplier", diff --git a/src/plugins/userVoiceShow/index.tsx b/src/plugins/userVoiceShow/index.tsx index 07b18c27..0c8e3048 100644 --- a/src/plugins/userVoiceShow/index.tsx +++ b/src/plugins/userVoiceShow/index.tsx @@ -57,7 +57,7 @@ export default definePlugin({ patches: [ // User Popout, Full Size Profile, Direct Messages Side Profile { - find: ".Messages.USER_PROFILE_LOAD_ERROR", + find: "#{intl::USER_PROFILE_LOAD_ERROR}", replacement: { match: /(\.fetchError.+?\?)null/, replace: (_, rest) => `${rest}$self.VoiceChannelIndicator({userId:arguments[0]?.userId,isProfile:true})` diff --git a/src/plugins/validReply/index.ts b/src/plugins/validReply/index.ts index b65496f4..4e2b6b71 100644 --- a/src/plugins/validReply/index.ts +++ b/src/plugins/validReply/index.ts @@ -37,9 +37,9 @@ export default definePlugin({ authors: [Devs.newwares], patches: [ { - find: "Messages.REPLY_QUOTE_MESSAGE_NOT_LOADED", + find: "#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED", replacement: { - match: /Messages\.REPLY_QUOTE_MESSAGE_NOT_LOADED/, + match: /#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}\)/, replace: "$&,onMouseEnter:()=>$self.fetchReply(arguments[0])" } }, diff --git a/src/plugins/webContextMenus.web/index.ts b/src/plugins/webContextMenus.web/index.ts index 4ed7e922..3b2b58c0 100644 --- a/src/plugins/webContextMenus.web/index.ts +++ b/src/plugins/webContextMenus.web/index.ts @@ -127,11 +127,11 @@ export default definePlugin({ replace: "return [true" }, { - match: /(?<=#{intl::COPY_IMAGE_MENU_ITEM},)action:/, + match: /(?<=#{intl::COPY_IMAGE_MENU_ITEM}\),)action:/, replace: "action:()=>$self.copyImage(arguments[0]),oldAction:" }, { - match: /(?<=#{intl::SAVE_IMAGE_MENU_ITEM},)action:/, + match: /(?<=#{intl::SAVE_IMAGE_MENU_ITEM}\),)action:/, replace: "action:()=>$self.saveImage(arguments[0]),oldAction:" }, ]