diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5ef4fcd47f..7f2ab135b0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,8 +46,9 @@ The development environment has been installed. Now, you have to create a develo Awesome! You are now able to make bug fixes or enhancements in the framework layer of Strapi. **To make updates in the administration panel, you need to go a little bit further.** 4. Open a new tab or new terminal window. -5. Go to the `/admin` folder of your currently running app. -6. Run `npm start` and go to the following url [http://localhost:4000/admin](http://localhost:4000/admin) +5. Link the `strapi-helper-plugin` into the `analytics` plugin : `cd my-app/plugins/analytics && npm link strapi-helper-plugin`. +6. Go to the `my-app/admin` folder of your currently running app. +7. Run `npm start` and go to the following url [http://localhost:4000/admin](http://localhost:4000/admin) ### Plugin Development Setup diff --git a/docs/3.x.x/en/plugin-development/quick-start.md b/docs/3.x.x/en/plugin-development/quick-start.md index e90f5069cc..92db599c6c 100644 --- a/docs/3.x.x/en/plugin-development/quick-start.md +++ b/docs/3.x.x/en/plugin-development/quick-start.md @@ -24,8 +24,9 @@ Create a development project To generate a new plugin **run the following commands:** 1. In your project folder `cd myDevelopmentProject && strapi generate:plugin my-plugin`. 2. Link the `strapi-helper-plugin` dependency in your project folder `cd pathToMyProject/myDevelopmentProject/plugins/my-plugin && npm link strapi-helper-plugin`. -3. Start the server in the admin folder `cd pathToMyProject/myDevelopmentProject/admin && npm start` and go to the following url [http://localhost:4000/admin](http://localhost:4000/admin). -4. In a new terminal window open at the root of your project launch your Strapi server `strapi start`. +3. Link the `strapi-helper-plugin` dependency in the `analytics` plugin folder `cd pathToMyProject/myDevelopmentProject/plugins/analytics && npm link strapi-helper-plugin`. +4. Start the server in the admin folder `cd pathToMyProject/myDevelopmentProject/admin && npm start` and go to the following url [http://localhost:4000/admin](http://localhost:4000/admin). +5. In a new terminal window open at the root of your project launch your Strapi server `strapi start`. Your are now ready to develop your own plugin and live-test your updates! diff --git a/packages/strapi-admin/admin/src/config/languages.json b/packages/strapi-admin/admin/src/config/languages.json index 5b57bd3832..6d53464a35 100644 --- a/packages/strapi-admin/admin/src/config/languages.json +++ b/packages/strapi-admin/admin/src/config/languages.json @@ -1,3 +1,3 @@ { - "languages": ["en", "fr", "de", "pl", "tr", "zh"] + "languages": ["en", "fr", "de", "pl", "tr", "zh", "zh-Hans"] } diff --git a/packages/strapi-admin/admin/src/translations/zh-Hans.json b/packages/strapi-admin/admin/src/translations/zh-Hans.json new file mode 100644 index 0000000000..e1f62e8935 --- /dev/null +++ b/packages/strapi-admin/admin/src/translations/zh-Hans.json @@ -0,0 +1,162 @@ +{ + "app.components.Button.save": "保存", + "app.components.Button.cancel": "取消", + + "app.components.ComingSoonPage.comingSoon": "即将推出", + "app.components.ComingSoonPage.featuresNotAvailable": "这个功能只在活跃开发中", + + "app.components.DownloadInfo.download": "正在下载...", + "app.components.DownloadInfo.text": "这可能需要几分钟,谢谢你的耐心。", + + "app.components.HomePage.welcome": "欢迎回来", + "app.components.HomePage.welcome.again": "欢迎 ", + "app.components.HomePage.cta": "请确认", + "app.components.HomePage.community": "在网络上找到社区", + "app.components.HomePage.newsLetter": "订阅Strapi简讯", + "app.components.HomePage.community.content": "与团队成员、贡献者和开发人员在不同的渠道进行讨论。", + "app.components.HomePage.create": "创建第一个Content Type", + "app.components.HomePage.welcomeBlock.content": "我们很高兴有你成为社区成员之一。我们一直在寻找反馈,所以可以随时给我们发送消息。 on\u0020", + "app.components.HomePage.welcomeBlock.content.again": "我们希望你在项目上取得进展。请随意阅读关于Strapi的最新消息。我们将尽最大努力根据您的反馈改进产品。", + "app.components.HomePage.welcomeBlock.content.issues": "issues.", + "app.components.HomePage.welcomeBlock.content.raise": "\u0020or raise\u0020", + "app.components.HomePage.createBlock.content.first": "The\u0020", + "app.components.HomePage.createBlock.content.second": "\u0020插件将帮助您定义模型的数据结构。如果你是刚接触Strapi,我们强烈推荐你跟随我们。\u0020", + "app.components.HomePage.createBlock.content.tutorial": "\u0020tutorial.", + "app.components.HomePage.button.quickStart": "快速入门教程", + "app.components.HomePage.button.blog": "在博客上看到更多", + "app.components.HomePage.support": "支持我们", + "app.components.HomePage.support.content": "通过购买T恤来支持我们,它将允许我们继续我们的项目工作,给你最好的体验!", + "app.components.HomePage.support.link": "现在购买T恤", + + "app.components.BlockLink.documentation": "阅读文档", + "app.components.BlockLink.documentation.content": "发现基本概念,参考指南和教程。", + "app.components.BlockLink.code": "代码示例", + "app.components.BlockLink.code.content": "通过测试社区的真实项目来学习。", + + + "app.components.InputFile.newFile": "增加新文件", + "app.components.InputFileDetails.open": "在新选项卡中打开", + "app.components.InputFileDetails.remove": "删除这个文件", + "app.components.InputFileDetails.originalName": "原名称:", + "app.components.InputFileDetails.size": "大小:", + + "app.components.ImgPreview.hint": "将文件拖放到该区域或{browse}以供文件上载", + "app.components.ImgPreview.hint.browse": "浏览", + + "app.components.InstallPluginPage.helmet": "市场-插件", + "app.components.InstallPluginPage.title": "市场-插件", + "app.components.InstallPluginPage.description": "轻松地扩展你的应用程序。", + "app.components.InstallPluginPage.plugin.support-us.description": "通过购买Strapi T恤支持我们。这将使我们能够继续致力于这个项目,并尝试给你最好的体验!", + "app.components.InstallPluginPage.InputSearch.label": " ", + "app.components.InstallPluginPage.InputSearch.placeholder": "搜索插件… (ex: authentication)", + "app.components.InstallPluginPopup.downloads": "下载", + "app.components.InstallPluginPopup.navLink.description": "描述", + "app.components.InstallPluginPopup.navLink.screenshots": "截屏", + "app.components.InstallPluginPopup.navLink.avis": "avis", + "app.components.InstallPluginPopup.navLink.faq": "faq", + "app.components.InstallPluginPopup.navLink.changelog": "更新日志", + "app.components.InstallPluginPopup.noDescription": "没有描述", + + "app.components.LeftMenuFooter.poweredBy": "技术支持", + "app.components.LeftMenuLinkContainer.configuration": "配置", + "app.components.LeftMenuLinkContainer.general": "一般", + "app.components.LeftMenuLinkContainer.installNewPlugin": "市场", + "app.components.LeftMenuLinkContainer.listPlugins": "插件", + "app.components.LeftMenuLinkContainer.noPluginsInstalled": "还没有安装插件", + "app.components.LeftMenuLinkContainer.plugins": "插件", + + "app.components.ListPluginsPage.helmet.title": "插件列表", + "app.components.ListPluginsPage.title": "插件", + "app.components.ListPluginsPage.description": "项目中已安装的插件列表", + "app.components.listPluginsPage.deletePlugin.error": "卸载插件时出错", + "app.components.listPlugins.title.singular": "{number} 个插件已安装", + "app.components.listPlugins.title.plural": "{number} 个插件已安装", + "app.components.listPlugins.title.none": "还没有安装插件", + "app.components.listPlugins.button": "增加新插件", + + "app.components.NotFoundPage.description": "没有找到", + "app.components.NotFoundPage.back": "返回主页", + + "app.components.Official": "官方", + + "app.components.PluginCard.compatible": "与你的应用程序兼容", + "app.components.PluginCard.compatibleCommunity": "与社区兼容", + "app.components.PluginCard.Button.label.download": "下载", + "app.components.PluginCard.Button.label.install": "已下载", + "app.components.PluginCard.Button.label.support": "支持我们", + "app.components.PluginCard.price.free": "免费", + "app.components.PluginCard.more-details": "更多细节", + + "app.utils.placeholder.defaultMessage": "\u0020", + "app.utils.SelectOption.defaultMessage": "\u0020", + "app.utils.defaultMessage": "\u0020", + + "components.AutoReloadBlocker.header": "这个插件需要重新加载特性。", + "components.AutoReloadBlocker.description": "打开下面的文件并启用该特性。", + + "components.ErrorBoundary.title": "哪里出问题了…", + + "components.OverlayBlocker.title": "等待重新启动...", + "components.OverlayBlocker.description": "这个功能成需要服务器重新启动。请等到服务器启动。", + + "components.PageFooter.select": "每页条目", + + "components.ProductionBlocker.header": "这个插件只能在开发中使用。", + "components.ProductionBlocker.description": "为了安全起见,我们必须在其他环境中禁用这个插件。", + + "components.popUpWarning.button.cancel": "取消", + "components.popUpWarning.button.confirm": "确认", + "components.popUpWarning.title": "请确认", + "components.popUpWarning.message": "确实要删除这个吗?", + + "components.Input.error.validation.email": "这不是电子邮件", + "components.Input.error.validation.required": "这个值是必须的", + "components.Input.error.validation.regex": "格式不正确", + "components.Input.error.validation.max": "超过最大值", + "components.Input.error.validation.min": "低于最小值", + "components.Input.error.validation.maxLength": "超过最大长度", + "components.Input.error.validation.minLength": "低于最小长度", + "components.Input.error.contentTypeName.taken": "此名称已经存在", + "components.Input.error.attribute.taken": "此字段名称已经存在", + "components.Input.error.attribute.key.taken": "此值已经存在", + "components.Input.error.attribute.sameKeyAndName": "不能相等", + "components.Input.error.validation.minSupMax": "最小值超过最大值了", + "components.Input.error.custom-error": "{errorMessage} ", + + "components.ListRow.empty": "没有要显示的数据", + + "components.Wysiwyg.collapse": "折叠", + "components.Wysiwyg.selectOptions.title": "增加一个标题", + "components.Wysiwyg.selectOptions.H1": "Title H1", + "components.Wysiwyg.selectOptions.H2": "Title H2", + "components.Wysiwyg.selectOptions.H3": "Title H3", + "components.Wysiwyg.selectOptions.H4": "Title H4", + "components.Wysiwyg.selectOptions.H5": "Title H5", + "components.Wysiwyg.selectOptions.H6": "Title H6", + "components.Wysiwyg.ToggleMode.markdown": "编辑", + "components.Wysiwyg.ToggleMode.preview": "预览", + "components.WysiwygBottomControls.charactersIndicators": "characters", + "components.WysiwygBottomControls.uploadFiles": "拖放文件,从剪贴板粘贴或 {browse}.", + "components.WysiwygBottomControls.uploadFiles.browse": "从文件夹选取", + "components.WysiwygBottomControls.fullscreen": "最大化", + + "HomePage.notification.newsLetter.success": "成功订阅简讯", + + "notification.error": "发生了一个错误", + "notification.error.layout": "无法获取布局", + + "Users & Permissions": "用户 & 权限", + "Content Manager": "内容管理", + "Content Type Builder": "内容类型生成器", + "Settings Manager": "管理设置", + "Email": "邮件", + "Password": "密码", + "Username": "用户名", + "Provider": "供应商", + "ResetPasswordToken": "密码重置", + "Role": "角色", + "New entry": "新入口", + "request.error.model.unknow": "这个模型已不存在", + "Users": "用户", + "Analytics": "分析" +} diff --git a/packages/strapi-generate-plugin/files/admin/src/translations/zh-Hans.json b/packages/strapi-generate-plugin/files/admin/src/translations/zh-Hans.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/strapi-helper-plugin/lib/src/components/InputTextArea/index.js b/packages/strapi-helper-plugin/lib/src/components/InputTextArea/index.js index 8b957d82f8..badc97919d 100644 --- a/packages/strapi-helper-plugin/lib/src/components/InputTextArea/index.js +++ b/packages/strapi-helper-plugin/lib/src/components/InputTextArea/index.js @@ -14,8 +14,10 @@ import cn from 'classnames'; import styles from './styles.scss'; function InputTextArea(props) { + const placeholder = isEmpty(props.placeholder) ? 'app.utils.placeholder.defaultMessage' : props.placeholder; + return ( - + {(message) => (