mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 14:13:01 -04:00
Fix all plugins for new i18n lib (#2993)
This commit is contained in:
parent
5216bcca1e
commit
00f82e96bd
89 changed files with 351 additions and 238 deletions
|
@ -24,12 +24,13 @@ import { Settings } from "@api/Settings";
|
|||
import { disableStyle, enableStyle } from "@api/Styles";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { getIntlMessage } from "@utils/discord";
|
||||
import { proxyLazy } from "@utils/lazy";
|
||||
import { Logger } from "@utils/Logger";
|
||||
import { classes } from "@utils/misc";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByCodeLazy, findByPropsLazy } from "@webpack";
|
||||
import { ChannelStore, FluxDispatcher, i18n, Menu, MessageStore, Parser, SelectedChannelStore, Timestamp, UserStore, useStateFromStores } from "@webpack/common";
|
||||
import { ChannelStore, FluxDispatcher, Menu, MessageStore, Parser, SelectedChannelStore, Timestamp, UserStore, useStateFromStores } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
import overlayStyle from "./deleteStyleOverlay.css?managed";
|
||||
|
@ -178,7 +179,7 @@ export default definePlugin({
|
|||
isEdited={true}
|
||||
isInline={false}
|
||||
>
|
||||
<span className={styles.edited}>{" "}({i18n.Messages.MESSAGE_EDITED})</span>
|
||||
<span className={styles.edited}>{" "}({getIntlMessage("MESSAGE_EDITED")})</span>
|
||||
</Timestamp>
|
||||
</div>
|
||||
))}
|
||||
|
@ -445,7 +446,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 +498,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\|\|/,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue