feat(i18n): extract strings from navigation, dialogs, onboarding, settings, and login
- Add useTranslation() to TopNav, BottomTabBar, FabMenu, UserMenu - Internationalize ConfirmDialog, AuthPromptModal, ExternalLinkDialog - Extract all onboarding flow strings (Welcome, HobbyPicker, ItemBrowser, Review, Done) - Internationalize settings page (weight unit, currency, API keys, import/export) - Internationalize login page and root error boundary - All dialogs in __root.tsx use t() for UI chrome Phase 34, Plan 02 (core navigation and global UI)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import { Package, Plus, Search } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useUIStore } from "../stores/uiStore";
|
||||
|
||||
interface FabMenuProps {
|
||||
@@ -15,6 +16,7 @@ interface MenuItem {
|
||||
}
|
||||
|
||||
export function FabMenu({ isSetupsPage }: FabMenuProps) {
|
||||
const { t } = useTranslation();
|
||||
const fabMenuOpen = useUIStore((s) => s.fabMenuOpen);
|
||||
const openFabMenu = useUIStore((s) => s.openFabMenu);
|
||||
const closeFabMenu = useUIStore((s) => s.closeFabMenu);
|
||||
@@ -26,12 +28,12 @@ export function FabMenu({ isSetupsPage }: FabMenuProps) {
|
||||
|
||||
const menuItems: MenuItem[] = [
|
||||
{
|
||||
label: "Add to Collection",
|
||||
label: t("fab.addToCollection"),
|
||||
icon: <Package className="w-5 h-5 text-gray-600" />,
|
||||
onClick: () => openCatalogSearch("collection"),
|
||||
},
|
||||
{
|
||||
label: "Start New Thread",
|
||||
label: t("fab.startNewThread"),
|
||||
icon: <Search className="w-5 h-5 text-gray-600" />,
|
||||
onClick: () => openCatalogSearch("thread"),
|
||||
},
|
||||
@@ -39,7 +41,7 @@ export function FabMenu({ isSetupsPage }: FabMenuProps) {
|
||||
|
||||
if (isSetupsPage) {
|
||||
menuItems.push({
|
||||
label: "New Setup",
|
||||
label: t("fab.newSetup"),
|
||||
icon: <Plus className="w-5 h-5 text-gray-600" />,
|
||||
onClick: () => {
|
||||
closeFabMenu();
|
||||
|
||||
Reference in New Issue
Block a user