ZCI
Zendesk and Crowdin integration Command Line Interface (CLI)
Installation
Add this line to your application's Gemfile:
gem 'zci'
And then execute:
bundle
Or install it manually as:
gem install zci
Use
The simplest way to get started is to create a scaffold project:
zci init todo
A new ./todo directory is created with the sample config zci.yml
. View the basic output of the scaffold with:
cd todo
zci help
Which will output:
NAME
zci - is a command line tool that allows you to manage and synchronize your Zendesk localization with Crowdin project
SYNOPSIS
zci [global options] command [command options] [arguments...]
VERSION
0.6.1
GLOBAL OPTIONS
-c, --config=<s> - Project-specific configuration file (default: /home/crowdin/zci.yml)
--version - Display the program version
-v, --verbose - Be verbose
--help - Show this message
COMMANDS
help - Shows a list of commands or help for one command
init:project - Create new ZCI-based project
import:sources - Read categories/section/articles from Zendesk and upload resource files to Crowdin
download:translations - Build and download translation resources from Crowdin
export:translations - Add or update localized resource files(categories, sections and articles) in Zendesk
clean - Clears out the local repository of retrieved files
project:info - Zendesk and Crowdin info
Configuration
The scaffold project that was created in ./todo comes with a zci.yml
shell.
---
# Crowdin API credentials
crowdin_project_id: '{{crowdin-project-id}}'
crowdin_api_key: '{{crowdin-project-api-key}}'
crowdin_base_url: 'https://api.crowdin.com'
# Zendesk API credentials
zendesk_base_url: 'https://{{subdomain}}.zendesk.com/api/v2/'
zendesk_username: '{{zendesk-admin-username}}'
zendesk_password: '{{zendesk-admin-password}}'
# Zendesk catogories
categories:
- zendesk_category: '{{zendesk-category-id}}'
translations:
-
crowdin_language_code: '{{crowdin-language-code}}' #the full list of language codes: https://support.crowdin.com/api/language-codes/
zendesk_locale: '{{zendesk-locale}}' #the full list of language codes: https://support.zendesk.com/hc/en-us/articles/203761906-Language-codes-for-Zendesk-supported-languages
-
crowdin_language_code: '{{crowdin-language-code}}'
zendesk_locale: '{{zendesk-locale}}'
- zendesk_category: '{{zendesk-category-id}}'
translations:
-
crowdin_language_code: '{{crowdin-language-code}}'
zendesk_locale: '{{zendesk-locale}}'
-
crowdin_language_code: '{{crowdin-language-code}}'
zendesk_locale: '{{zendesk-locale}}'
Advance Usage
This section covers some of zci
more advanced features.
Brands
To make changes and updates via the Help Center API
in your branded Help Centers
, specify the URL of the specific brand.
For more information, see Managing multiple brands.
---
categories:
- zendesk_category: '<%zendesk-category-id%>'
brand_url: '<%zendesk-brand-url%>/api/v2/'
Supported Rubies
Tested with the following Ruby versions:
- MRI 2.2.3 (Windows)
- MRI 2.4.1 (Linux/macOS)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License and Author
Author: Anton Maminov (anton.maminov@gmail.com)
Copyright: 2015-2019 crowdin.com
This project is licensed under the MIT license, a copy of which can be found in the LICENSE file.