Giter VIP home page Giter VIP logo

overcrowdin's Introduction

Overcrowdin - A dotnet Crowdin CLI

Crowdin is an amazing, popular, cloud-based localization management system. It provides a CLI in Java, but that adds dependencies that many projects do not want. This project provides an alternative in the form of a .NET Core Global Tool.

Overcrowdin is a dotnet CLI built on top of the Crowdin project crowdin-dotnet-client, which provides a .NET Api over the Crowdin REST API.

This project is not yet feature complete with the Crowdin client. It was built to meet some immediate project needs and could be enhanced.

Requirements

  • .NET Core 2.1 : To install and use Overcrowdin, you need .NET Core 2.1, which can be downloaded from Microsoft's website.

Installation

Overcrowdin can be installed using the following command: dotnet tool install -g overcrowdin

Usage

After installation, overcrowdin will be available from the command prompt.

Overcrowdin uses a configuration file named crowdin.json in the working directory. This file follows the structure of Crowdin's YAML configuration file.

To see the program help, run overcrowdin with no options.

FAQ

Q: Why don't you save the API Key in the configuration file?

A: I don't want to make it easy to commit secrets into a github repository so I encourage the environment variable option that Crowdin supports in their CLI.

Developing Overcrowdin

Status

Build Status GitHub contributors Test coverage GitHub

Developer Requirements

  • .NET Core 2.1

Recommendations

  • Visual Studio Community Edition 2017 or later

Cloning

git clone https://github.com/sillsdev/overcrowdin

Then you should be able to build the solution and run the unit tests

dotnet build
cd OvercrowdinTests
dotnet test

overcrowdin's People

Contributors

papeh avatar jasonleenaylor avatar armorbearer avatar ermshiperete avatar

Stargazers

Serhiy Dmytryshyn avatar Andrii Bodnar avatar

Watchers

James Cloos avatar Eric avatar John Thomson avatar Steve McConnel avatar  avatar  avatar  avatar  avatar  avatar John T Maxwell III avatar  avatar  avatar Farmer Pickles avatar Stevan Vanderwerf avatar Jeff Heath avatar Sam Delaney avatar  avatar  avatar

overcrowdin's Issues

1-step to update all files in a project

In a large project, it can be tedious to keep track of which localizable files have been added or deleted. It would be nice to have a one-step process to add, update, and delete files in Crowdin.
Basic design:

  • Poll Crowdin for a list of existing files (https://support.crowdin.com/api/info/)
  • Build a list of local files specified in crowdin.json
  • Combine these two lists to create three lists: add (incl. new folders), update, delete
  • Perform these three operations (perhaps we should delete only when the --prune option is specified)

Warn users of unsupported data in crowdin.json

If crowdin.json contains any unsupported options, warn the user with a message like Unsupported option: X. This should not affect the errorlevel, but the warning should be displayed regardless of whether -verbose is specified.

Upload files in batches of 20 or fewer

Crowdin does not accept uploads of more than 20 files at once. To support larger uploads, we must batch them and possibly pause between batches.
Edit: We should upload files one at a time so that an entire Update operation doesn't fail because a single file doesn't exist (or an entire Add operation fail because a file does exist).

Filter out "empty" resx files

When adding or updating files, filter and remove resx files that have no localizable strings. Localizable strings are the content of the <value> elements of <data> elements whose name attribute either contains no dots (as in a project's Strings.resx) or whose name attribute ends in .Text, .AccessibleName, or .AccessibleDescription.

I've seen at least one instance of Crowdin prompting to localize a binary resource (base 64 byte array), but can't seem to find it again to determine the context. .Icon values are hidden in Crowdin.

Add `Add Directory` API method

Crowdin will not allow uploading files to folders that don't exist. We need to

  • add the Add Directory API method (even if we don't expose it on our CLI)
  • add directories before adding files to them

Filter out "empty" XML files

When adding or updating files, filter and remove xml files that have no localizable strings. For minimum viable product (MVP), find any matches for the XPaths specified in translatable_elements, if any. Bonus points for checking that the specified attributes and elements have content.

Full Glob Matching

Currently, the only wildcard characters we recognise are ** at the end of a path (search directories recursively) and single *'s in filenames. We would like to be able to match any number of ** and * anywhere in the path. Specifically, we would like to "ignore" : [ "/Src/**/*Tests/**/*.resx" ].

Normalize paths specified on the command line

Files specified using the command line option -f, -file can have paths that are absolute or relative, or that contain arbitrary directory separator characters. These paths are presently used as keys without any modification or vetting. It would be nice if they were somehow normalized. Some options:

  • remove any Windows drive letters (e.g. C:) and normalize to Unix directory separators
  • use only the filename as the key (this may require less code to enforce, but also gives users less flexibility)

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.