GithubHelp home page GithubHelp logo

isabella232 / gp-localci Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automattic/gp-localci

0.0 0.0 0.0 100 KB

LocalCI is a Github-oriented localization continuous integration add-on to GlotPress.

License: GNU General Public License v2.0

PHP 95.07% CSS 4.93%

gp-localci's Introduction

LocalCI (GP variant)

gp-localci is a Github-oriented localization continuous integration add-on to GlotPress. LocalCI provides string coverage management and associated messaging coordination between Github and an external CI build system (eg, CircleCI, TravisCI).

Requirements

Installation

  1. Put this plugin in the folder: /glotpress/plugins/.
  2. Create a config.php file based on config-sample.php.
  3. Ensure /gp-localci/config.php is locked down as possible (file permissions, move it out of webroot, etc).
  4. Set the LOCALCI_DESIRED_LOCALES and LOCALCI_GITHUB_API_MANAGEMENT_TOKEN defines.
  5. Set up entries in config.php's $repo_metadata. All lowercase keys. An example entry:
'automattic/wp-calypso' => array(
	'build_ci_api_token'  => '_circleci_artifact_only_token_here_',
	'gp_project_id'       => 1,
)

.pot Generation

If using the CircleCI adapter (presumably), add logic to your Circle YAML config to generate a pot of new strings at `$CIRCLE_ARTIFACTS/translate/localci-new-strings.pot.

post:
  - |
     if [[ "$CIRCLE_BRANCH" != "master" ]]; then
       git clone https://github.com/Automattic/gp-localci-client.git
       bash gp-localci-client/generate-new-strings-pot.sh $CIRCLE_BRANCH $CIRCLE_SHA1 $CIRCLE_ARTIFACTS/translate
       rm -rf gp-localci-client
     fi

Integration

Add a CircleCI webhook (in the YAML config) pointing to your GlotPress instance like so:

notify:
  webhooks:
    - url: https://glotpressinstance.example.com/api/localci/-relay-new-strings-to-gh

gp-localci's People

Contributors

yoavf avatar mhsdef avatar akirk avatar

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.