Skip to content

Commit

Permalink
docs: Target Files Bundles (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Jul 19, 2024
1 parent 57f48ef commit 03a25bd
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
272 changes: 271 additions & 1 deletion src/content/docs/crowdin/project-management/translations/bundles.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,276 @@
---
title: Target Files Bundles
slug: bundles
sidebar:
order: 1
---

https://support.crowdin.com/bundles/ + https://support.crowdin.com/bundles-sb/
[//]: # (https://support.crowdin.com/bundles/ + https://support.crowdin.com/bundles-sb/)

import { Steps, Aside, LinkCard, Tabs, TabItem, CardGrid } from '@astrojs/starlight/components';
import { Icon } from 'astro-icon/components';
import ReadMore from '~/components/ReadMore.astro';

Target file bundles or simply Bundles is the feature that allows you to export sets of strings or files in the formats you select, regardless of the original file format.

By default, you can choose from the following three formats: XLIFF, Android XML, and iOS Strings. You can add more target file formats by installing respective applications from the [Crowdin Store](https://store.crowdin.com/tags/string-exporter).

You can work with bundles in several ways:

* Manage bundles manually via the project's UI.
* Connect a VCS integration in Target file bundles mode.
* Manage bundles using OTA Content Delivery.
* Manage bundles using Crowdin CLI and API.

When working with bundles, the primary place to manage (create, edit, and delete) them is the Project page. Once you've created a bundle, you can use it with all the tools listed above.

## Use Cases

The most common use cases are the following:

* You can upload a single source file (e.g., Android XML) to your project, translate it, and then, using bundles, export translations for multiple platforms (e.g., Android XML for the Android app, iOS strings for the iOS app, JSON for the web app, etc.).
* You can have a single spreadsheet (e.g., XLSX or CSV) where you store source strings for all platforms your app is developed for, and each string is labeled with a respective label. Upload this file to your project, translate it, and then create separate bundles for multiple platforms using a combination of source file paths and string labels.
* You can localize your mobile app without source files by combining Crowdin design tool plugins (Figma, Sketch, Adobe XD) to send strings straight to the Crowdin project and export translations in the preferred formats using bundles.
* You can export specific sets of strings for offline translation in XLIFF format and then [upload finished translations](/offline-translation/#uploading-translations) back to Crowdin.

## Managing Bundles in UI

To work with bundles manually, you can configure and download them from your Project page.

### Configuring Bundles

To configure a bundle, follow these steps:

<Tabs syncKey="projectType">
<TabItem label="File-based project">
<Steps>
1. Open your project and go to the **Translations** tab.

2. Click **Target File Bundles** to expand the respective section and click **Add bundle**.

3. In the appeared dialog, name your bundle.

4. Specify the source and resulting file paths. If needed, you can add multiple source path patterns using <Icon name="mdi:plus" class="inline-icon" />. In the right panel, you can preview the structure of the source and translation files based on the specified paths.

5. (Optional) To ignore some folders or files, click **Add ignored pattern**, specify their respective pattern, and Crowdin will skip these specific files or folders during the bundle generation. If needed, you can add multiple ignore patterns using <Icon name="mdi:plus" class="inline-icon" />.

6. (Optional) You can specify labels in the **Filter by labels** and **Exclude by labels** fields to filter strings, including or excluding them in the generated bundle. Read more about [Labels](/strings-management#labels).

7. Select the file format you'd like your strings to be exported in. To add other formats, install the respective applications from our [Store](https://store.crowdin.com/tags/string-exporter).

8. (Optional) If a bundle file format has a <Icon name="mdi:cog" class="inline-icon" /> icon, it indicates that it has additional options (e.g., **Copy source to empty target** and **Export Translator’s Comments** for XLIFF (system), **Convert placeholders to target file format** for Android XML (system), etc.) you may use when setting up your bundle. Click the <Icon name="mdi:cog" class="inline-icon" /> icon on a selected bundle file format and configure it according to your preferences. ![Configure Bundle File Format](./_assets/bundles_configure_format.png)

9. Click **Save**. ![Create Bundle](./_assets/bundles_create_bundle.png)
</Steps>
</TabItem>
<TabItem label="String-based project">
<Steps>
1. Open your project and go to the **Download** tab.

2. Click **Target File Bundles** to expand the respective section and click **Add bundle**.

3. In the appeared dialog, name your bundle.

4. Specify the source branches and resulting file paths. If needed, you can add multiple source branch path patterns using <Icon name="mdi:plus" class="inline-icon" />. In the right panel, you can preview the source branches and structure of the translation files based on the specified paths.

5. (Optional) To ignore some branches, click **Add ignored pattern**, specify their respective pattern, and Crowdin will skip these specific branches during the bundle generation. If needed, you can add multiple ignore patterns using <Icon name="mdi:plus" class="inline-icon"/>.

6. (Optional) You can specify labels in the **Filter by labels** and **Exclude by labels** fields to filter strings, including or excluding them in the generated bundle.

7. Select the file format you'd like your strings to be exported in. To add other formats, install the respective applications from our [Store](https://store.crowdin.com/tags/string-exporter).

8. (Optional) If a bundle file format has a <Icon name="mdi:cog" class="inline-icon" /> icon, it indicates that it has additional options (e.g., **Copy source to empty target** and **Export Translator’s Comments** for XLIFF (system), **Convert placeholders to target file format** for Android XML (system), etc.) you may use when setting up your bundle. Click the <Icon name="mdi:cog" class="inline-icon" /> icon on a selected bundle file format and configure it according to your preferences.
![Configure Bundle File Format](./_assets/bundles_configure_format.png)

9. Click **Save**. ![Create Bundle](./_assets/bundles_create_bundle_sb.png)
</Steps>
</TabItem>
</Tabs>

<Aside type="caution">
You can select only one format at once within a single bundle.
</Aside>

### Downloading Configured Bundles

To download configured bundles, follow these steps:

<Tabs syncKey="projectType">
<TabItem label="File-based project">
<Steps>
1. Open your project and go to the **Translations** tab.

2. Click **Target File Bundles** to expand the respective section.

3. Click **Download** toward the needed bundle. ![Download Bundle](./_assets/translations_bundles.png)
</Steps>
</TabItem>
<TabItem label="String-based project">
<Steps>
1. Open your project and go to the **Download** tab.

2. Click **Target File Bundles** to expand the respective section.

3. Click **Download** toward the needed bundle. ![Download Bundle](./_assets/translations_bundles_sb.png)
</Steps>
</TabItem>
</Tabs>

The system will build and download a ZIP archive with folders for each of the project's target languages containing the translation files of the selected format.

<Aside>
The download of the configured bundles works independently of the full project build download.
</Aside>

### Editing Bundles

To edit configured bundles, follow these steps:

<Tabs syncKey="projectType">
<TabItem label="File-based project">
<Steps>
1. Open your project and go to the **Translations** tab.

2. Click **Target File Bundles** to expand the respective section.

3. Click <Icon name="mdi:dots-horizontal" class="inline-icon" /> toward the needed bundle and select **Edit**. Alternatively, just double-click on the needed bundle.

4. Make the necessary edits and click **Save**.
</Steps>
</TabItem>
<TabItem label="String-based project">
<Steps>
1. Open your project and go to the **Download** tab.

2. Click **Target File Bundles** to expand the respective section.

3. Click <Icon name="mdi:dots-horizontal" class="inline-icon" /> toward the needed bundle and select **Edit**. Alternatively, just double-click on the needed bundle.

4. Make the necessary edits and click **Save**.
</Steps>
</TabItem>
</Tabs>


### Deleting Bundles

To delete bundles, follow these steps:

<Tabs syncKey="projectType">
<TabItem label="File-based project">
<Steps>
1. Open your project and go to the **Translations** tab.

2. Click **Target File Bundles** to expand the respective section.

3. Click <Icon name="mdi:dots-horizontal" class="inline-icon" /> toward the needed bundle and select **Delete**.

4. Confirm the deletion by clicking **Delete** in the appeared dialog.
</Steps>
</TabItem>
<TabItem label="String-based project">
<Steps>
1. Open your project and go to the **Download** tab.

2. Click **Target File Bundles** to expand the respective section.

3. Click <Icon name="mdi:dots-horizontal" class="inline-icon" /> toward the needed bundle and select **Delete**.

4. Confirm the deletion by clicking **Delete** in the appeared dialog.
</Steps>
</TabItem>
</Tabs>

## Bundles in VCS Integrations

In file-based projects, VCS integrations allow you to work with bundles using the **Target file bundles mode**.

To configure a VCS integration that works in **Target file bundles mode**, follow these steps:

<Steps>
1. Once you select **Target file bundles mode** and authorize the connection with Crowdin on the VCS side, select the repository and branches to which you want to send translations.

2. Click <Icon name="mdi:pencil" class="inline-icon" /> to start the configuration of the selected branch.

3. In the **Branch Configuration** dialog, specify the preferred name for your configuration file or leave it as is and click **Continue**.

4. Select the needed bundles from the list or click **Create new** to create one from scratch.

5. Once you've selected all the needed bundles in the **Branch Configuration** dialog, click **Save**.

6. To complete the VCS integration configuration, click **Save** in the dialog where you selected your repo and branches.
</Steps>

![VCS Target File Bundles Mode](./_assets/bundles_vcs.png)

<Aside type="caution">
In string-based projects, VCS integrations exclusively operate in the **Target file bundles mode**.
</Aside>

<ReadMore>
Read more about [configuring VCS integrations online](/configuring-vcs-integrations-online/).
</ReadMore>

## Bundles in OTA Content Delivery

To add a distribution that exports translations using bundles, follow these steps:

<Tabs syncKey="projectType">
<TabItem label="File-based project">
<Steps>
1. Open your project and go to the **Translations** tab.

2. Click **Over-The-Air Content Delivery** to expand the respective section.

3. Add new distribution using the **Add distribution** button.

4. In the appeared dialog, name your distribution.

5. Select **Target file bundles** in the **Export options** section.

6. Select the needed bundles from the list or click **Create new** to create one from scratch.

7. Once you've selected all the needed bundles in the **Add distribution** dialog, click **Next**. ![OTA Content Delivery Bundles](./_assets/bundles_content_delivery.png)

8. Copy the distribution hash so you can use it for integration.
</Steps>
</TabItem>
<TabItem label="String-based project">
<Steps>
1. Open your project and go to the **Download** tab.

2. Click **Over-The-Air Content Delivery** to expand the respective section.

3. Add new distribution using the **Add distribution** button.

4. In the appeared dialog, name your distribution.

5. Select the needed bundles from the list or click **Create new** to create one from scratch.

6. Once you've selected all the needed bundles in the **Add distribution** dialog, click **Next**. ![OTA Content Delivery Bundles](./_assets/bundles_content_delivery_sb.png)

7. Copy the distribution hash so you can use it for integration.
</Steps>
</TabItem>
</Tabs>

<ReadMore>
Read more about [OTA Content Delivery](/content-delivery).
</ReadMore>

## Bundles in CLI/API

You can also export translations using bundles when working with Crowdin CLI and API.

<CardGrid>
<LinkCard
title="Bundles in CLI"
href="https://crowdin.github.io/crowdin-cli/commands/crowdin-bundle/"
target="_blank"
/>
<LinkCard
title="Bundles in API"
href="https://developer.crowdin.com/api/v2/#tag/Bundles"
target="_blank"
/>
</CardGrid>
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: Downloading Translations
slug: downloading-translations
sidebar:
order: 0
---

https://support.crowdin.com/downloading-translations/ + https://support.crowdin.com/downloading-translations-sb/

0 comments on commit 03a25bd

Please sign in to comment.