-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi onesky projects for translations #4
base: master
Are you sure you want to change the base?
Conversation
Thank you for this PR! I think a better way to handle the different projects should be to enable an array of project in the config and default settings. So the config file should look like this: # app/config/config.yml
openclassrooms_onesky:
api_key: %onesky.api_key%
api_secret: %onesky.api_secret%
source_locale: %source_locale% #optional, default en
locales:
- fr
- es
file_format: %onesky.file_format% #optional, default xliff
keep_all_strings: false # default true
projects:
projectName:
id: %onesky.project_id%
source_locale: %source_locale% #optional, default main setting
locales: #optional, default main setting
- fr
- es
file_format: %onesky.file_format% #optional, default main setting
file_paths:
- %path.to.translations.files.directory%
keep_all_strings: true #optional, default main setting
You have to know that file path could be wild card. I’m going to update the current documentation. Thank you |
I saw, I would try to fix it tomorrow. ;) |
I fixed the tests to work with the new config, I also had to change the guzzle exception as this exception doesn't' event appears on Guzzle git repo. |
Hi, I updated this PR but I didn't manage to find how to handle two different travis configurations for the tests. Thanks. |
Hi,
I updated this project because we some specific needs.
We have one Symphony project, and we need to send translations in more than one OneSky's projects.
So here is the solution I provide :
I updated the config like that :
With this modifications, we set a project id for one (or more) paths and it upload files directly on good projects.
In addition, I add to the commands a optional "projectId" for the commands (which is needed when you set filePath option ) :
If you set only filePath, as he don't know his project id, he pull or push every files from every projects
If you only set projectId, he pulls (or push) every files from (to) the wanted project.
If you set filePath and projectId, he pulls (or push) files to (from) folders given from (to) the wanted project.