npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cadolabs/crowdin-cli

v3.0.19

Published

Cli tool for crowdin

Downloads

1,265

Readme

crowdin-cli-tool Supporting release

Crowdin CLI optimized for work with branches


NPM

Requirements

  • Node 12+

CLI description

  • source - root language setuped in crowdin
  • targetLanguage - all languages setuped in crowdin for project

Example workflow

  1. Add keys and translations in source file
  2. Upload only added in new crowdin branch crowdin push-diff -b new-branch
  3. Wait for translators work
  4. Download and merge it crowdin pull-diff -b new-branch

Installation

npm i @cadolabs/crowdin-cli or yarn add @cadolabs/crowdin-cli

Can be installed global (run as crowdin) or in project dependencies (run npx crowdin or yarn crowdin from project) (Recomended).

For check installation run crowdin -v

Setup

Write token in .crowdin file.

File will be created in command run directory

crowin init --token <crowdin_token>

Where <crowdin_token> - api token generated in crowdin profile with access all checkbox

Add .crowdin in .gitignore

commands

init - Save token in .crowdin file

lint - Check translations syntax

push-diff - Upload translations diff (Throw error in master branch)

pull-diff - Download translations diff (Throw error in master branch)

upload-source - Upload only source file

upload-translations - DEPRECATED. Upload only translations (Throw error if source not uploaded).

upload or push - UDEPRECATED. pload source and then translations (runs upload-source and upload-translations)

download or pull - DDEPRECATED. ownload all translations

task - Create task in crowdin

clean - Remove branch in crowdin

sync - DEPRECATED. Upload source, translations, and download all from crowdin

Params

-v or --version - Show CLI version

-h or --help - Show help

-b or --branch - Crowdin branch

-c or --config - Path to config file

-l or --languages - Comma separetd language list (all by default). Ex. crowdin upload -l "ru, en, fr"

--silent - Show logs line by line, without animations

--token - Generated in crowdin api-token

--organization - Organization name in crowdin enterprise

--fix - Fix errors with lint command. ATTENTION! This delete crowdin branch too!

--diff-with - With push or push-diff create diff with coomit/tag/etc.

--project-id - Crowdin project ID

--base-dir - Look at 'Config'

--path - Look at 'Config'

--use-git-branch-as-default - Look at 'Config'

--import-eq-suggestions - Defines whether to add translation if it's the same as the source string

--auto-approve-imported - Mark uploaded translations as approved

--skip-untranslated-strings - Defines whether to export only translated strings

--skip-format-step - Deprecated. Skip format step after download translations

--contributors - Comma separated user id list to assign new tasks

Config

Some params can be represent in config.

Place file .crowdin-config.json in project directory.

.crowdin-config.json file contents:

{
  "token": string, // api token generated in crowdin profile. Strongly non recommend to place it project config
  "organization": string, // Organization name in crowdin enterprise
  "projectId": string, // Crowdin project ID
  "baseDir": string, // Path to translations/directories to upload in crowdin.
  // Relative to config file or absolute
  // Children directory structure will be saved in crowdin.
  "path": string, // Path to files relative to 'baseDir'
  // Glob syntax allowed
  // File name require on of theese variables: %{id/name/editorCode/twoLettersCode/threeLettersCode/locale/androidCode/osxLocale}!
  // Example: './config/**/locale_prefex.%{twoLettersCode}.yml'
  // For files 'config/dir1/locale_prefex.en.yml' and 'config/dir1/locale_prefex.ru.yml'
  "useGitBranchAsDefault": boolean, // Use git branch by default
  // Blocks uploading to master branch
  // Ignored with param '-b' or '--branch
  "importEqSuggestions": boolean, // Defines whether to add translation if it's the same as the source string
  "autoApproveImported": boolean, // Mark uploaded translations as approved
  "skipUntranslatedStrings": boolean, // Defines whether to export only translated strings
  "contributors": string[], // Comma separated user id list to assign new tasks
  "translateHidden": boolean, // Allow translations upload to hidden source strings
  "skipAssignedStrings": boolean, // Skip strings already included in other tasks
  "exportWithMinApprovalsCount": number, // Defines whether to export only approved strings
  "skipFormatStep": boolean, // Deprecated. Skip format step after download translations
}

Links

Contributing

Contributing Rules | Code of Conduct

License

Released under MIT License.

Supporting

Authors

Jenya Gul