refactor(stage-*): analytics and telemetry, including consent (#1414)

---------

Co-authored-by-agent: Codex <267193182+codex@users.noreply.github.com>
Co-authored-by-agent: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: RainbowBird <rbxin2003@outlook.com>
Co-authored-by: Neko <neko@ayaka.moe>
This commit is contained in:
Rin
2026-03-24 13:01:39 +08:00
committed by GitHub
co-authored by autofix-ci[bot] RainbowBird Neko
parent 8baaff7778
commit f85a809d7c
37 changed files with 425 additions and 191 deletions
+38
View File
@@ -9,3 +9,41 @@ export const all = {
'zh-Hans': '简体中文',
'zh-Hant': '繁體中文',
}
export const localeRemap: Record<string, string> = {
'zh-CN': 'zh-Hans',
'zh-TW': 'zh-Hant',
'zh-HK': 'zh-Hans',
'zh-Hant': 'zh-Hant',
'zh-Hans': 'zh-Hans',
'en': 'en',
'en-US': 'en',
'en-GB': 'en',
'en-AU': 'en',
'es': 'es',
'es-ES': 'es',
'es-MX': 'es',
'es-AR': 'es',
'fr': 'fr',
'fr-FR': 'fr',
'ja': 'ja',
'ja-JP': 'ja',
'ko': 'ko',
'ko-KR': 'ko',
'ru': 'ru',
'ru-RU': 'ru',
'vi': 'vi',
'vi-VN': 'vi',
}
export function resolveSupportedLocale(
locale: string | null | undefined,
supportedLocales: readonly string[],
fallbackLocale = 'en',
): string {
const normalizedLocale = localeRemap[locale ?? fallbackLocale] ?? locale ?? fallbackLocale
return supportedLocales.includes(normalizedLocale)
? normalizedLocale
: fallbackLocale
}
@@ -59,6 +59,19 @@ controls-island:
auto: Auto (responsive)
large: Large (default)
small: Small
analytics:
notice:
title: Usage analytics
description: AIRI collects anonymous usage analytics to help us understand how the app is used and improve stability. No personal data is collected.
privacyPrefix: Read the
privacyLink: privacy policy
onboardingHint: You can turn analytics off later in Settings > System > General.
settingsHint: You can turn analytics off at any time.
toggle:
title: Enable usage analytics
description: Turn this off to opt out of analytics collection.
disabled:
title: Analytics disabled for this development build
live2d:
change-model:
from-file: Load from File