fix BetterFolders and various strings

This commit is contained in:
Vendicated 2025-10-15 19:50:41 +02:00
parent b1edb6c156
commit f4cb4ed39e
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -21,19 +21,21 @@ import { Channel, CloudUpload, Guild, GuildFeatures, Message, User } from "@venc
import { ChannelActionCreators, ChannelStore, ComponentDispatch, Constants, FluxDispatcher, GuildStore, i18n, IconUtils, InviteActions, MessageActions, RestAPI, SelectedChannelStore, SelectedGuildStore, UserProfileActions, UserProfileStore, UserSettingsActionCreators, UserUtils } from "@webpack/common";
import { Except } from "type-fest";
import { runtimeHashMessageKey } from "./intlHash";
import { runtimeHashMessageKey, runtimeHashMessageKeyLegacy } from "./intlHash";
import { Logger } from "./Logger";
import { MediaModalItem, MediaModalProps, openMediaModal } from "./modal";
const IntlManagerLogger = new Logger("IntlManager");
// TODO: remove legacy hashing function once Discord ships new one everywhere for a while
/**
* Get an internationalized message from a non hashed key
* @param key The plain message key
* @param values The values to interpolate, if it's a rich message
*/
export function getIntlMessage(key: string, values?: Record<PropertyKey, any>): any {
return getIntlMessageFromHash(runtimeHashMessageKey(key), values, key);
return getIntlMessageFromHash(runtimeHashMessageKey(key), values, key) || getIntlMessageFromHash(runtimeHashMessageKeyLegacy(key), values, key);
}
/**