Git Product home page Git Product logo

openl10n-cli's Introduction

OpenLocalization

Build status... Code quality... License MIT Packagist Dependency Status

OpenLocalization is a localization management web-app to help you translate any of your projects. Its goal is to provide a simple and flexible tool to easily edit and deploy your application translations.

See the official website to learn more about OpenLocalization. The following sections are a summary of the installation steps to make it works quickly. You're encouraged to read the full documentation for more details.

Warning

This project is under heavy development. Many changes on backend and frontend apps are expected. However the current release is usable and data migrations will be easy. About the database I plan to focus on PostgreSQL features and will remove the ability to use MySQL.

Due to lack of time those last weeks I prefered to work on a private fork and postpone the next release until I reach a better "minimal viable product". Don't expect to see new releases before Q4 2015.

If you're interested in the project, help is still welcomed :)

Requirements

Installation

Install PHP dependencies:

composer install

Build the front-end assets:

npm install
./node_modules/.bin/gulp build --prod

Initialize the database:

php app/console doctrine:database:create --env=prod --no-debug
php app/console doctrine:schema:create --env=prod --no-debug

Add a new user:

php app/console openl10n:user:new --env=prod --no-debug

Run the application on http://127.0.0.1:8000

php app/console server:run

License

OpenLocalization is released under the MIT License. See the bundled LICENSE file for details.

openl10n-cli's People

Contributors

b-durand avatar franmomu avatar jdeniau avatar mattketmo avatar nervo avatar olaurendeau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openl10n-cli's Issues

The "working-dir" option does not exist.

When installling on a directory-level, I got this error.

I think you can reproduce it like this:

mkdir test;
cd test;
composer require openl10n/cli;
vendor/openl10n/cli/bin/openl10n init;

The pull command does not work either when in a openl10n-managed directory

Add option to export to different path

Example of conf file:

server: openl10n.dev
project: demo
files:
    expr: src/Openl10n/Bundle/*/Resources/translations/<domain>.<locale>.*
    export_to: app/Resources/translations/<domain>.<locale>.xlf

(Re) implements options for push & pull commands

See

files:
  - 
    pattern: path/to/<locale>.yml
    # File set specific options
    options: 
       push: [reviewed, erase, clean]
       pull: [reviewed, fallback_locale, fallback_key]

# Global options
options:
  push: [reviewed, erase, clean]
  pull: [reviewed, fallback_locale, fallback_key]

Empty .openl10n.yml

PHP Catchable fatal error:  
Argument 1 passed to Openl10n\Cli\ServiceContainer\ExtensionManager::load() 
must be of the type array, null given, called in src/Openl10n/Cli/Application.php on line 103 
and defined in src/Openl10n/Cli/ServiceContainer/ExtensionManager.php on line 47

Recursive glob pattern

Allow recursive glob pattern (**) when finding files.
Example for a Symfony project:

src/**/*Bundle/Resources/translations/*.<locale>.yml

Read conf from file

Example of configuration file

server:
    host: openl10n.local
    login: user
    password: user

project: foobar

files:
    expr: 
        - src/Acme/Bundle/*/Resources/translations/<domain>.<local>.*
        - strings/<locale>/LC_MESSAGES/<domain>.*
    exclude: messages.en.yml

options: ~

Or specify credentials in user's home directory (~/.openl10n.yml):

hosts:
    openl10n.dev:
        user: user
        password: user
        #use_ssl: true

Then only use:

server: openl10n.dev

Issue when building the phar

Hi!

I get the following error when I'm building the phar:

  [RuntimeException]
  The file "/Users/someuser/Work/tools/openl10n-cli/vendor/guzzlehttp/guzzle/src/cacert.pem" does not exist or is not a file.

Box version:

Box version 2.6.1 build c9ee902145324690459664bd938ed31475d58347

Pull a specific file / folder

First of all thanks a lot for this awesome project. I've been thinking about something like openl10n for a long time.

As openl10n.phar allow to push a specific file, I think that it make sense to be able to pull a specific file / folder.
We have been able to bypass this by creating various configuration files. But it's not really reliable.

If you validate this feature, we will try to implement it. :)

push command filter

Hi,

It would be nice if we could filter some files to push (and/or pull), because the upload may be slow.

If you know that you have modified only one file, you do not want to push all files. This way, we can develop post-commit hooks or something like that.

I started to dive into the push code friday, but how do you see that:

  • Does it needs to be in the sdk (I don't know why but it can be usefull to filter your resources):
    • pro: will work on all potential client
    • con: I think it will not work if you add a new file
  • or just in the cli command

Tell me how you see it and I will push you some code.

Thanks
Julien

[Init] auto detect pattern

Add rules to detect file patterns automatically.

For instance, in a Symfony2 app, find files under pattern src/**/*Bundle/Resources/translations/*, and if matching, suggest default patterns on init command.

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.