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
Transifex implementation #7680
Transifex implementation #7680
Conversation
Is it possible to do the "first translation update" in a separate pull request or would it be too much of a hassle? That would allow to review the diff (when the PR is ready for review), right now there are 600 files changed and the diff is too huge to load. |
Good point. I've removed the commit. |
Good for review. As soon as it was merged, I'll create a first automatic translation update pull request using the new transifex api |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | ||
$response = curl_exec($curl); | ||
$httpStatus = curl_getinfo($curl, CURLINFO_HTTP_CODE); | ||
curl_close($curl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use the Http
class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I'll change that.
Looks good to me, I've commented minor details. Just out of curiosity why are "fetch translations" and "update translations" separate operations? Could you also rebase on master (or merge master), so that the unit tests are fixed? |
Nice progress @sgiehl I'm curious: did you hear from Transifex support about possible speed improvements to API imports? |
…o determine which resources needs to be updated
@mnapoli I don't know the reason why I have splitted that in the first place. Maybe as it was easier to build that part by part. |
As part of #7567 we need to switch our console commands to use Transifex.com API instead of oTrance.
The new implementation is a lot slower than before as we currently have a resource per language file (plugin). So we have 57 resources and 66 languages. The current implementation sends around 3700 api requests to transifex to update each resource and language as I didn't find a way to load "bulk data" eg. all translations over all resources and/or languages.
I've asked the tech support from transifex if there is any possibility to do that.
Let's see what they answer, otherwise the update will have a duration of about 10 minutes. (Which would be ok, I guess, as we are not doing it that often)