Sketch 插件

借助 Sketch 的 Crowdin 插件,您可以在设计中使用 Crowdin 中的文本,为设计师和开发人员节省时间。 这些文件可包括原文或翻译文本。 如有必要,您可以添加新的内容(例如对话标题,按钮标签),并发送给在 Crowdin 的翻译人员。

Use Cases

  • 快速生成多语言的创作资源。
  • Translate mockups and test them in different languages before the programming starts.
  • 停止使用“Lorem Ipsum”,将 Crowdin 的真实文本添加到你的原型。
  • 创建并上传您设计中的源字符串到您的 Crowdin 项目。 使用这种方式,上传的字符串可以被开发者使用,从而减少耗费在开发过程上的时间。
  • 将标记的屏幕截图上传到您的 Crowdin 项目。

Installing Crowdin plugin for Sketch

You can download the latest release from our GitHub repository.

  1. 下载安装文件。
  2. 解压它。
  3. 双击 sketch-crowdin.sketchplugin 文件进行自动安装。

Crowdin plugin for Sketch can also be installed with Sketch Runner.

将 Sketch 与 Crowdin 账户连接

设置 Crowdin 凭据

要在 Sketch 中指定您的 Crowdin 凭据,请按照以下步骤:

  1. 点击 插件 > Crowdin
  2. 切换到设置
  3. 提供您的个人访问令牌。
  4. 点击 连接到 CrowdinSketch 插件连接到 Crowdin

要在 Crowdin 中生成新的令牌,请遵循以下步骤:

  • 转到 账户设置 > API 选项卡的个人访问令牌部分,然后点击新建令牌
  • 指定 令牌名称 并点击 创建Crowdin 个人访问令牌

选择 Crowdin 项目

To select the project you’d like to work with, click the Select Project drop-down menu in Settings, and select a project from the list. 稍后,您可以在需要时使用同一下拉菜单切换到另一个项目。 此外,您可以将您的内容上传到选定的特定分支。 Sketch Plugin Selecting Crowdin Project

UI 本地化

Use the Strings tab when localizing UI and working on dynamic pages with your development and marketing teams. 在此选项卡中,您可以通过点击将来自 Crowdin 的源字符串添加到 Sketch 中的设计中。 在设计中使用文本后,您可以自动上传标记的屏幕截图到 Crowdin,为翻译员做参考。

在 Sketch 中使用来自 Crowdin 的源字符串

  1. 打开 Sketch 的 Crowdin 插件。
  2. In the Strings tab, use the Search field to find the specific copy. You can search strings by source text, string identifier, or context.
  3. 选择要添加文本的文本图层,然后点击所需的字符串。使用 Crowdin 源字符串的 Sketch 插件

在设计中使用 Crowdin 的源字符串后,您可以在 Sketch 中预览这些字符串的翻译,并将它们上传屏幕截图到您的 Crowdin 项目。

将源字符串从 Sketch 添加到 Crowdin

You can add the strings that are already used in the designs or create and add completely new strings.

  1. 打开 Sketch 的 Crowdin 插件。
  2. 要添加设计中使用的字符串,请选择整个艺术板、多个艺术板或艺术板上所需的字符串。 或者,如果您想要添加一个新字符串,请跳过此步骤。
  3. In the Strings tab, click Add String.
  4. 在出现的对话框中,填写所需字段。
  5. (Optional) To add labels to the strings, alternately select them from the Label drop-down menu and click Save. Sketch Plugin Add String

在 Crowdin 中为多个文件添加相同的字符串,或者从下拉菜单 文件 中选择所需的文件。

Sketch Plugin Add String To Multiple Files

如果某些艺术板包含不应添加到 Crowdin 的隐藏元素,请清除 推送隐藏元素 选项。

添加的字符串将传输到您的 Crowdin 项目,并显示在字符串选项卡的列表中。 您可以随时从同一列表中编辑或删除字符串。 相应的更改也将应用于您的 Crowdin 项目中的字符串。

键命名模式设置

简化从 Sketch 添加到 Crowdin 项目的字符串, 您可以在插件设置中为源字符串标识符设置所需的键命名模式。 The Crowdin plugin for Sketch will suggest the string identifiers for new strings based on the selected pattern. 添加新的源字符串时,您始终可以将建议的标识符编辑为首选外观。

要选择键命名模式,请按照下列步骤操作:

  1. 打开 Sketch 的 Crowdin 插件。
  2. 切换到设置
  3. 键命名模式部分中,从下拉菜单中选择首选选项。

向 Crowdin 上传已标记的屏幕截图

  1. 打开 Sketch 的 Crowdin 插件。
  2. 字符串选项卡中,在您的设计中使用 Crowdin 项目中的文本。 Click Upload Screenshots to upload screenshots of the artboards that include the used texts.
  3. 要在 Crowdin 上更新屏幕截图,请再次点击上传屏幕截图Sketch Plugin Upload Screenshots

要了解更多信息,请阅读文章屏幕截图

预览字符串

预览来自 Crowdin 的 Sketch 设计中使用的字符串的翻译。 You can preview translations in the new frames or the original ones. When previewing translations in the new frames, you can populate them with the actual translations or with string keys for further use by developers.

要预览带有翻译的字符串,请遵循如下步骤:

  1. 打开 Sketch 的 Crowdin 插件。
  2. In the Strings tab, Preview Strings section, select Preview in duplicated artboards or Preview in the current artboards.
  3. 选择使用语言创建
  4. 选择您想要预览翻译的目标语言。 您还可以选择所有语言
  5. Choose the content you want to preview in Sketch. Select Page or Artboard. Sketch Plugin Preview Strings

要预览用键名称填充的字符串,请按照下列步骤操作:

  1. 打开 Sketch 的 Crowdin 插件。
  2. In the Strings tab, Preview Strings section, select Preview in duplicated artboards.
  3. 选择使用键名称创建
  4. Choose the content you want to preview in Sketch. Select Page or Artboard. Sketch Plugin Preview Keys

营销视图本地化

Use the Translation tab to localize static pages, like brochures and banners. 在这个选项卡中,您可以向 Crowdin 发送翻译文本,并将翻译文本上传回 Sketch。

向 Crowdin 发送译文

You can send text for translation either from selected or all artboards from a Sketch file. 翻译员将在列表视图中处理这些文本,并使用设计作为附加语境,以实现更高的翻译质量。

在Crowdin中,将创建一个根文件夹Sketch plugin。 It will contain a subfolder named after your Sketch file with HTML files for each artboard inside. If needed, you can disable content segmentation in the plugin Settings so the long texts will not be split into sentences.

To send Sketch designs for translation, follow these steps:

  1. Open the necessary Sketch file.
  2. Go to Plugins > Crowdin.
  3. In the Translation tab, Send Texts section, select content you’d like to translate. Select Page or Artboard. Sketch Plugin Send Texts

当源文件上传到您的 Crowdin 项目时,您可以邀请贡献者翻译和校验它们。

详细了解翻译策略

从 Crowdin 上传翻译到 Sketch

每当您想要在 Sketch 中测试翻译后的副本或生成多语言资源时,您都可以在 Sketch 和 Crowdin 项目之间同步文本。

To upload translated copies to Sketch, follow these steps:

  1. Open the necessary Sketch file.
  2. Go to Plugins > Crowdin.
  3. In the Translation tab, Get Translations section, select the target language you want to upload translations for. You can also Select All languages.
  4. Select the content you want to preview in Sketch. Select Page or Artboard. Sketch Plugin Get Translations

After uploading translations to Sketch, the modified file will contain a separate artboard with translations for each target language. 新上传的翻译版本不会覆盖您之前上传的版本。 您可以随时删除不再需要的翻译副本。 Sketch Plugin Uploaded Translations

如果您希望新上传的翻译版本覆盖之前上传的翻译版本,请打开插件设置并选择覆盖现有翻译

本文是否有帮助?