Hi,
Following:
#644916: Add drush make command for pulling core installer translations from l.d.o
#967804: po files in a directory named xx/__unzip__/

I would like to be able to download core translation files using a makefile.
Something like:

api = "2"
core = "6.x"
projects[drupal][version] = "6.19"
projects[] = "fr"
projects[] = "es"

This is to create platforms in aegir that contain many languages.
Thanks

Comments

lavamind’s picture

Subscribe.

danillonunes’s picture

Subscribe. I want to see this too.

Maybe translations needs to be a special case out of projects, like:

api = "2"
core = "6.x"
projects[drupal][version] = "6.19"
translations[] = "fr"
translations[] = "es"
danillonunes’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new2.25 KB

I made this patch against 6.x-3.x, but it applies to 6.x-2.x too.

It get translations by the format I suggest in #2. The --translations option is accepted too.

j0nathan’s picture

Hi danillonunes and thanks for the patch.

I tested it against drush_make 2.2 after I applied #1111050: include file missing on some URLs and it gave me this:

~/.drush/drush_make$ git apply 0001-Feature-request-974726-Adding-translations-support-i.patch
error: patch failed: drush_make.drush.inc:164
error: drush_make.drush.inc: patch does not apply
error: patch failed: drush_make.project.inc:112
error: drush_make.project.inc: patch does not apply
jonhattan’s picture

StatusFileSize
new2 KB

@danillonunes solution works. Here's a reroll of #3 that apply on 2.x branch.

helmo’s picture

Project: Drush Make » Drush
Version: 6.x-3.x-dev »
Component: Code » Make

[ Powered by #1115636: Issue Macros and Templates - Drush Make]

Drush make is being merged into drush core (discussed in issue:#1310130: Put drush make in drush core)
This means that the issue queue is also moving. The drush queue has a component 'Make' especially for drush_make.

More information will be posted on the drush_make and drush project pages.

helmo’s picture

I also marked an issue of mine as duplicate of this.

For reference: #1175174: translations[] = nl inside makefile

I've re-rolled the patch for Drush core, added a testcase and added text to README.txt

jhedstrom’s picture

Status: Needs review » Fixed

This looks good to me. All tests are passing locally. Thanks all!

helmo’s picture

Status: Fixed » Needs review
StatusFileSize
new1.61 KB

Thanks for putting this is. I however did run into a little issue.

$this->version only seems to exist when the makefile has an explicit version, as we have in the testcase.
I found $this->download['version'] to be as an alternative.

My experimentation shows that this holds for both core and contrib.
I doubt we could create a testcase without version information... as the build hash would change on every release. :(

I did add core 6.22 to the testcase to make sure the core translation is also downloaded correctly.

jhedstrom’s picture

Status: Needs review » Fixed

Thanks for the follow-up. The new tests are all passing. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.