feat(i18n): remove other languages for now, i'll translate everything later

This commit is contained in:
2026-02-26 20:18:27 +01:00
parent 4141580ac1
commit 35833a3fb4
5 changed files with 14 additions and 23 deletions

View File

@@ -4,7 +4,6 @@ import gsap from "gsap";
const { locales, locale, setLocale } = useI18n(); const { locales, locale, setLocale } = useI18n();
const store = useSettingsStore(); const store = useSettingsStore();
const confirmationModal = useConfirmationModal(); const confirmationModal = useConfirmationModal();
const achievements = useAchievementsStore();
const { assets } = useAssets(); const { assets } = useAssets();
const { onRender } = useScreen(); const { onRender } = useScreen();
@@ -160,18 +159,21 @@ const handleActivateB = async () => {
store.closeSubMenu(); store.closeSubMenu();
}; };
const AVAILABLE_LOCALES = ["en", "fr"];
const handleActivateA = () => { const handleActivateA = () => {
if (isAnimating.value) return; if (isAnimating.value) return;
const selectedLocale = locales.value[BUTTON_KEYS.indexOf(selected.value)]!; const selectedLocale = locales.value[BUTTON_KEYS.indexOf(selected.value)]!;
setLocale(selectedLocale.code); if (!AVAILABLE_LOCALES.includes(selectedLocale.code)) {
confirmationModal.open({
text: $t("settings.options.language.unavailable"),
timeout: 2000,
});
return;
}
if (!achievements.advancement.languages.includes(selectedLocale.code)) { setLocale(selectedLocale.code);
achievements.advancement.languages.push(selectedLocale.code);
if (achievements.advancement.languages.length === locales.value.length) {
achievements.unlock("settings_language_try_all");
}
}
confirmationModal.open({ confirmationModal.open({
text: $t( text: $t(

View File

@@ -23,7 +23,6 @@ export const ACHIEVEMENTS = [
{ id: "taptap_score_20", secret: false }, { id: "taptap_score_20", secret: false },
// secrets // secrets
{ id: "settings_color_try_all", secret: true }, { id: "settings_color_try_all", secret: true },
{ id: "settings_language_try_all", secret: true },
{ id: "settings_visit_all", secret: true }, { id: "settings_visit_all", secret: true },
{ id: "contact_36_notifications", secret: true }, { id: "contact_36_notifications", secret: true },
] as const; ] as const;
@@ -32,7 +31,6 @@ export type Achievement = (typeof ACHIEVEMENTS)[number]["id"];
export const useAchievementsStore = defineStore("achievements", () => { export const useAchievementsStore = defineStore("achievements", () => {
const app = useAppStore(); const app = useAppStore();
const { locale } = useI18n();
const storage = useLocalStorage( const storage = useLocalStorage(
STORAGE_ID, STORAGE_ID,
@@ -40,7 +38,6 @@ export const useAchievementsStore = defineStore("achievements", () => {
unlocked: [] as Achievement[], unlocked: [] as Achievement[],
advancement: { advancement: {
colors: [app.color.hex], colors: [app.color.hex],
languages: [locale.value],
visitedSettings: [] as string[], visitedSettings: [] as string[],
}, },
}, },
@@ -50,9 +47,6 @@ export const useAchievementsStore = defineStore("achievements", () => {
if (!storage.value.advancement.colors.includes(app.color.hex)) { if (!storage.value.advancement.colors.includes(app.color.hex)) {
storage.value.advancement.colors.push(app.color.hex); storage.value.advancement.colors.push(app.color.hex);
} }
if (!storage.value.advancement.languages.includes(locale.value)) {
storage.value.advancement.languages.push(locale.value);
}
const confetti = useConfetti(); const confetti = useConfetti();
@@ -80,7 +74,6 @@ export const useAchievementsStore = defineStore("achievements", () => {
unlocked: [], unlocked: [],
advancement: { advancement: {
colors: [app.color.hex], colors: [app.color.hex],
languages: [locale.value],
visitedSettings: [], visitedSettings: [],
}, },
}; };

View File

@@ -65,7 +65,6 @@
"2048_score_512": "Reach the 512 tile\nin 2048", "2048_score_512": "Reach the 512 tile\nin 2048",
"taptap_score_20": "Score 20 points\nin TapTap", "taptap_score_20": "Score 20 points\nin TapTap",
"settings_color_try_all": "Try all colors", "settings_color_try_all": "Try all colors",
"settings_language_try_all": "Try all languages",
"settings_visit_all": "Visit all settings\nsubmenus", "settings_visit_all": "Visit all settings\nsubmenus",
"contact_36_notifications": "Trigger 36\nnotifications" "contact_36_notifications": "Trigger 36\nnotifications"
}, },
@@ -98,7 +97,8 @@
"language": { "language": {
"title": "Language", "title": "Language",
"description": "Select the language to use.", "description": "Select the language to use.",
"confirmation": "Language set to English." "confirmation": "Language set to English.",
"unavailable": "This language is not\navailable yet."
}, },
"2048": { "2048": {
"title": "2048", "title": "2048",

View File

@@ -65,7 +65,6 @@
"2048_score_512": "Atteindre la tuile 512\nà 2048", "2048_score_512": "Atteindre la tuile 512\nà 2048",
"taptap_score_20": "Marquer 20 points\nà TapTap", "taptap_score_20": "Marquer 20 points\nà TapTap",
"settings_color_try_all": "Essayer toutes les couleurs", "settings_color_try_all": "Essayer toutes les couleurs",
"settings_language_try_all": "Essayer toutes les langues",
"settings_visit_all": "Visiter tous les\nparamètres", "settings_visit_all": "Visiter tous les\nparamètres",
"contact_36_notifications": "Déclencher 36\nnotifications" "contact_36_notifications": "Déclencher 36\nnotifications"
}, },
@@ -98,7 +97,8 @@
"language": { "language": {
"title": "Langue", "title": "Langue",
"description": "Sélectionner la langue que\nvous voulez utiliser.", "description": "Sélectionner la langue que\nvous voulez utiliser.",
"confirmation": "La langue est réglée sur Français." "confirmation": "La langue est réglée sur Français.",
"unavailable": "Cette langue n'est pas\nencore disponible."
}, },
"2048": { "2048": {
"title": "2048", "title": "2048",

View File

@@ -41,11 +41,7 @@ export default defineNuxtConfig({
{ property: "og:url", content: URL }, { property: "og:url", content: URL },
{ property: "og:site_name", content: TITLE }, { property: "og:site_name", content: TITLE },
{ property: "og:locale", content: "en-US" }, { property: "og:locale", content: "en-US" },
{ property: "og:locale:alternate", content: "de-DE" },
{ property: "og:locale:alternate", content: "fr-FR" }, { property: "og:locale:alternate", content: "fr-FR" },
{ property: "og:locale:alternate", content: "es-ES" },
{ property: "og:locale:alternate", content: "it-IT" },
{ property: "og:locale:alternate", content: "ja-JP" },
{ name: "twitter:card", content: "summary_large_image" }, { name: "twitter:card", content: "summary_large_image" },
{ name: "twitter:title", content: TITLE }, { name: "twitter:title", content: TITLE },
{ name: "twitter:description", content: DESCRIPTION }, { name: "twitter:description", content: DESCRIPTION },