Track language selection with Plausible Language Changed event.

Centralize UI language switches in cycleAppLanguage and document the event in plausible-events.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-31 16:38:10 +02:00
parent ffe6b19818
commit bd1edd89f3
10 changed files with 99 additions and 15 deletions
@@ -1,6 +1,6 @@
import React, { useState, useEffect, useCallback, useRef } from 'react'
import { useTranslation } from 'react-i18next'
import { getNextLanguage } from '../utils/i18nLanguages.js'
import { cycleAppLanguage, getNextLanguage } from '../utils/i18nLanguages.js'
import { Ship, LogIn, UserPlus, AlertTriangle, ShieldCheck, Languages, ArrowRight, KeyRound } from 'lucide-react'
import {
getActiveMasterKey,
@@ -309,7 +309,7 @@ export default function InvitationAcceptance({ onAccepted, onCancel }: Invitatio
}
const toggleLanguage = () => {
i18n.changeLanguage(getNextLanguage(i18n.language))
cycleAppLanguage(i18n)
}
if (recoveryPhrase) {