GithubHelp home page GithubHelp logo

zci's Introduction

ZCI

Gem Version

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License and Author

Author: Anton Maminov ([email protected])

Copyright: 2015-2019 crowdin.com

This project is licensed under the MIT license, a copy of which can be found in the LICENSE file.

zci's People

Contributors

andrulko avatar crowdin-support avatar drewsamsen avatar ganezasan avatar italodamato avatar mamantoha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

zci's Issues

Encoding Issue

Reproduce:

Zendesk:
default language: de
target language: en-us

Crowdin:
default language: de
target language: en-us

Dont translate in Crowdin!

1 Create a new Article in Zendesk

2 Add this text in Zendesk-Article:
Als Administrator/in sehen Sie die neue Schaltfläche für den „Msnger“ rechts oben, gleich neben „Dtblge“ und „mN“

3 import:sources

4 download:translations

5 export:translations

Result in Xml file and in Zendesk will be:

Als Administrator/in sehen Sie die neue Schaltfl├ñche f├╝r den ÔÇ×MsngerÔÇ£ rechts oben, gleich neben ÔÇ×DtblgeÔÇ£ und ÔÇ×mNÔÇ£:

Not able to update translations

Hello,

I'm not able to update the translations.
Info:

  • Crowdin default language: de
  • Crowdin translation language: en locale: en-US

  • Zendesk default language de
  • Zendesk translations language en -> locale: en-US

image

import:sources - works
download:translations - works
export:translations - fails

Api request logs:
image

thank you in advance

Add support for upload existing translations

I was looking for a way to upload existing translations from Zendesk to CrowdIn, the same way it works with the crowdin-cli:

crowdin-cli upload translations

Do you know an easy way to add such a functionality to zci?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.