diff --git a/packages/core/admin/admin/src/components/LeftMenu/index.js b/packages/core/admin/admin/src/components/LeftMenu/index.js index 1071cdd160..79c21683af 100644 --- a/packages/core/admin/admin/src/components/LeftMenu/index.js +++ b/packages/core/admin/admin/src/components/LeftMenu/index.js @@ -115,7 +115,12 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => { {pluginsSectionLinks.length > 0 ? ( - + {pluginsSectionLinks.map(link => { const Icon = link.icon; @@ -129,7 +134,12 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => { ) : null} {generalSectionLinks.length > 0 ? ( - + {generalSectionLinks.map(link => { const LinkIcon = link.icon; diff --git a/packages/core/admin/admin/src/content-manager/pages/ListView/FieldPicker/index.js b/packages/core/admin/admin/src/content-manager/pages/ListView/FieldPicker/index.js index 70c05f8db3..414d50238c 100644 --- a/packages/core/admin/admin/src/content-manager/pages/ListView/FieldPicker/index.js +++ b/packages/core/admin/admin/src/content-manager/pages/ListView/FieldPicker/index.js @@ -8,6 +8,7 @@ import { useTracking } from '@strapi/helper-plugin'; import { onChangeListHeaders } from '../actions'; import { selectDisplayedHeaders } from '../selectors'; import getAllAllowedHeaders from './utils/getAllAllowedHeader'; +import getTrad from '../../../utils/getTrad'; const FieldPicker = ({ layout }) => { const dispatch = useDispatch(); @@ -50,7 +51,14 @@ const FieldPicker = ({ layout }) => { aria-label="change displayed fields" value={values} onChange={handleChange} - customizeContent={values => `${values.length} currently selected`} + customizeContent={values => + formatMessage( + { + id: getTrad('select.currently.selected'), + defaultMessage: '{count} currently selected', + }, + { count: values.length } + )} multi size="S" > diff --git a/packages/core/admin/admin/src/pages/InstalledPluginsPage/Plugins.js b/packages/core/admin/admin/src/pages/InstalledPluginsPage/Plugins.js index 06db5e4a5c..ec8898d168 100644 --- a/packages/core/admin/admin/src/pages/InstalledPluginsPage/Plugins.js +++ b/packages/core/admin/admin/src/pages/InstalledPluginsPage/Plugins.js @@ -82,11 +82,19 @@ const Plugins = () => { - {displayName} + {formatMessage({ + id: `global.plugins.${name}`, + defaultMessage: displayName, + })} - {description} + + {formatMessage({ + id: `global.plugins.${name}.description`, + defaultMessage: description, + })} + ); diff --git a/packages/core/admin/admin/src/pages/ProfilePage/index.js b/packages/core/admin/admin/src/pages/ProfilePage/index.js index 8805e1899c..6ab7b08f36 100644 --- a/packages/core/admin/admin/src/pages/ProfilePage/index.js +++ b/packages/core/admin/admin/src/pages/ProfilePage/index.js @@ -531,24 +531,23 @@ const ProfilePage = () => { }); }} > - {themesToDisplay.map(theme => { - const label = formatMessage( - { - id: - 'Settings.profile.form.section.experience.mode.option-label', - defaultMessage: '{name} mode', - }, - { - name: upperFirst(theme), - } - ); - - return ( - - ); - })} + {themesToDisplay.map(theme => ( + + ))} diff --git a/packages/core/admin/admin/src/translations/en.json b/packages/core/admin/admin/src/translations/en.json index 696af5c8fb..6ebcf8832b 100644 --- a/packages/core/admin/admin/src/translations/en.json +++ b/packages/core/admin/admin/src/translations/en.json @@ -157,6 +157,8 @@ "Settings.profile.form.section.experience.mode.label": "Interface mode", "Settings.profile.form.section.experience.mode.hint": "Displays your interface in the chosen mode.", "Settings.profile.form.section.experience.mode.option-label": "{name} mode", + "light": "Light", + "dark": "Dark", "Settings.profile.form.section.experience.title": "Experience", "Settings.profile.form.section.helmet.title": "User profile", "Settings.profile.form.section.profile.page.title": "Profile page", @@ -320,8 +322,10 @@ "app.components.InstallPluginPage.description": "Extend your app effortlessly.", "app.components.LeftMenu.collapse": "Collapse the navbar", "app.components.LeftMenu.expand": "Expand the navbar", + "app.components.LeftMenu.general": "General", "app.components.LeftMenu.logout": "Logout", "app.components.LeftMenu.logo.alt": "Application logo", + "app.components.LeftMenu.plugins": "Plugins", "app.components.LeftMenu.navbrand.title": "Strapi Dashboard", "app.components.LeftMenu.navbrand.workplace": "Workplace", "app.components.LeftMenuFooter.help": "Help", @@ -671,6 +675,7 @@ "content-manager.popUpwarning.warning.has-draft-relations.button-confirm": "Yes, publish", "content-manager.popUpwarning.warning.has-draft-relations.message": "{count, plural, =0 { of your content relations is} one { of your content relations is} other { of your content relations are}} not published yet.

It might engender broken links and errors on your project.", "content-manager.popover.display-relations.label": "Display relations", + "content-manager.select.currently.selected": "{count} currently selected", "content-manager.success.record.delete": "Deleted", "content-manager.success.record.publish": "Published", "content-manager.success.record.save": "Saved", @@ -682,6 +687,7 @@ "global.search": "Search", "global.actions": "Actions", "global.back": "Back", + "global.cancel": "Cancel", "global.change-password": "Change password", "global.content-manager": "Content Manager", "global.continue": "Continue", @@ -698,6 +704,24 @@ "global.none": "None", "global.password": "Password", "global.plugins": "Plugins", + "global.plugins.content-manager": "Content Manager", + "global.plugins.content-manager.description": "Quick way to see, edit and delete the data in your database.", + "global.plugins.content-type-builder": "Content Type Builder", + "global.plugins.content-type-builder.description": "Modelize the data structure of your API. Create new fields and relations in just a minute. The files are automatically created and updated in your project.", + "global.plugins.email": "Email", + "global.plugins.email.description": "Configure your application to send emails.", + "global.plugins.upload": "Media Library", + "global.plugins.upload.description": "Media file management.", + "global.plugins.graphql": "GraphQL", + "global.plugins.graphql.description": "Adds GraphQL endpoint with default API methods.", + "global.plugins.documentation": "Documentation", + "global.plugins.documentation.description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.", + "global.plugins.i18n": "Internationalization", + "global.plugins.i18n.description": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API.", + "global.plugins.sentry": "Sentry", + "global.plugins.sentry.description": "Send Strapi error events to Sentry.", + "global.plugins.users-permissions": "Roles & Permissions", + "global.plugins.users-permissions.description": "Protect your API with a full authentication process based on JWT. This plugin comes also with an ACL strategy that allows you to manage the permissions between the groups of users.", "global.profile": "Profile", "global.prompt.unsaved": "Are you sure you want to leave this page? All your modifications will be lost", "global.reset-password": "Reset password", diff --git a/packages/core/admin/admin/src/translations/zh-Hans.json b/packages/core/admin/admin/src/translations/zh-Hans.json index 88a6e7d27a..70c8c3a88c 100644 --- a/packages/core/admin/admin/src/translations/zh-Hans.json +++ b/packages/core/admin/admin/src/translations/zh-Hans.json @@ -126,7 +126,12 @@ "Settings.profile.form.section.experience.documentation": "文档", "Settings.profile.form.section.experience.interfaceLanguage": "界面语言", "Settings.profile.form.section.experience.interfaceLanguage.hint": "将会用所选择的语言显示你的界面", - "Settings.profile.form.section.experience.interfaceLanguageHelp": "当前的语言选择只会更改你当前帐号界面语言。 请参考此 {documentation} 为你的团队提供其他语言。", + "Settings.profile.form.section.experience.interfaceLanguageHelp": "当前的语言选择只会更改你当前帐号界面语言。 请参考此 {here} 为你的团队提供其他语言。", + "Settings.profile.form.section.experience.mode.label": "界面风格", + "Settings.profile.form.section.experience.mode.hint": "将会用所选择的风格显示你的界面", + "Settings.profile.form.section.experience.mode.option-label": "{name}界面", + "light": "浅色", + "dark": "深色", "Settings.profile.form.section.experience.title": "体验", "Settings.profile.form.section.helmet.title": "用户个人信息", "Settings.profile.form.section.profile.page.title": "个人信息页面", @@ -196,7 +201,7 @@ "anErrorOccurred": "唉呀! 出错了。请再试一次。", "app.component.CopyToClipboard.label": "复制到剪贴板", "app.component.search.label": "搜索 {target}", - "app.component.table.duplicate": "创建副本 {target}", + "app.component.table.duplicate": "创建 {target} 的副本", "app.component.table.edit": "编辑 {target}", "app.component.table.select.one-entry": "选择 {target}", "app.components.BlockLink.blog": "博客", @@ -239,7 +244,9 @@ "app.components.InstallPluginPage.description": "轻松地扩展你的应用程序。", "app.components.LeftMenu.collapse": "收起导航栏", "app.components.LeftMenu.expand": "展开导航栏", + "app.components.LeftMenu.general": "通用", "app.components.LeftMenu.logout": "退出", + "app.components.LeftMenu.plugins": "插件", "app.components.LeftMenu.navbrand.title": "Strapi 仪表盘", "app.components.LeftMenu.navbrand.workplace": "工作空间", "app.components.LeftMenuFooter.help": "帮助", @@ -412,7 +419,7 @@ "content-manager.components.DraggableCard.delete.field": "删除 {item}", "content-manager.components.DraggableCard.edit.field": "编辑 {item}", "content-manager.components.DraggableCard.move.field": "移动 {item}", - "content-manager.components.DynamicTable.row-line": "项 行 {number}", + "content-manager.components.DynamicTable.row-line": "第 {number} 条记录", "content-manager.components.DynamicZone.ComponentPicker-label": "选择一个组件", "content-manager.components.DynamicZone.add-component": "添加组件 {componentName}", "content-manager.components.DynamicZone.delete-label": "删除 {name}", @@ -588,6 +595,7 @@ "content-manager.popUpwarning.warning.has-draft-relations.button-confirm": "是, 发布", "content-manager.popUpwarning.warning.has-draft-relations.message": "{count, plural, =0 { 个关联的内容} one { 个关联的内容} other { 个关联的内容}} 尚未发布。

它可能会在你的项目上产生关联失效和错误。", "content-manager.popover.display-relations.label": "显示关联", + "content-manager.select.currently.selected": "已选中 {count} 项", "content-manager.success.record.delete": "已删除", "content-manager.success.record.publish": "已发布", "content-manager.success.record.save": "已保存", @@ -606,16 +614,43 @@ "form.button.done": "完成", "global.search": "搜索", "global.back": "返回", + "global.cancel": "取消", + "global.change-password": "修改密码", "global.content-manager": "内容管理", + "global.delete": "删除", "global.delete-target": "删除 {target}", + "global.description": "描述", + "global.details": "详情", "global.documentation": "文档", + "global.finish": "完成", "global.marketplace": "市场", "global.name": "名称", + "global.password": "密码", "global.plugins": "插件", + "global.plugins.content-manager": "内容管理", + "global.plugins.content-manager.description": "在你的数据库里,快速的查看、编辑和删除数据。", + "global.plugins.content-type-builder": "模型构建器", + "global.plugins.content-type-builder.description": "对你的 API 数据结构进行建模。在短短的一分钟内创建新的字段和关系。这些文件会在你的项目中自动创建和更新。", + "global.plugins.email": "电子邮件", + "global.plugins.email.description": "配置你的应用程序来发送电子邮件。", + "global.plugins.upload": "媒体库", + "global.plugins.upload.description": "媒体文件管理。", + "global.plugins.graphql": "GraphQL", + "global.plugins.graphql.description": "添加具有默认 API 方法的 GraphQL 端点", + "global.plugins.documentation": "文档", + "global.plugins.documentation.description": "创建一个 OpenAPI 文档,用 SWAGGER UI 来可视化你的 API。", + "global.plugins.i18n": "国际化", + "global.plugins.i18n.description": "这个插件可以从管理面板和 API 中创建、阅读和更新不同语言的内容。", + "global.plugins.sentry": "Sentry", + "global.plugins.sentry.description": "将 Strapi 错误事件发送给 Sentry。", + "global.plugins.users-permissions": "角色和权限", + "global.plugins.users-permissions.description": "用一个基于 JWT 的完整认证过程来保护你的 API。这个插件还带有一个 ACL 策略,允许你管理用户组之间的权限。", "global.profile": "个人资料", "global.prompt.unsaved": "您确定要离开这个页面吗?您所有的未保存的修改都将丢失", + "global.roles": "角色列表", "global.save": "保存", "global.settings": "设置", + "global.users": "用户列表", "global.type": "类型", "notification.contentType.relations.conflict": "内容类型有关联冲突", "notification.default.title": "通知:", diff --git a/packages/core/email/admin/src/pages/Settings/components/Configuration.js b/packages/core/email/admin/src/pages/Settings/components/Configuration.js index 612fcfcbd0..fc04e44302 100644 --- a/packages/core/email/admin/src/pages/Settings/components/Configuration.js +++ b/packages/core/email/admin/src/pages/Settings/components/Configuration.js @@ -42,7 +42,10 @@ const Configuration = ({ config }) => { target="_blank" rel="noopener noreferrer" > - link + {formatMessage({ + id: getTrad('link'), + defaultMessage: 'Link', + })} ), } diff --git a/packages/core/email/admin/src/pages/Settings/tests/index.test.js b/packages/core/email/admin/src/pages/Settings/tests/index.test.js index cae22be672..df3eac62d1 100644 --- a/packages/core/email/admin/src/pages/Settings/tests/index.test.js +++ b/packages/core/email/admin/src/pages/Settings/tests/index.test.js @@ -770,7 +770,7 @@ describe('Email | Pages | Settings', () => { rel="noopener noreferrer" target="_blank" > - link + Link for the documentation. diff --git a/packages/core/email/admin/src/translations/en.json b/packages/core/email/admin/src/translations/en.json index f54bc4ecf2..c490a9ef8d 100644 --- a/packages/core/email/admin/src/translations/en.json +++ b/packages/core/email/admin/src/translations/en.json @@ -1,4 +1,5 @@ { + "link": "Link", "Settings.email.plugin.button.test-email": "Send test email", "Settings.email.plugin.label.defaultFrom": "Default sender email", "Settings.email.plugin.label.defaultReplyTo": "Default response email", diff --git a/packages/core/email/admin/src/translations/zh-Hans.json b/packages/core/email/admin/src/translations/zh-Hans.json index 95a677f91e..6a7093dd96 100644 --- a/packages/core/email/admin/src/translations/zh-Hans.json +++ b/packages/core/email/admin/src/translations/zh-Hans.json @@ -1,4 +1,15 @@ { + "link": "链接", + "Settings.email.plugin.button.test-email": "发送测试邮件", + "Settings.email.plugin.label.defaultFrom": "默认发件地址", + "Settings.email.plugin.label.defaultReplyTo": "默认回复地址", + "Settings.email.plugin.label.provider": "电子邮件供应商", + "Settings.email.plugin.title.test": "测试电子邮件发送", + "Settings.email.plugin.label.testAddress": "收件地址", "SettingsNav.link.settings": "电子邮件设置", - "SettingsNav.section-label": "电子邮件插件" + "SettingsNav.section-label": "电子邮件插件", + "Settings.email.plugin.title": "配置", + "Settings.email.plugin.subTitle": "测试电子邮件插件的配置", + "Settings.email.plugin.title.config": "配置", + "Settings.email.plugin.text.configuration": "通过 {file} 文件来配置插件,打开 {link} 查看文档。" } diff --git a/packages/core/upload/admin/src/components/EditAssetDialog/index.js b/packages/core/upload/admin/src/components/EditAssetDialog/index.js index edd33bf847..0ec0f57530 100644 --- a/packages/core/upload/admin/src/components/EditAssetDialog/index.js +++ b/packages/core/upload/admin/src/components/EditAssetDialog/index.js @@ -168,7 +168,7 @@ export const EditAssetDialog = ({ })} name="alternativeText" hint={formatMessage({ - id: getTrad({ id: getTrad('form.input.decription.file-alt') }), + id: getTrad('form.input.decription.file-alt'), defaultMessage: 'This text will be displayed if the asset can’t be shown.', })} value={values.alternativeText} @@ -208,7 +208,7 @@ export const EditAssetDialog = ({ handleClose(values)} variant="tertiary"> - {formatMessage({ id: 'cancel', defaultMessage: 'Cancel' })} + {formatMessage({ id: 'global.cancel', defaultMessage: 'Cancel' })} } endActions={ diff --git a/packages/core/upload/admin/src/translations/zh-Hans.json b/packages/core/upload/admin/src/translations/zh-Hans.json index f1caa9203b..642083aee8 100644 --- a/packages/core/upload/admin/src/translations/zh-Hans.json +++ b/packages/core/upload/admin/src/translations/zh-Hans.json @@ -1,4 +1,5 @@ { + "header.actions.add-assets": "添加新素材", "button.next": "下一步", "checkControl.crop-duplicate": "复制裁剪素材", "checkControl.crop-original": "裁剪原始素材", @@ -12,7 +13,7 @@ "control-card.save": "保存", "filter.add": "添加筛选条件", "form.button.replace-media": "替换媒体", - "form.input.decription.file-alt": "该文本将会在素材不显示时显示", + "form.input.decription.file-alt": "当此素材无法显示时,会显示该文本。", "form.input.label.file-alt": "备用文本", "form.input.label.file-caption": "标题", "form.input.label.file-name": "文件名", @@ -25,17 +26,23 @@ "input.button.label": "浏览文件", "input.label-bold": "拖拽至此", "input.label-normal": "并上传", - "input.placeholder": "点击选择一个资源,或者拖拽文件至区域", - "input.placeholder.icon": "在此区域内放置资源", + "input.placeholder": "点击选择一个素材,或者拖拽文件至区域", + "input.placeholder.icon": "在此区域内放置素材", "input.url.description": "回车键分隔URL链接", "input.url.label": "URL", "list.assets-empty.subtitle": "添加一个到列表中", "list.assets-empty.title": "暂无素材", "list.assets-empty.title-withSearch": "无素材符合当前筛选条件", + "list.assets.empty": "上传你的第一个素材", "list.assets.loading-asset": "正在为媒体加载预览: {path}", "list.assets.not-supported-content": "无可用预览", "list.assets.preview-asset": "预览视频(路径:{path})", + "list.assets.selected": "{number, plural, one {# 个素材} other {# 个素材}}准备上传", "list.assets.type-not-allowed": "文件类型不合法", + "mediaLibraryInput.actions.nextSlide": "下一张幻灯片", + "mediaLibraryInput.actions.previousSlide": "上一张幻灯片", + "mediaLibraryInput.placeholder": "点击添加素材,或拖放一个素材到当前区域", + "mediaLibraryInput.slideCount": "共 {m} 张,第 {n} 张", "modal.file-details.date": "日期", "modal.file-details.dimensions": "尺寸", "modal.file-details.extension": "扩展名", @@ -49,6 +56,7 @@ "modal.nav.selected": "选中", "modal.nav.url": "从链接", "modal.selected-list.sub-header-subtitle": "拖拽排序字段中的素材", + "modal.upload-list.footer.button": "上传 {number, plural, one {# 个素材} other {# 个素材}}到媒体库", "modal.upload-list.sub-header-subtitle": "在添加到媒体库之前,管理你的素材", "modal.upload-list.sub-header.button": "添加更多的素材", "page.title": "设置 - 媒体库",