2024-01-03 13:49:03 +01:00
|
|
|
/*
|
|
|
|
|
* Vencord, a Discord client mod
|
2024-04-17 14:29:47 -04:00
|
|
|
* Copyright (c) 2024 Vendicated and contributors
|
2024-01-03 13:49:03 +01:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { definePluginSettings } from "@api/Settings";
|
|
|
|
|
import { Link } from "@components/Link";
|
2025-10-11 21:50:14 -04:00
|
|
|
import { Paragraph } from "@components/Paragraph";
|
2024-01-03 13:49:03 +01:00
|
|
|
import { Margins } from "@utils/margins";
|
|
|
|
|
import { classes } from "@utils/misc";
|
|
|
|
|
import { closeAllModals } from "@utils/modal";
|
feat(i18n): Add translation keys and implement localization for 80+ p… (#772)
* feat(i18n): Add translation keys and implement localization for 80+ plugins
- Add comprehensive translation keys to i18n/en-US/vencord.json
- Update all plugins to use t() function from @utils/translation
- Replace hardcoded strings with translation function calls
- Support plural forms with _one/_other suffixes
- Use Translate component for strings with embedded JSX
Plugins translated include:
- Core: reviewDB, translate, voiceMessages, messageLogger
- UI: showHiddenChannels, customRPC, clientTheme, permissionsViewer
- Utility: betterSessions, betterSettings, memberCount, betterFolders
- Social: relationshipNotifier, messageLatency, whoReacted
- Media: imageZoom, viewIcons, viewRaw, decor, fakeNitro
- And 60+ more plugins
All changes pass TypeScript compilation.
* Update i18n/en-US/vencord.json
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Update i18n/en-US/vencord.json
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Update i18n/en-US/vencord.json
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Update i18n/en-US/vencord.json
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Update i18n/en-US/vencord.json
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Update i18n/en-US/vencord.json
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* feat(i18n): Add equicord.json for equicordplugins localization
- Create i18n/en-US/equicord.json with messageLoggerEnhanced translation keys
- Create empty equicord.json files for all other locales (Crowdin will handle translations)
- Build system automatically picks up all JSON files in i18n/{locale}/
* Update i18n/en-US/vencord.json
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* feat(i18n): Add translations to 200 equicordplugins
- Translate all user-facing strings in equicordplugins to use t() function
- Add translation keys to i18n/en-US/equicord.json
- Plugin names remain static strings for build system compatibility
- Settings descriptions, tooltips, context menus, and UI strings now translatable
* FileUpload: add sharex file support (#771)
* FileUpload: add sharex file support
Quick note, the settings seem to split pacal case with spaces for some reason,
so `ShareX` renders as `Share X`. This is stupid and im upset and I dont think
theres anything I can do about it
* FileUpload: use Headers object to construct HTTP headers
* Update vencord.json
---------
Co-authored-by: Mishal <91066601+mishalhossin@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Key <keircn@proton.me>
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
2026-02-15 20:39:58 +06:00
|
|
|
import { t } from "@utils/translation";
|
2024-01-03 13:49:03 +01:00
|
|
|
import { OptionType } from "@utils/types";
|
2025-10-11 21:50:14 -04:00
|
|
|
import { FluxDispatcher } from "@webpack/common";
|
2024-01-03 13:49:03 +01:00
|
|
|
|
2025-11-16 15:17:35 +01:00
|
|
|
import DecorPlugin from ".";
|
2024-01-03 13:49:03 +01:00
|
|
|
import DecorSection from "./ui/components/DecorSection";
|
|
|
|
|
|
|
|
|
|
export const settings = definePluginSettings({
|
|
|
|
|
changeDecoration: {
|
|
|
|
|
type: OptionType.COMPONENT,
|
|
|
|
|
component() {
|
2025-11-18 23:48:00 -05:00
|
|
|
if (!DecorPlugin.started) return <Paragraph>
|
2026-03-03 12:14:28 -05:00
|
|
|
{t("vencord.decor.enableAndRestart")}
|
2025-10-11 21:50:14 -04:00
|
|
|
</Paragraph>;
|
2024-01-03 13:49:03 +01:00
|
|
|
|
|
|
|
|
return <div>
|
|
|
|
|
<DecorSection hideTitle hideDivider noMargin />
|
2025-10-11 21:50:14 -04:00
|
|
|
<Paragraph className={classes(Margins.top8, Margins.bottom8)}>
|
2026-03-06 20:59:33 -05:00
|
|
|
{t("decor.accessFromProfiles", {
|
|
|
|
|
link: <Link
|
|
|
|
|
href="/settings/profile-customization"
|
|
|
|
|
onClick={e => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
closeAllModals();
|
|
|
|
|
FluxDispatcher.dispatch({ type: "USER_SETTINGS_MODAL_SET_SECTION", section: "Profile Customization" });
|
|
|
|
|
}}
|
|
|
|
|
>{t("vencord.decor.profilesLink")}</Link>
|
|
|
|
|
})}
|
2025-10-11 21:50:14 -04:00
|
|
|
</Paragraph>
|
2024-01-03 13:49:03 +01:00
|
|
|
</div>;
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-04-17 14:29:47 -04:00
|
|
|
baseUrl: {
|
|
|
|
|
type: OptionType.STRING,
|
|
|
|
|
hidden: true,
|
2026-03-06 20:59:33 -05:00
|
|
|
description: t("vencord.decor.baseUrl"),
|
2024-04-17 14:29:47 -04:00
|
|
|
default: "https://decor.fieryflames.dev"
|
|
|
|
|
},
|
2024-01-03 13:49:03 +01:00
|
|
|
agreedToGuidelines: {
|
|
|
|
|
type: OptionType.BOOLEAN,
|
2026-03-06 20:59:33 -05:00
|
|
|
description: t("vencord.decor.agreedToGuidelines"),
|
2024-01-03 13:49:03 +01:00
|
|
|
hidden: true,
|
|
|
|
|
default: false
|
|
|
|
|
}
|
|
|
|
|
});
|