openl10n / openl10n-cli Goto Github PK
View Code? Open in Web Editor NEWCommand line tool to interact with the OpenLocalization API
Home Page: http://openl10n.io
License: MIT License
Command line tool to interact with the OpenLocalization API
Home Page: http://openl10n.io
License: MIT License
Allow recursive glob pattern (**
) when finding files.
Example for a Symfony project:
src/**/*Bundle/Resources/translations/*.<locale>.yml
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
https://travis-ci.org/openl10n/openl10n-cli/jobs/90368179
Something often went wrong on travis, always with this step features/cli/push.feature:145
I haven't been able to reproduce it locally either with php 5.5 or 5.6
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. :)
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]
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
For instance:
files:
- path/to/translations/<context>.<locale>.xliff
Depends on openl10n/openl10n#89.
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
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
Would you mind if we add unit test or spec on the project ?
Which would have your preference ? I've noticed that https://github.com/openl10n/openl10n use specs
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:
Tell me how you see it and I will push you some code.
Thanks
Julien
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
This fails:
openl10n init http://user:[email protected] silex --no-interaction
TODO:
initialize()
: init conf in memory from $input
+ file (if exists)interact()
: ask for missing confexecute()
: validate conf + write into file if in memory conf is differentAdd 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.
The command is unable to detect language files when they are at the root of the project.
For instance: https://git.popcorntime.io/stash/projects/pt/repos/popcorn-i18n/browse
server: dev
project: popcorn-i18n
files:
- <locale>.json
to validate current config file
Rename config file to .openl10n.yml
, to be coherent with other system configuration (eg. .travis.yml
, .scrutinizer.yml
, .php_cs
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.