Sketch 插件

With the Crowdin plugin for Sketch, you can use texts from Crowdin Enterprise in your designs to save time for both designers and developers. 这些文件可包括原文或翻译文本。 如有必要,您可以添加新的内容(例如对话框标题、按钮标签)并将其发送给 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.

Connecting Sketch with Crowdin Enterprise Account

设置 Crowdin 企业版凭据

To specify your Crowdin Enterprise credentials in Sketch, follow these steps:

  1. 点击 插件 > Crowdin
  2. 切换到设置
  3. 提供您的个人访问令牌。
  4. Specify your organization domain name and click Connect to Crowdin. Sketch Plugin Connect to Crowdin Enterprise

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

  • Go to Account Settings, Access tokens tab and click New token.
  • 指定 令牌名称,选择其 作用范围项目,点击 创建

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. 稍后,您可以在需要时使用同一下拉菜单切换到另一个项目。 Additionally, you can select the specific branch your content will be uploaded to.
Sketch Plugin Selecting Crowdin Enterprise Project

UI 本地化

Use the Strings tab when localizing UI and working on dynamic pages with your development and marketing teams. In this tab, you can add source strings from Crowdin Enterprise to your designs in Sketch in a click. After the texts are used in the designs, you can automatically upload tagged screenshots for translators’ reference back to Crowdin Enterprise.

Using Source Strings from Crowdin Enterprise in Sketch

  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. 选择要添加文本的文本图层,然后单击所需的字符串。Sketch Plugin Using Source Strings from Crowdin Enterprise in Sketch

After using the source strings from Crowdin Enterprise in your designs, you can preview translations for these strings in Sketch and upload screenshots for them to your Crowdin Enterprise project.

Adding Source Strings from Sketch to Crowdin Enterprise

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 的隐藏元素,请清除 推送隐藏元素 选项。

Added strings will be transferred to your Crowdin Enterprise project and also will be displayed in the list of the Strings tab. 您可以随时从同一列表中编辑或删除字符串。 相应的更改也将应用于您的 Crowdin 企业版项目中的字符串。

键命名模式设置

To simplify adding strings from Sketch to the Crowdin Enterprise project, you can set up the desired key naming pattern for the source string identifiers in the plugin settings. 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. In the Strings tab, use texts from the Crowdin Enterprise project in your designs. Click Upload Screenshots to upload screenshots of the artboards that include the used texts.
  3. To update screenshots on Crowdin Enterprise, click Upload Screenshots again. Sketch Plugin Upload Screenshots

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

预览字符串

Preview translations from Crowdin Enterprise for the strings used in the designs in 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. In this tab, you can send texts with context for translators to Crowdin Enterprise and upload translated copies back to Sketch.

向 Crowdin 企业版发送译文

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

In Crowdin Enterprise, a root folder Sketch plugin will be created. 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 企业版项目时,您可以邀请贡献者翻译和校验它们。

了解更多有关翻译策略的内容。

Uploading Translations from Crowdin Enterprise to Sketch

You can synchronize texts between Sketch and Crowdin Enterprise projects whenever you want to test the translated copy inside Sketch or generate multilingual assets.

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

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

本文是否有帮助?