mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-14 09:03:03 -04:00
Fix Broken i18n
This commit is contained in:
parent
7dfa1ad5f1
commit
bad5dac776
15 changed files with 22 additions and 22 deletions
|
@ -15,7 +15,7 @@ interface ColorPickerProps {
|
||||||
showEyeDropper?: boolean;
|
showEyeDropper?: boolean;
|
||||||
onChange(value: number | null): void;
|
onChange(value: number | null): void;
|
||||||
}
|
}
|
||||||
const ColorPicker = findComponentByCodeLazy<ColorPickerProps>(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)");
|
const ColorPicker = findComponentByCodeLazy<ColorPickerProps>("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}", ".BACKGROUND_PRIMARY)");
|
||||||
|
|
||||||
// TinyColor is completely unmangled and it's duplicated in two modules! Fun!
|
// TinyColor is completely unmangled and it's duplicated in two modules! Fun!
|
||||||
const TinyColor: tinycolor.Constructor = findByCodeLazy("this._gradientType=");
|
const TinyColor: tinycolor.Constructor = findByCodeLazy("this._gradientType=");
|
||||||
|
|
|
@ -77,7 +77,7 @@ export default definePlugin({
|
||||||
find: "#{intl::BILLING_SETTINGS}",
|
find: "#{intl::BILLING_SETTINGS}",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(?<=#{intl::BILLING_SETTINGS},)/,
|
match: /(?<=#{intl::BILLING_SETTINGS}\),)/,
|
||||||
replace: "capitalism:true,"
|
replace: "capitalism:true,"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -99,7 +99,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Emoji list
|
// Emoji list
|
||||||
find: "#{intl::EMOJI_PICKER_CREATE_EMOJI_TITLE},size:",
|
find: "#{intl::EMOJI_PICKER_CREATE_EMOJI_TITLE}),size:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(\i)=\i\|\|!\i&&\i.\i.isEmojiCategoryNitroLocked\(\{[^}]*\}\);/,
|
match: /(\i)=\i\|\|!\i&&\i.\i.isEmojiCategoryNitroLocked\(\{[^}]*\}\);/,
|
||||||
replace: "$&$1||"
|
replace: "$&$1||"
|
||||||
|
|
|
@ -39,7 +39,7 @@ export default definePlugin({
|
||||||
settings,
|
settings,
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "#{intl::GUILD_OWNER},",
|
find: "#{intl::GUILD_OWNER}),",
|
||||||
replacement:
|
replacement:
|
||||||
{
|
{
|
||||||
// We add the banner as a property while we can still access the user id
|
// We add the banner as a property while we can still access the user id
|
||||||
|
|
|
@ -75,7 +75,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "#{intl::BAN_MULTIPLE_CONFIRM_TITLE}",
|
find: "#{intl::BAN_MULTIPLE_CONFIRM_TITLE}",
|
||||||
replacement: [{
|
replacement: [{
|
||||||
match: /\[\{name:#{intl::BAN_REASON_OPTION_SPAM_ACCOUNT}.+?\}\]/,
|
match: /\[\{name:\i\.\i\.string\(\i\.\i#{intl::BAN_REASON_OPTION_SPAM_ACCOUNT}\).+?\}\]/,
|
||||||
replace: "$self.getReasons()"
|
replace: "$self.getReasons()"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ export default definePlugin({
|
||||||
find: "#{intl::HUB_INVITE_ANOTHER_SCHOOL_LINK}",
|
find: "#{intl::HUB_INVITE_ANOTHER_SCHOOL_LINK}",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /,(\i)&&(\(.{0,15}\i\.TooltipContainer.+)(#{intl::Messages.GUEST_MEMBERSHIP_EXPLANATION})/,
|
match: /,(\i)&&(\(.{0,15}\i\.TooltipContainer.+)(\i\.\i\.string\(\i\.\i#{intl::GUEST_MEMBERSHIP_EXPLANATION}\))/,
|
||||||
replace: ",($1||((!$1)&&arguments[0].invite.expires_at)) && $2$self.RenderTip($1, $3, arguments[0].invite.expires_at)"
|
replace: ",($1||((!$1)&&arguments[0].invite.expires_at)) && $2$self.RenderTip($1, $3, arguments[0].invite.expires_at)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default definePlugin({
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "#{intl::UNKNOWN_ROLE_PLACEHOLDER}",
|
find: "#{intl::UNKNOWN_ROLE_PLACEHOLDER})]",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(hidePersonalInformation.*?)return/,
|
match: /(hidePersonalInformation.*?)return/,
|
||||||
replace: "$1return $self.patchChatboxMention(arguments[0]);"
|
replace: "$1return $self.patchChatboxMention(arguments[0]);"
|
||||||
|
|
|
@ -88,7 +88,7 @@ function CopyPresetComponent() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ColorPicker = findComponentByCodeLazy(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)");
|
const ColorPicker = findComponentByCodeLazy("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}", ".BACKGROUND_PRIMARY)");
|
||||||
|
|
||||||
export function generateAndApplyProceduralTheme() {
|
export function generateAndApplyProceduralTheme() {
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ export default definePlugin({
|
||||||
find: '("guildsnav")',
|
find: '("guildsnav")',
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(?<=#{intl::SERVERS}"\]\),children:.{0,300}?)(\i)(\)?\.map\(\i\))/,
|
match: /(?<=#{intl::SERVERS}\),children:.{0,300}?)(\i)(\)?\.map\(\i\))/,
|
||||||
replace: "$self.useFilteredGuilds($1)$2",
|
replace: "$self.useFilteredGuilds($1)$2",
|
||||||
},
|
},
|
||||||
// despite my best efforts, the above doesnt trigger a rerender
|
// despite my best efforts, the above doesnt trigger a rerender
|
||||||
|
|
|
@ -140,7 +140,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "DefaultCustomizationSections",
|
find: "DefaultCustomizationSections",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=#{intl::USER_SETTINGS_AVATAR_DECORATION}},"decoration"\),)/,
|
match: /(?<=#{intl::USER_SETTINGS_AVATAR_DECORATION}\)},"decoration"\),)/,
|
||||||
replace: "$self.ResetCard(),"
|
replace: "$self.ResetCard(),"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -59,13 +59,13 @@ export default definePlugin({
|
||||||
replacement: {
|
replacement: {
|
||||||
// Find the Edit User Profile button and insert our custom button.
|
// Find the Edit User Profile button and insert our custom button.
|
||||||
// A bit jank, but whatever
|
// A bit jank, but whatever
|
||||||
match: /,(.{11}\.Button,.{58}\.USER_SETTINGS_EDIT_USER_PROFILE}\))/,
|
match: /,(.{0,20}\.Button,.{0,100}#{intl::USER_SETTINGS_EDIT_USER_PROFILE}\)}\))/,
|
||||||
replace: ",$self.insertScanQrButton($1)",
|
replace: ",$self.insertScanQrButton($1)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Insert a Scan QR Code MenuItem in the Swith Accounts popout
|
// Insert a Scan QR Code MenuItem in the Swith Accounts popout
|
||||||
{
|
{
|
||||||
find: "#{intl::SWITCH_ACCOUNTS_MANAGE_ACCOUNTS},",
|
find: 'id:"manage-accounts"',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(id:"manage-accounts",.*?)}\)\)(,\i)/,
|
match: /(id:"manage-accounts",.*?)}\)\)(,\i)/,
|
||||||
replace: "$1}),$self.ScanQrMenuItem)$2"
|
replace: "$1}),$self.ScanQrMenuItem)$2"
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default definePlugin({
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "#{intl::STICKER_BUTTON_LABEL},",
|
find: "#{intl::STICKER_BUTTON_LABEL}",
|
||||||
replacement: [{
|
replacement: [{
|
||||||
match: /(children:\(0,\w\.jsx\)\()([\w.]+?)(,{innerClassName.{10,30}\.stickerButton)/,
|
match: /(children:\(0,\w\.jsx\)\()([\w.]+?)(,{innerClassName.{10,30}\.stickerButton)/,
|
||||||
replace: (_, head, button, tail) => {
|
replace: (_, head, button, tail) => {
|
||||||
|
@ -66,7 +66,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "#{intl::EXPRESSION_PICKER_GIF}",
|
find: "#{intl::EXPRESSION_PICKER_GIF}",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /role:"tablist",.+?#{intl::EXPRESSION_PICKER_CATEGORIES_A11Y_LABEL},children:(\[.*?\)\]}\)}\):null,)(.*?closePopout:\w.*?:null)/s,
|
match: /role:"tablist",.+?#{intl::EXPRESSION_PICKER_CATEGORIES_A11Y_LABEL}\),children:(\[.*?\)\]}\)}\):null,)(.*?closePopout:\w.*?:null)/s,
|
||||||
replace: m => {
|
replace: m => {
|
||||||
const stickerTabRegex = /(\w+?)\?(\([^()]+?\))\((.{1,2}),{.{0,128},isActive:(.{1,2})===.{1,150},children:(.{1,10}#{intl::EXPRESSION_PICKER_STICKER}).*?:null/s;
|
const stickerTabRegex = /(\w+?)\?(\([^()]+?\))\((.{1,2}),{.{0,128},isActive:(.{1,2})===.{1,150},children:(.{1,10}#{intl::EXPRESSION_PICKER_STICKER}).*?:null/s;
|
||||||
const res = m.replace(stickerTabRegex, (_m, canUseStickers, jsx, tabHeaderComp, currentTab, stickerText) => {
|
const res = m.replace(stickerTabRegex, (_m, canUseStickers, jsx, tabHeaderComp, currentTab, stickerText) => {
|
||||||
|
|
|
@ -14,9 +14,9 @@ export default definePlugin({
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "BOT:default:",
|
find: "#{intl::APP_TAG})",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(default:\i)=.{0,30}\)/,
|
match: /(default:\i)=\i\.\i\.string\(\i\.\i#{intl::APP_TAG}\)/,
|
||||||
replace: "$1=\"BOT\""
|
replace: "$1=\"BOT\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,9 +27,9 @@ export default definePlugin({
|
||||||
authors: [EquicordDevs.iamme],
|
authors: [EquicordDevs.iamme],
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "#{intl::MESSAGE_EDITED},",
|
find: "#{intl::MESSAGE_EDITED}),",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /#{intl::MESSAGE_EDITED},(?:[^}]*[}]){3}\)/,
|
match: /#{intl::MESSAGE_EDITED}\),(?:[^}]*[}]){3}\)/,
|
||||||
replace: "$&,$self.PinnedIcon(arguments[0].message)"
|
replace: "$&,$self.PinnedIcon(arguments[0].message)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,12 +133,12 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "#{intl::CUSTOM_STATUS_SET_CUSTOM_STATUS}",
|
find: "#{intl::CUSTOM_STATUS_SET_CUSTOM_STATUS}",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /\.ModalFooter,.{0,70}\.Messages\.SAVE\}\)/,
|
match: /\.ModalFooter,.{0,70}\i\.\i\.string\(\i\.\i#{intl::SAVE}\)\}\)/,
|
||||||
replace: "$&,$self.renderRememberButton(this.state)"
|
replace: "$&,$self.renderRememberButton(this.state)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: '"aria-label":#{intl::STATUS_MENU_LABEL}',
|
find: /"aria-label":.{0,1}\.\i\.string\(\i\.\i#{intl::STATUS_MENU_LABEL}/,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /!\i&&(.{0,15}\i\.Fragment.{0,55}null==(\i).{0,200}customEmojiPlaceholder\}\),onClick:([^}]+}))/,
|
match: /!\i&&(.{0,15}\i\.Fragment.{0,55}null==(\i).{0,200}customEmojiPlaceholder\}\),onClick:([^}]+}))/,
|
||||||
replace: "$self.render($2, $3),false&&$1"
|
replace: "$self.render($2, $3),false&&$1"
|
||||||
|
|
|
@ -32,10 +32,10 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: '#{intl::SERVERS}"]),children',
|
find: "#{intl::SERVERS}),children",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(?<=#{intl::SERVERS}"\]\),children:)\i\.map\(\i\)/,
|
match: /(?<=#{intl::SERVERS}\),children:)\i\.map\(\i\)/,
|
||||||
replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"
|
replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue