Freeze experimental social/admin UX on test12 for reference only; see docs/archive/test12-NEVER-DEPLOY.md. Co-authored-by: Cursor <cursoragent@cursor.com>
281 lines
9.9 KiB
TypeScript
281 lines
9.9 KiB
TypeScript
/** Social (/social) UI copy — baseline zh / en. Other locales fall back to en. */
|
||
export type SocialLocale = "zh" | "en";
|
||
|
||
export type SocialNavItem = { href: string; label: string };
|
||
export type SocialNavGroup = { id: string; label: string; items: SocialNavItem[] };
|
||
export type SocialDockItem = {
|
||
href: string;
|
||
label: string;
|
||
short: string;
|
||
};
|
||
export type SocialRailItem = { href: string; label: string; emoji: string };
|
||
|
||
export type SocialLandingStrings = {
|
||
socialEyebrow: string;
|
||
socialHeroLine1: string;
|
||
socialHeroAccent: string;
|
||
socialHeroLead: string;
|
||
socialJoinCta: string;
|
||
socialInviteTitle: string;
|
||
socialInviteLead: string;
|
||
socialOnlineTitle: string;
|
||
socialOfflineTitle: string;
|
||
socialTeamTitle: string;
|
||
socialWayGroup: string;
|
||
socialWayChat: string;
|
||
socialWayDate: string;
|
||
socialWayCafe: string;
|
||
socialWayTeam: string;
|
||
socialPayJoinLabel: string;
|
||
socialOaJoinLabel: string;
|
||
};
|
||
|
||
export type SocialDictionary = {
|
||
brand: string;
|
||
brandTagline: string;
|
||
languageLabel: string;
|
||
joinCommunity: string;
|
||
portal: string;
|
||
chatRoom: string;
|
||
menu: string;
|
||
skipToMain: string;
|
||
themeLight: string;
|
||
themeDark: string;
|
||
navAria: string;
|
||
dockAria: string;
|
||
railAria: string;
|
||
footerTagline: string;
|
||
watchStory: string;
|
||
proofTitle: string;
|
||
proofLead: string;
|
||
navGroups: SocialNavGroup[];
|
||
dock: SocialDockItem[];
|
||
rail: SocialRailItem[];
|
||
homePath: { href: string; label: string; emoji: string; external?: boolean }[];
|
||
landing: SocialLandingStrings;
|
||
};
|
||
|
||
const zh: SocialDictionary = {
|
||
brand: "游民社区",
|
||
brandTagline: "认识同频的人",
|
||
languageLabel: "语言",
|
||
joinCommunity: "加入社区",
|
||
portal: "门户",
|
||
chatRoom: "聊天室",
|
||
menu: "菜单",
|
||
skipToMain: "跳到主要内容",
|
||
themeLight: "切换日间模式",
|
||
themeDark: "切换夜间模式",
|
||
navAria: "游民社区",
|
||
dockAria: "快捷导航",
|
||
railAria: "社区快捷入口",
|
||
footerTagline: "游民社区 · 认识同频的人",
|
||
watchStory: "看看社区故事",
|
||
proofTitle: "同频的人,正在这里相遇",
|
||
proofLead: "自由职业 · 远程工作 · 出来见一面",
|
||
navGroups: [
|
||
{
|
||
id: "online",
|
||
label: "认识人",
|
||
items: [
|
||
{ href: "/chat", label: "聊天群" },
|
||
{ href: "/people", label: "想见的人" },
|
||
{ href: "/date", label: "约会" },
|
||
{ href: "/meetup", label: "语音厅" },
|
||
],
|
||
},
|
||
{
|
||
id: "offline",
|
||
label: "见一面",
|
||
items: [
|
||
{ href: "/coffeechat", label: "线下咖啡聊" },
|
||
{ href: "/map", label: "地图" },
|
||
{ href: "/places", label: "城市" },
|
||
],
|
||
},
|
||
{
|
||
id: "together",
|
||
label: "一起做事",
|
||
items: [
|
||
{ href: "/team", label: "找搭子" },
|
||
{ href: "/skills", label: "技能交换" },
|
||
{ href: "/ebook", label: "共创" },
|
||
{ href: "/videos", label: "社区影像" },
|
||
{ href: "/work", label: "远程工作" },
|
||
{ href: "/feedback", label: "说说想法" },
|
||
],
|
||
},
|
||
],
|
||
dock: [
|
||
{ href: "/", label: "首页", short: "首页" },
|
||
{ href: "/map", label: "地图", short: "地图" },
|
||
{ href: "/chat", label: "聊天群", short: "聊天" },
|
||
{ href: "/people", label: "想见的人", short: "看看谁" },
|
||
],
|
||
rail: [
|
||
{ href: "/people", label: "想见的人", emoji: "👋" },
|
||
{ href: "/map", label: "地图", emoji: "🗺️" },
|
||
{ href: "/places", label: "城市", emoji: "📍" },
|
||
{ href: "/coffeechat", label: "线下咖啡聊", emoji: "☕" },
|
||
{ href: "/skills", label: "技能交换", emoji: "🔄" },
|
||
{ href: "/date", label: "约会", emoji: "💕" },
|
||
{ href: "/meetup", label: "语音厅", emoji: "📡" },
|
||
{ href: "/chat", label: "聊天群", emoji: "💬" },
|
||
{ href: "/team", label: "找搭子", emoji: "🚀" },
|
||
{ href: "/work", label: "远程工作", emoji: "🗂️" },
|
||
{ href: "/ebook", label: "共创", emoji: "🎨" },
|
||
{ href: "/wrapped", label: "年度回顾", emoji: "✨" },
|
||
{ href: "/join", label: "加入社区", emoji: "✨" },
|
||
],
|
||
homePath: [
|
||
{ href: "#people", label: "想见的人", emoji: "👋" },
|
||
{ href: "#date", label: "约会", emoji: "💕" },
|
||
{ href: "/coffeechat", label: "线下咖啡", emoji: "☕", external: true },
|
||
{ href: "/skills", label: "技能交换", emoji: "🔄", external: true },
|
||
{ href: "#cities", label: "城市", emoji: "📍" },
|
||
{ href: "/map", label: "地图", emoji: "🗺️", external: true },
|
||
{ href: "#team", label: "一起做事", emoji: "🚀" },
|
||
{ href: "/wrapped", label: "年度回顾", emoji: "✨", external: true },
|
||
],
|
||
landing: {
|
||
socialEyebrow: "自由生活,同频相遇",
|
||
socialHeroLine1: "世界很大,",
|
||
socialHeroAccent: "同类",
|
||
socialHeroLead:
|
||
"换一座城市,不必重新孤独。\n从一句你好、一杯咖啡开始,找到一起生活、\n一起探索、一起做点什么的人。",
|
||
socialJoinCta: "加入社区",
|
||
socialInviteTitle: "下一站,和同类一起。",
|
||
socialInviteLead:
|
||
"无论你正在出发,还是已经在路上,这里都有一个属于你的位置。",
|
||
socialOnlineTitle: "随时,聊得来",
|
||
socialOfflineTitle: "同城,见一面",
|
||
socialTeamTitle: "一起,做点事",
|
||
socialWayGroup: "聊天群",
|
||
socialWayChat: "语音厅",
|
||
socialWayDate: "约会",
|
||
socialWayCafe: "找个地方见面",
|
||
socialWayTeam: "找搭子 · 共创",
|
||
socialPayJoinLabel: "加入社区",
|
||
socialOaJoinLabel: "先看看公众号",
|
||
},
|
||
};
|
||
|
||
const en: SocialDictionary = {
|
||
brand: "Nomad Social",
|
||
brandTagline: "Meet people on your wavelength",
|
||
languageLabel: "Language",
|
||
joinCommunity: "Join community",
|
||
portal: "Portal",
|
||
chatRoom: "Chat",
|
||
menu: "Menu",
|
||
skipToMain: "Skip to main content",
|
||
themeLight: "Switch to light mode",
|
||
themeDark: "Switch to dark mode",
|
||
navAria: "Nomad Social",
|
||
dockAria: "Quick navigation",
|
||
railAria: "Community shortcuts",
|
||
footerTagline: "Nomad Social · Meet people on your wavelength",
|
||
watchStory: "Watch community story",
|
||
proofTitle: "People on your wavelength are meeting here",
|
||
proofLead: "Freelance · remote work · meet in person",
|
||
navGroups: [
|
||
{
|
||
id: "online",
|
||
label: "Meet people",
|
||
items: [
|
||
{ href: "/chat", label: "Chat rooms" },
|
||
{ href: "/people", label: "People" },
|
||
{ href: "/date", label: "Dating" },
|
||
{ href: "/meetup", label: "Voice lounge" },
|
||
],
|
||
},
|
||
{
|
||
id: "offline",
|
||
label: "Meet offline",
|
||
items: [
|
||
{ href: "/coffeechat", label: "Offline coffee" },
|
||
{ href: "/map", label: "Map" },
|
||
{ href: "/places", label: "Cities" },
|
||
],
|
||
},
|
||
{
|
||
id: "together",
|
||
label: "Build together",
|
||
items: [
|
||
{ href: "/team", label: "Find buddies" },
|
||
{ href: "/skills", label: "Skill exchange" },
|
||
{ href: "/ebook", label: "Co-create" },
|
||
{ href: "/videos", label: "Community films" },
|
||
{ href: "/work", label: "Remote work" },
|
||
{ href: "/feedback", label: "Feedback" },
|
||
],
|
||
},
|
||
],
|
||
dock: [
|
||
{ href: "/", label: "Home", short: "Home" },
|
||
{ href: "/map", label: "Map", short: "Map" },
|
||
{ href: "/chat", label: "Chat rooms", short: "Chat" },
|
||
{ href: "/people", label: "People", short: "Who" },
|
||
],
|
||
rail: [
|
||
{ href: "/people", label: "People", emoji: "👋" },
|
||
{ href: "/map", label: "Map", emoji: "🗺️" },
|
||
{ href: "/places", label: "Cities", emoji: "📍" },
|
||
{ href: "/coffeechat", label: "Offline coffee", emoji: "☕" },
|
||
{ href: "/skills", label: "Skill swap", emoji: "🔄" },
|
||
{ href: "/date", label: "Dating", emoji: "💕" },
|
||
{ href: "/meetup", label: "Voice lounge", emoji: "📡" },
|
||
{ href: "/chat", label: "Chat rooms", emoji: "💬" },
|
||
{ href: "/team", label: "Find buddies", emoji: "🚀" },
|
||
{ href: "/work", label: "Remote work", emoji: "🗂️" },
|
||
{ href: "/ebook", label: "Co-create", emoji: "🎨" },
|
||
{ href: "/wrapped", label: "Year wrapped", emoji: "✨" },
|
||
{ href: "/join", label: "Join", emoji: "✨" },
|
||
],
|
||
homePath: [
|
||
{ href: "#people", label: "People", emoji: "👋" },
|
||
{ href: "#date", label: "Dating", emoji: "💕" },
|
||
{ href: "/coffeechat", label: "Coffee chat", emoji: "☕", external: true },
|
||
{ href: "/skills", label: "Skill swap", emoji: "🔄", external: true },
|
||
{ href: "#cities", label: "Cities", emoji: "📍" },
|
||
{ href: "/map", label: "Map", emoji: "🗺️", external: true },
|
||
{ href: "#team", label: "Collaborate", emoji: "🚀" },
|
||
{ href: "/wrapped", label: "Year wrapped", emoji: "✨", external: true },
|
||
],
|
||
landing: {
|
||
socialEyebrow: "Free living · same wavelength",
|
||
socialHeroLine1: "The world is big —",
|
||
socialHeroAccent: "find your people",
|
||
socialHeroLead:
|
||
"Change cities without starting over alone.\nFrom a hello and a coffee, find people to live,\nexplore, and build with.",
|
||
socialJoinCta: "Join community",
|
||
socialInviteTitle: "Next stop — with people like you.",
|
||
socialInviteLead:
|
||
"Whether you are about to leave or already on the road, there is a place for you here.",
|
||
socialOnlineTitle: "Anytime · good conversations",
|
||
socialOfflineTitle: "Same city · meet in person",
|
||
socialTeamTitle: "Together · make something",
|
||
socialWayGroup: "Chat rooms",
|
||
socialWayChat: "Voice lounge",
|
||
socialWayDate: "Dating",
|
||
socialWayCafe: "Find a place to meet",
|
||
socialWayTeam: "Find buddies · co-create",
|
||
socialPayJoinLabel: "Join community",
|
||
socialOaJoinLabel: "Follow our WeChat OA",
|
||
},
|
||
};
|
||
|
||
export const socialDictionaries: Record<SocialLocale, SocialDictionary> = {
|
||
zh,
|
||
en,
|
||
};
|
||
|
||
/** Map portal locales to social baseline (zh / en). */
|
||
export function toSocialLocale(locale: string | undefined | null): SocialLocale {
|
||
return locale === "zh" ? "zh" : "en";
|
||
}
|
||
|
||
export function getSocialDictionary(locale: string | undefined | null): SocialDictionary {
|
||
return socialDictionaries[toSocialLocale(locale)];
|
||
}
|