Skip to content

Commit 5e36183

Browse files
dengzhaofunclaude
andauthored
Add i18n support (en/zh) with Paraglide JS (#12)
Integrate Paraglide JS for compile-time i18n with URL-based locale routing. All ~226 UI strings across 34+ route/component files are translated. Better Auth UI gets Chinese localization via AuthUIProvider's localization prop. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5dd809a commit 5e36183

56 files changed

Lines changed: 1699 additions & 689 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/admin/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ todos.json
1414

1515
# Generated by @tanstack/router-plugin on vite dev/build
1616
src/routeTree.gen.ts
17+
18+
# Generated by @inlang/paraglide-js
19+
src/paraglide/

apps/admin/messages/en.json

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
{
2+
"apikeys_title": "API Keys",
3+
"apikeys_admin_keys": "Admin Keys",
4+
"apikeys_client_credentials": "Client Credentials",
5+
"apikeys_create_admin_key": "Create Admin Key",
6+
"apikeys_create_credential": "Create Credential",
7+
"apikeys_admin_keys_desc": "Server-to-server API keys for admin access. Keep these secret.",
8+
"apikeys_client_credentials_desc": "Client credentials for C-end access with HMAC identity verification.",
9+
"apikeys_no_admin_keys": "No admin keys yet.",
10+
"apikeys_no_credentials": "No client credentials yet.",
11+
"apikeys_expires": "Expires",
12+
"apikeys_publishable_key": "Publishable Key",
13+
"apikeys_dev_mode": "Dev Mode",
14+
"apikeys_delete_admin_key_title": "Delete Admin Key?",
15+
"apikeys_delete_admin_key_desc": "This will permanently delete the key. Any services using it will lose access.",
16+
"apikeys_delete_credential_title": "Delete Credential?",
17+
"apikeys_delete_credential_desc": "This will permanently delete the credential. Any clients using it will lose access.",
18+
"apikeys_credential_created_title": "Client Credential Created",
19+
"apikeys_credential_created_desc": "Copy both keys now. The secret will not be shown again.",
20+
"apikeys_admin_key_created_title": "Admin Key Created",
21+
"apikeys_admin_key_created_desc": "Copy this key now. It will not be shown again.",
22+
"apikeys_failed_to_load_keys": "Failed to load keys:",
23+
"apikeys_failed_to_load_credentials": "Failed to load credentials:",
24+
"checkin_title": "Check-in Configs",
25+
"checkin_new_config": "New Config",
26+
"checkin_new_checkin_config": "New Check-in Config",
27+
"checkin_config_created": "Config created successfully",
28+
"checkin_config_deleted": "Config deleted",
29+
"checkin_config_updated": "Config updated",
30+
"checkin_failed_create_config": "Failed to create config",
31+
"checkin_failed_delete_config": "Failed to delete config",
32+
"checkin_failed_update_config": "Failed to update config",
33+
"checkin_failed_load_configs": "Failed to load configs:",
34+
"checkin_checkin_users": "Check-in Users",
35+
"checkin_reset_mode": "Reset Mode",
36+
"checkin_reset_none": "None (cumulative)",
37+
"checkin_reset_weekly": "Weekly",
38+
"checkin_reset_monthly": "Monthly",
39+
"checkin_week_starts_on": "Week Starts On",
40+
"checkin_sunday": "Sunday",
41+
"checkin_monday": "Monday",
42+
"checkin_tuesday": "Tuesday",
43+
"checkin_wednesday": "Wednesday",
44+
"checkin_thursday": "Thursday",
45+
"checkin_friday": "Friday",
46+
"checkin_saturday": "Saturday",
47+
"checkin_target": "Target",
48+
"checkin_timezone": "Timezone",
49+
"checkin_target_progress": "Target Progress",
50+
"checkin_days": "days",
51+
"checkin_cycle_days": "Cycle Days",
52+
"checkin_total_days": "Total Days",
53+
"checkin_current_streak": "Current Streak",
54+
"checkin_longest_streak": "Longest Streak",
55+
"checkin_already_checked_in": "Already checked in",
56+
"checkin_new_checkin": "New check-in",
57+
"checkin_completed": "Completed",
58+
"checkin_no_target": "No target",
59+
"checkin_remaining": "Remaining",
60+
"checkin_cycle_key": "Cycle Key",
61+
"checkin_full_user_state": "Full User State",
62+
"checkin_last_checkin_date": "Last Check-in Date",
63+
"checkin_last_checkin_at": "Last Check-in At",
64+
"checkin_first_checkin_at": "First Check-in At",
65+
"checkin_config_id": "Config ID",
66+
"checkin_end_user_id": "End User ID",
67+
"checkin_organization_id": "Organization ID",
68+
"checkin_history_count": "History ({count} calls)",
69+
"checkin_duplicate": "duplicate",
70+
"checkin_new": "new",
71+
"checkin_already_checked_in_today": "Already checked in today",
72+
"checkin_checkin_target_completed": "Check-in successful — target completed!",
73+
"checkin_checkin_successful": "Check-in successful!",
74+
"checkin_checkin_failed": "Check-in failed",
75+
"checkin_preview_test": "Preview & Test",
76+
"checkin_test_user": "Test User",
77+
"checkin_test_user_desc": "Using your admin account as the test end-user",
78+
"checkin_user_id": "User ID",
79+
"checkin_email": "Email",
80+
"checkin_check_in": "Check In",
81+
"checkin_checking_in": "Checking in...",
82+
"checkin_latest_result": "Latest Result",
83+
"checkin_clear": "Clear",
84+
"checkin_target_just_completed": "Target just completed!",
85+
"checkin_checkin_config": "Check-in Config",
86+
"checkin_preview_config": "Preview: {name}",
87+
"common_loading": "Loading...",
88+
"common_saving": "Saving...",
89+
"common_error": "Error",
90+
"common_back": "Back",
91+
"common_create": "Create",
92+
"common_edit": "Edit",
93+
"common_delete": "Delete",
94+
"common_cancel": "Cancel",
95+
"common_save_changes": "Save Changes",
96+
"common_done": "Done",
97+
"common_copy": "Copy",
98+
"common_copied": "Copied!",
99+
"common_active": "Active",
100+
"common_inactive": "Inactive",
101+
"common_status": "Status",
102+
"common_created": "Created",
103+
"common_updated": "Updated",
104+
"common_name": "Name",
105+
"common_alias": "Alias",
106+
"common_description": "Description",
107+
"common_actions": "Actions",
108+
"common_unlimited": "Unlimited",
109+
"common_deleting": "Deleting...",
110+
"common_failed_to_load": "Failed to load {resource}: {error}",
111+
"common_no_items_yet": "No {resource} yet.",
112+
"common_revoke": "Revoke",
113+
"common_type": "Type",
114+
"common_icon": "Icon",
115+
"common_sort_order": "Sort Order",
116+
"common_dash": "",
117+
"dashboard_title": "Dashboard",
118+
"dashboard_welcome": "Welcome, {name}",
119+
"dashboard_welcome_default": "Welcome",
120+
"dashboard_signed_in_as": "Signed in as",
121+
"exchange_title": "Exchange Configs",
122+
"exchange_new_config": "New Config",
123+
"exchange_new_exchange_config": "New Exchange Config",
124+
"exchange_config_created": "Exchange config created successfully",
125+
"exchange_config_deleted": "Config deleted",
126+
"exchange_failed_create_config": "Failed to create config",
127+
"exchange_failed_load_configs": "Failed to load configs:",
128+
"exchange_options": "Exchange Options",
129+
"exchange_new_option": "New Option",
130+
"exchange_new_exchange_option": "New Exchange Option",
131+
"exchange_option_created": "Exchange option created successfully",
132+
"exchange_option_deleted": "Option deleted",
133+
"exchange_failed_create_option": "Failed to create option",
134+
"exchange_failed_update_option": "Failed to update option",
135+
"exchange_failed_delete_option": "Failed to delete option",
136+
"exchange_failed_load_definitions": "Failed to load definitions",
137+
"exchange_no_options": "No exchange options yet.",
138+
"exchange_no_configs": "No exchange configurations yet.",
139+
"exchange_costs": "Costs",
140+
"exchange_rewards": "Rewards",
141+
"exchange_cost_items": "Cost Items",
142+
"exchange_reward_items": "Reward Items",
143+
"exchange_usage": "Usage",
144+
"exchange_items_suffix": "item(s)",
145+
"exchange_user_limit": "User Limit",
146+
"exchange_global_limit": "Global Limit",
147+
"exchange_execute_test": "Execute Test",
148+
"exchange_execute": "Execute",
149+
"exchange_executing": "Executing...",
150+
"exchange_exchange_deleted": "Exchange deleted",
151+
"item_items": "Items",
152+
"item_definitions": "Definitions",
153+
"item_categories": "Categories",
154+
"item_new_definition": "New Definition",
155+
"item_new_category": "New Category",
156+
"item_item_tools": "Item Tools",
157+
"item_inventory_lookup": "Inventory Lookup",
158+
"item_grant_deduct": "Grant / Deduct Items",
159+
"item_definition_created": "Item definition created successfully",
160+
"item_definition_deleted": "Definition deleted",
161+
"item_definition_updated": "Definition updated",
162+
"item_category_created": "Category created successfully",
163+
"item_category_deleted": "Category deleted",
164+
"item_category_updated": "Category updated",
165+
"item_failed_create_definition": "Failed to create item definition",
166+
"item_failed_delete_definition": "Failed to delete definition",
167+
"item_failed_create_category": "Failed to create category",
168+
"item_failed_delete_category": "Failed to delete category",
169+
"item_delete_definition_desc": "This will permanently delete this item definition and all inventory data associated with it.",
170+
"item_delete_category_desc": "This will permanently delete this category. Item definitions using this category will become uncategorized.",
171+
"item_unlimited_currency": "Unlimited (currency)",
172+
"item_non_stackable": "Non-stackable",
173+
"item_stackable": "Stackable",
174+
"item_stack_limit": "Stack limit: {limit}",
175+
"item_stack_lte": "Stack ≤ {limit}",
176+
"item_hold_limit": "Hold Limit",
177+
"item_no_categories": "No categories yet.",
178+
"item_failed_load_definitions": "Failed to load definitions:",
179+
"item_failed_load_categories": "Failed to load categories:",
180+
"item_end_user_id": "End User ID",
181+
"item_end_user_id_required": "End User ID is required",
182+
"item_source": "Source",
183+
"item_source_id": "Source ID (optional)",
184+
"item_source_id_placeholder": "Optional idempotency key",
185+
"item_grant": "Grant",
186+
"item_deduct": "Deduct",
187+
"item_grant_items": "Grant Items",
188+
"item_granting": "Granting...",
189+
"item_deduct_items": "Deduct Items",
190+
"item_deducting": "Deducting...",
191+
"item_failed_grant": "Failed to grant items",
192+
"item_failed_deduct": "Failed to deduct items",
193+
"item_add_item": "Add Item",
194+
"item_add_valid_item": "Add at least one item with a valid definition",
195+
"item_qty": "Qty",
196+
"item_look_up": "Look Up",
197+
"item_no_inventory": "No items in inventory.",
198+
"item_quantity": "Quantity",
199+
"item_stacks": "Stacks",
200+
"marketing_hero_title": "Start simple, ship quickly.",
201+
"marketing_hero_description": "This base starter intentionally keeps things light: two routes, clean structure, and the essentials you need to build from scratch.",
202+
"marketing_feature_routing_title": "Type-Safe Routing",
203+
"marketing_feature_routing_desc": "Routes and links stay in sync across every page.",
204+
"marketing_feature_server_title": "Server Functions",
205+
"marketing_feature_server_desc": "Call server code from your UI without creating API boilerplate.",
206+
"marketing_feature_streaming_title": "Streaming by Default",
207+
"marketing_feature_streaming_desc": "Ship progressively rendered responses for faster experiences.",
208+
"marketing_feature_tailwind_title": "Tailwind Native",
209+
"marketing_feature_tailwind_desc": "Design quickly with utility-first styling and reusable tokens.",
210+
"marketing_about_title": "About ApolloKit",
211+
"marketing_about_description": "ApolloKit is a game SaaS platform built with TanStack Start, Hono, and Better Auth.",
212+
"marketing_footer_author": "Your name here",
213+
"marketing_footer_rights": "All rights reserved",
214+
"marketing_footer_built_with": "Built with TanStack Start",
215+
"nav_brand": "ApolloKit",
216+
"nav_sign_in": "Sign In",
217+
"nav_home": "Home",
218+
"nav_dashboard": "Dashboard",
219+
"nav_about": "About",
220+
"nav_navigation": "Navigation",
221+
"nav_admin": "Admin",
222+
"nav_checkin": "Check-in",
223+
"nav_item": "Item",
224+
"nav_exchange": "Exchange",
225+
"nav_api_keys": "API Keys",
226+
"nav_go_to_dashboard": "Go to Dashboard",
227+
"nav_about_starter": "About This Starter"
228+
}

0 commit comments

Comments
 (0)