Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adjust playground.ts file in zh #200

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 48 additions & 31 deletions docs/typescriptlang/zh/playground.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
export const playCopy = {
play_subnav_title: "演练场",
play_subnav_settings: "设置",
play_settings_tabs_settings: "侧边栏选项",
play_sidebar_plugins: "插件",
play_sidebar_js_title: "JavaScript",
play_sidebar_js_blurb: "展示转译出的 JavaScript",
play_sidebar_dts_title: "定义文件",
play_sidebar_dts_blurb: "展示从您的代码生成的 d.ts 文件",
play_sidebar_err_title: "编译错误",
play_sidebar_err_blurb: "展示您完整的编译错误",
play_sidebar_run_title: "在浏览器中运行 JavaScript",
play_sidebar_run_blurb: "展示在编辑器中的 JavaScript 的运行结果",
play_sidebar_plugins_title: "管理演练场插件",
play_sidebar_plugins_blurb: "向演练场添加/删除第三方插件",
play_sidebar_ast_title: "[开发中] 展示 AST",
play_sidebar_ast_blurb: "检查 TypeScript AST",
play_subnav_config: "配置",
play_config_language_blurb: "编辑器应使用哪种语言",
play_subnav_handbook: "帮助",
play_subnav_examples: "示例",
play_subnav_examples_close: "关闭",
play_subnav_whatsnew: "新闻",
play_subnav_settings: "设置",
play_settings_tabs_settings: "侧边栏选项",
play_downloading_typescript: "正在下载 TypeScript...", // when loading
play_downloading_version: "版本...", // when loading
play_toolbar_run: "运行",
Expand All @@ -37,44 +24,74 @@ export const playCopy = {
play_sidebar_options_disable_ata_copy:
"禁用 require 或 import 的自动类型获取。",
play_sidebar_options_disable_save: "禁用即时保存",
play_sidebar_options_disable_save_copy: "禁用输入时改变 URL",
play_sidebar_plugins_options_external: "外部插件",
play_sidebar_plugins_options_external_warning: "警告: 外部插件来自第三方",
play_sidebar_options_disable_save_copy:
"禁用输入时改变 URL",
play_sidebar_plugins: "插件",
play_sidebar_featured_plugins: "功能插件",
play_sidebar_plugins_options_external:
"外部插件<a href='https://www.npmjs.com/search?q=keywords:playground-plugin'>npm</a>",
play_sidebar_plugins_options_external_warning:
"警告: 外部插件来自第三方",
play_sidebar_plugins_options_modules: "自定义模块",
play_sidebar_plugins_options_modules_placeholder: "npm 上的模块。",
play_sidebar_plugins_plugin_dev: "插件开发",
play_sidebar_plugins_plugin_dev_option:
"访问 <code>localhost:5000/index.js</code>",
"访问 <code>localhost:5000</code>",
play_sidebar_plugins_plugin_dev_copy:
"在开发模式下自动尝试连接到演练场的插件。你可以在<a href='/dev/playground-plugins/' title='链接到演练场插件的相关页面'>这里开始创建一个插件</a>。",
play_export_report_issue: "为 TypeScript 提交 Github issue。",
play_export_tweet_md: "演练场的Tweet链接",
play_export_copy_md: "复制为 Markdown 格式的 issue 模板",
play_export_copy_link: "复制为 Markdown 格式的链接",
play_export_copy_link_preview: "复制为 Markdown 格式可预览的链接",
play_export_tsast: "在 TypeScript AST 查看器中打开",
play_export_bugworkbench: "在 Bug Workbench 中打开",
play_export_vscode_dev_play: "在VSCode中打开TS Playground (alpha)",
play_export_sandbox: "在 CodeSandbox 中打开",
play_export_stackblitz: "在 StackBlitz 中打开",
play_export_clipboard: "复制 URL 到剪贴板",
play_esm_mode: "切换到ESM模式",
play_clear_logs: "清除日志",
play_run_js: "已执行 JavaScript",
play_run_ts: "已执行编译后的 TypeScript",
play_run_js_fail: "执行 JavaScript 失败:",
play_default_code_sample: `// 欢迎来到 TypeScript 演练场,
// 这是一个给你提供编写,分享和学习 TypeScript 的网站。
// 这是一个给你提供编写,分享和学习 TypeScript 的网站。

// 您可以以如下三种方式使用它:
//
// - 一个不会破坏任何东西的学习 TypeScript 的地方。
// - 一个体验 TypeScript 语法并与被人分享的地方。
// - 一个用于测试不同 TypeScript 编译期功能的沙箱。
// 您可以以如下三种方式使用它:
//
// - 一个不会破坏任何东西的学习 TypeScript 的地方。
// - 一个体验 TypeScript 语法并与被人分享的地方。
// - 一个用于测试不同 TypeScript 编译期功能的沙箱。

const anExampleVariable = "Hello World"
console.log(anExampleVariable)
const anExampleVariable = "Hello World"
console.log(anExampleVariable)

// 可以点击上方的 “示例” 或 “新闻”,以了解更多关于语言的信息。"
// 或者删除这些注释并且开始使用,整个演练场的世界都属于你。
`,
// 可以点击上方的 “示例” 或 “新闻”,以了解更多关于语言的信息。"
// 或者删除这些注释并且开始使用,整个演练场的世界都属于你。
`,

play_sidebar_js_title: "JavaScript",
play_sidebar_js_blurb: "展示转译出的 JavaScript",

play_sidebar_dts_title: "定义文件",
play_sidebar_dts_blurb: "展示从您的代码生成的 d.ts 文件",

play_sidebar_err_title: "编译错误",
play_sidebar_err_blurb: "展示您完整的编译错误",

play_sidebar_run_title: "在浏览器中运行 JavaScript",
play_sidebar_run_blurb:
"展示在编辑器中的 JavaScript 的运行结果",

play_sidebar_plugins_title: "管理演练场插件",
play_sidebar_plugins_blurb:
"向演练场添加/删除第三方插件",

play_sidebar_ast_title: "[开发中] 展示 AST",
play_sidebar_ast_blurb: "检查 TypeScript AST",

play_sidebar_tools_filter_placeholder: "过滤",
// Notes:
// Compiler flag information is all from the tsconfig reference info
}