Fix all plugins for new i18n lib (#2993)

This commit is contained in:
Nuckyz 2024-11-05 16:49:27 -03:00
parent 5216bcca1e
commit 00f82e96bd
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
89 changed files with 351 additions and 238 deletions

View file

@ -16,11 +16,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { getIntlMessage } from "@utils/discord";
import { findComponentByCodeLazy, findLazy } from "@webpack";
import { i18n, useToken } from "@webpack/common";
import { useToken } from "@webpack/common";
const ColorMap = findLazy(m => m.colors?.INTERACTIVE_MUTED?.css);
const VerifiedIconComponent = findComponentByCodeLazy(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP");
const VerifiedIconComponent = findComponentByCodeLazy("#{intl::CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP}");
export function VerifiedIcon() {
const color = useToken(ColorMap.colors.INTERACTIVE_MUTED).hex();
@ -31,7 +32,7 @@ export function VerifiedIcon() {
color={color}
forcedIconColor={forcedIconColor}
size={16}
tooltipText={i18n.Messages.CONNECTION_VERIFIED}
tooltipText={getIntlMessage("CONNECTION_VERIFIED")}
/>
);
}