# ling-space/i18n/tab_code.py ui_translations = { # Tab Name (used in app.py) "code_tab_title": { "en": "Code Generation", "zh": "代码生成" }, # Components "code_prompt_label": { "en": "Prompt", "zh": "提示词" }, "code_prompt_placeholder": { "en": "e.g., create a simple page with a title and a button", "zh": "例如:创建一个带标题和按钮的简单页面" }, "code_overall_style_label": { "en": "Overall Style", "zh": "整体风格" }, "code_overall_style_placeholder": { "en": "e.g., like a parchment book", "zh": "例如:类似一本羊皮纸的书" }, "code_decoration_style_label": { "en": "Decoration Style", "zh": "装饰风格" }, "code_decoration_style_placeholder": { "en": "e.g., thick borders, no rounded corners", "zh": "例如:粗边框,无圆角" }, "code_palette_label": { "en": "Style Palette", "zh": "风格色板" }, "code_palette_placeholder": { "en": "(Displays after generating style)", "zh": "(生成风格后展示)" }, "code_generate_style_button": { "en": "🎲 Generate Random Style", "zh": "🎲 随机生成风格" }, "code_examples_title": { "en": "### Examples", "zh": "### 示例" }, "code_examples_dataset_label": { "en": "Examples", "zh": "示例" }, "code_examples_dataset_header": { "en": "Select an example", "zh": "选择一个示例" }, "code_generate_code_button": { "en": "Generate Code", "zh": "生成代码" }, "code_preview_tab_title": { "en": "Live Preview", "zh": "实时预览" }, "code_preview_header": { "en": "### Live Preview", "zh": "### 实时预览" }, "code_fullscreen_button": { "en": "Fullscreen", "zh": "全屏预览" }, "code_exit_fullscreen_button": { "en": "Exit Fullscreen", "zh": "退出全屏" }, "code_preview_placeholder": { "en": "

Preview will be displayed here.

", "zh": "

预览将在此处显示。

" }, "code_source_code_tab_title": { "en": "Generated Source Code", "zh": "生成的源代码" }, "code_source_code_header": { "en": "### Generated Source Code", "zh": "### 生成的源代码" }, "code_source_code_label": { "en": "Generated Code", "zh": "生成的代码" }, "code_refresh_preview_button": { "en": "Refresh Preview", "zh": "刷新预览" }, "code_log_chatbot_label": { "en": "Generation Log", "zh": "生成日志" }, "code_debug_channel_label": { "en": "Debug Error Channel", "zh": "Debug Error Channel" }, # Logic-related text "code_log_no_code_warning": { "en": "⚠️ **Warning**: No code available to refresh.", "zh": "⚠️ **警告**: 没有代码可供刷新。" }, "code_log_refreshed_state": { "en": "🔄 **Status**: Preview has been manually refreshed.", "zh": "🔄 **状态**: 预览已手动刷新。" }, "code_log_runtime_error": { "en": "🚨 **A runtime exception was detected in the preview!**\n```\n{error_text}\n```", "zh": "🚨 **在预览中发现运行时异常!**\n```\n{error_text}\n```" } } prompt_fragments = {}