feat(i18n): remove other languages for now, i'll translate everything later
This commit is contained in:
@@ -4,7 +4,6 @@ import gsap from "gsap";
|
||||
const { locales, locale, setLocale } = useI18n();
|
||||
const store = useSettingsStore();
|
||||
const confirmationModal = useConfirmationModal();
|
||||
const achievements = useAchievementsStore();
|
||||
const { assets } = useAssets();
|
||||
const { onRender } = useScreen();
|
||||
|
||||
@@ -160,19 +159,22 @@ const handleActivateB = async () => {
|
||||
store.closeSubMenu();
|
||||
};
|
||||
|
||||
const AVAILABLE_LOCALES = ["en", "fr"];
|
||||
|
||||
const handleActivateA = () => {
|
||||
if (isAnimating.value) return;
|
||||
const selectedLocale = locales.value[BUTTON_KEYS.indexOf(selected.value)]!;
|
||||
|
||||
setLocale(selectedLocale.code);
|
||||
|
||||
if (!achievements.advancement.languages.includes(selectedLocale.code)) {
|
||||
achievements.advancement.languages.push(selectedLocale.code);
|
||||
if (achievements.advancement.languages.length === locales.value.length) {
|
||||
achievements.unlock("settings_language_try_all");
|
||||
}
|
||||
if (!AVAILABLE_LOCALES.includes(selectedLocale.code)) {
|
||||
confirmationModal.open({
|
||||
text: $t("settings.options.language.unavailable"),
|
||||
timeout: 2000,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
setLocale(selectedLocale.code);
|
||||
|
||||
confirmationModal.open({
|
||||
text: $t(
|
||||
"settings.options.language.confirmation",
|
||||
|
||||
@@ -23,7 +23,6 @@ export const ACHIEVEMENTS = [
|
||||
{ id: "taptap_score_20", secret: false },
|
||||
// secrets
|
||||
{ id: "settings_color_try_all", secret: true },
|
||||
{ id: "settings_language_try_all", secret: true },
|
||||
{ id: "settings_visit_all", secret: true },
|
||||
{ id: "contact_36_notifications", secret: true },
|
||||
] as const;
|
||||
@@ -32,7 +31,6 @@ export type Achievement = (typeof ACHIEVEMENTS)[number]["id"];
|
||||
|
||||
export const useAchievementsStore = defineStore("achievements", () => {
|
||||
const app = useAppStore();
|
||||
const { locale } = useI18n();
|
||||
|
||||
const storage = useLocalStorage(
|
||||
STORAGE_ID,
|
||||
@@ -40,7 +38,6 @@ export const useAchievementsStore = defineStore("achievements", () => {
|
||||
unlocked: [] as Achievement[],
|
||||
advancement: {
|
||||
colors: [app.color.hex],
|
||||
languages: [locale.value],
|
||||
visitedSettings: [] as string[],
|
||||
},
|
||||
},
|
||||
@@ -50,9 +47,6 @@ export const useAchievementsStore = defineStore("achievements", () => {
|
||||
if (!storage.value.advancement.colors.includes(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();
|
||||
|
||||
@@ -80,7 +74,6 @@ export const useAchievementsStore = defineStore("achievements", () => {
|
||||
unlocked: [],
|
||||
advancement: {
|
||||
colors: [app.color.hex],
|
||||
languages: [locale.value],
|
||||
visitedSettings: [],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
"2048_score_512": "Reach the 512 tile\nin 2048",
|
||||
"taptap_score_20": "Score 20 points\nin TapTap",
|
||||
"settings_color_try_all": "Try all colors",
|
||||
"settings_language_try_all": "Try all languages",
|
||||
"settings_visit_all": "Visit all settings\nsubmenus",
|
||||
"contact_36_notifications": "Trigger 36\nnotifications"
|
||||
},
|
||||
@@ -98,7 +97,8 @@
|
||||
"language": {
|
||||
"title": "Language",
|
||||
"description": "Select the language to use.",
|
||||
"confirmation": "Language set to English."
|
||||
"confirmation": "Language set to English.",
|
||||
"unavailable": "This language is not\navailable yet."
|
||||
},
|
||||
"2048": {
|
||||
"title": "2048",
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
"2048_score_512": "Atteindre la tuile 512\nà 2048",
|
||||
"taptap_score_20": "Marquer 20 points\nà TapTap",
|
||||
"settings_color_try_all": "Essayer toutes les couleurs",
|
||||
"settings_language_try_all": "Essayer toutes les langues",
|
||||
"settings_visit_all": "Visiter tous les\nparamètres",
|
||||
"contact_36_notifications": "Déclencher 36\nnotifications"
|
||||
},
|
||||
@@ -98,7 +97,8 @@
|
||||
"language": {
|
||||
"title": "Langue",
|
||||
"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": {
|
||||
"title": "2048",
|
||||
|
||||
@@ -41,11 +41,7 @@ export default defineNuxtConfig({
|
||||
{ property: "og:url", content: URL },
|
||||
{ property: "og:site_name", content: TITLE },
|
||||
{ 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: "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:title", content: TITLE },
|
||||
{ name: "twitter:description", content: DESCRIPTION },
|
||||
|
||||
Reference in New Issue
Block a user