Skip to content

Commit

Permalink
docs: move some articles to blog (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored May 15, 2024
1 parent 79a52f8 commit a365963
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
title: Files Management
description: Learn how to manage your project's localization files from the command line. Synchronize your source language files and translations with your Crowdin project.
authors: andrii-bodnar
tags: [tutorial]
---

# Files management

## Introduction

Crowdin CLI allows you to manage your project's localization files from the command line. You can easily synchronize your source language files and translations with your Crowdin project.

There are several commands you can use to manage your files. The CLI provides high-level commands that are easy to use and low-level commands that give you more flexibility and control.
Expand All @@ -14,6 +13,8 @@ The high level commands are [`crowdin upload`](/commands/crowdin-upload) and [`c

The low-level commands include [`crowdin file upload`](/commands/crowdin-file-upload), [`crowdin file download`](/commands/crowdin-file-download), and [`crowdin file delete`](/commands/crowdin-file-delete). These commands are more like a lightweight wrapper over the [Crowdin API](https://developer.crowdin.com/api/v2/). They give you more flexibility and control over the file management process.

<!--truncate-->

## The `upload` and `download` commands

### Configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
# Crowdin CLI v4
---
title: Crowdin CLI 4.0
description: Learn how to manage your project's localization files from the command line. Synchronize your source language files and translations with your Crowdin project.
authors: [andrii-bodnar, yevheniyJ]
tags: [release]
---

This guide is intended to highlight the most important changes in Crowdin CLI v4 and help you migrate from CLI v3 with ease. It is not a comprehensive guide, but rather a list of the most important changes.
Today we are happy to announce Crowdin CLI 4.0! 🥳

:::tip
Need help or have questions? [Let's discuss it](https://github.com/crowdin/crowdin-cli/discussions/781)!
:::
Almost 5 years have passed since the release of Crowdin CLI 3.0. During this time we've received a lot of feedback from our users and worked hard to improve the tool. We've made many changes and improvements.

The new version of Crowdin CLI brings a lot of new features and improvements. We've added new commands, updated existing commands and improved the overall user experience.

This post is intended to highlight the most important changes and help you migrate from CLI v3 with ease. It is not a comprehensive guide, but rather a list of the most important changes.

<!--truncate-->

## Requirements

As part of this release, Java has also been updated to the version 17 LTS.
As part of this release, the minimum Java version has been updated to **17 LTS**.

## New commands

Expand All @@ -22,7 +31,7 @@ As part of this release, Java has also been updated to the version 17 LTS.

### Pre-translate

We've made significant changes to the [`pre-translate`](/commands/crowdin-pre-translate) command. The command now requires the `file` parameter for file-based projects. The `file` parameter determines which files to pre-translate. Previously, the command relied on the current configuration, and it was only possible to pre-translate the files that matched the configuration patterns. Now you can specify any file(s) in the Crowdin project to pre-translate.
We've made significant changes to the [`pre-translate`](/commands/crowdin-pre-translate) command. The command now requires the `--file` parameter for file-based projects. The `--file` parameter determines which files to pre-translate. Previously, the command relied on the current configuration, and it was only possible to pre-translate the files that matched the configuration patterns. Now you can specify any file(s) in the Crowdin project to pre-translate.

Tip: Use the [`file list`](/commands/crowdin-file-list) command to get the file paths in the current project.

Expand All @@ -31,10 +40,10 @@ Tip: Use the [`file list`](/commands/crowdin-file-list) command to get the file
* Added the `--branch` parameter support instead of specifying a branch in the file path in the [`string add`](/commands/crowdin-string-add) command.
* The [`string edit`](/commands/crowdin-string-edit) command changes:
* Moved `id` to parameter.
* Now `identifier` is used as an option to edit and not to find the needed string.
* Now `--identifier` is used as an option to edit and not to find the needed string.
* The [`string delete`](/commands/crowdin-string-delete) command changes:
* Moved `id` to parameter. Now only 1 string can be removed at a time.
* Removed `text` and `identifier` options. Only `id` is used as a string identifier.
* Removed the `--text` and `--identifier` options. Only `id` is used as a string identifier.
* Added `--directory` and `--scope` options to the [`string list`](/commands/crowdin-string-list) command.

```diff
Expand Down Expand Up @@ -90,7 +99,7 @@ The `name` property has been removed from the `upload` and `download` commands:
+crowdin glossary upload <file> --id <id>
```

Tip: Use the [`list`](/commands/crowdin-glossary-list) command to get the `id`.
Tip: Use the [`glossary list`](/commands/crowdin-glossary-list) command to get the `id`.

### TM

Expand All @@ -105,7 +114,7 @@ The `name` property has been removed from `upload` and `download` commands:
+crowdin tm upload <file> --id <id>
```

Tip: Use the [`list`](/commands/crowdin-tm-list) command to get the `id`.
Tip: Use the [`tm list`](/commands/crowdin-tm-list) command to get the `id`.

### Screenshot

Expand All @@ -116,7 +125,7 @@ The `name` parameter has been replaced with the `id` for the `delete` command be
+crowdin screenshot delete <id>
```

Tip: Use the [`list`](/commands/crowdin-screenshot-list) command to get the `id`.
Tip: Use the [`screenshot list`](/commands/crowdin-screenshot-list) command to get the `id`.

### Init

Expand All @@ -129,7 +138,7 @@ The `generate` alias has been removed:

### Lint

The `lint` command has been replaced with the [`config lint`](/commands/crowdin-config-lint) command.
The `lint` command has been replaced with the [`config lint`](/commands/crowdin-config-lint) command:

```diff
- crowdin lint
Expand All @@ -138,7 +147,24 @@ The `lint` command has been replaced with the [`config lint`](/commands/crowdin-

## Exit codes

This release also includes more exit codes (previously we only had `0` for success and `1` for failure). See the [official documentation](/exit-codes) for more details.
This release also includes more exit codes (previously we only had `0` for success and `1` for failure).

See the [official documentation](/exit-codes) for more details.

## Environment variables

Previously, it was necessary to specify the environment variables in the configuration file in order to load the configuration from them.

Now the CLI can automatically pick up the environment variables if they are set in the shell. The supported environment variables are:

- `CROWDIN_PROJECT_ID`
- `CROWDIN_PERSONAL_TOKEN`
- `CROWDIN_BASE_PATH`
- `CROWDIN_BASE_URL`

Thanks to this change, it's now easier to work with the CLI in CI/CD environments, especially in the no-configuration-file use case.

Visit the [Configuration File](/configuration#environment-variables) article for more details.

## Deprecations and backward compatibility

Expand All @@ -158,3 +184,7 @@ Removed backward compatibility for file numeric id in the [`task add`](/commands
## Command output updates

In this release, we've also reviewed and improved the output of many commands to make them more informative and user-friendly. Changes include `list`, `add`, `upload`, `download`, `delete`, and other commands for various resources.

:::tip
Need help or have questions? [Let's discuss it](https://github.com/crowdin/crowdin-cli/discussions/781)!
:::
11 changes: 11 additions & 0 deletions website/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
andrii-bodnar:
name: Andrii Bodnar
title: Engineering Manager
url: https://github.com/andrii-bodnar
image_url: https://github.com/andrii-bodnar.png

yevheniyJ:
name: Yevheniy Oliynyk
title: Full stack Java/NodeJS developer
url: https://github.com/yevheniyJ
image_url: https://github.com/yevheniyJ.png
4 changes: 2 additions & 2 deletions website/docs/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:
```
:::tip
- You can use the `--keep-archive` option with the [`crowdin download`](/commands/crowdin-download) command if you need to process the translations archive in some way (for example, upload it to the pipeline artifacts).
- It's recommended to use the `--no-progress` flag for the CLI execution in CI/CD environment. It will keep the execution logs cleaner and more readable.

- The CLI can automatically pick up the credentials from the [Environment Variables](/configuration#environment-variables) if they are set in the shell.
:::

## Further Reading

- [Configuration](/configuration)
- [Commands](/commands/crowdin)
- [Exit Codes](/exit-codes)
23 changes: 20 additions & 3 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const config = {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/crowdin/crowdin-cli/tree/main/website/',
},
blog: false,
blog: {
showReadingTime: true,
editUrl: 'https://github.com/lingui/js-lingui/tree/main/website/',
},
sitemap: {
changefreq: "weekly",
priority: 0.5,
Expand All @@ -55,7 +58,8 @@ const config = {
({
hashed: true,
docsRouteBasePath: '/',
indexBlog: false,
blogRouteBasePath: '/blog',
indexBlog: true,
}),
]
],
Expand All @@ -72,6 +76,11 @@ const config = {
src: 'img/cli.png',
},
items: [
{
to: '/blog',
label: 'Blog',
position: 'left',
},
{
href: 'https://github.com/crowdin/crowdin-cli',
label: 'GitHub',
Expand All @@ -87,7 +96,7 @@ const config = {
announcementBar: {
id: "cli_v4",
content:
'🎉 <a target="_blank" rel="noopener noreferrer" href="/crowdin-cli/releases/migration-4">Crowdin CLI v4</a> is out! 🥳',
'🎉 <a target="_blank" rel="noopener noreferrer" href="/crowdin-cli/blog/2024/05/28/cli-v4">Crowdin CLI v4</a> is out! 🥳',
backgroundColor: "#029e87",
textColor: "#ffffff",
},
Expand Down Expand Up @@ -131,6 +140,10 @@ const config = {
label: 'Configuration File',
href: 'https://developer.crowdin.com/configuration-file/',
},
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/crowdin/crowdin-cli',
Expand Down Expand Up @@ -178,6 +191,10 @@ const config = {
{
from: '/commands/crowdin-lint',
to: '/commands/crowdin-config-lint',
},
{
from: '/tutorials/files-management',
to: '/blog/2024/01/23/files-management'
}
],
},
Expand Down
16 changes: 1 addition & 15 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,24 +280,10 @@ const sidebars = {
'commands/crowdin-pre-translate',
],
},
{
type: 'category',
label: 'Tutorials',
collapsible: true,
collapsed: false,
items: [
'tutorials/files-management',
]
},
'ci-cd',
'advanced',
'exit-codes',
'faq',
{
type: "category",
label: "Releases",
items: ["releases/migration-4"],
},
'faq'
],
};

Expand Down

0 comments on commit a365963

Please sign in to comment.