Skip to content
This repository has been archived by the owner on May 4, 2020. It is now read-only.

Commit

Permalink
Handle translations using the new composer plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentTorregrosa committed May 21, 2017
1 parent 3a16062 commit 183a92c
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

# Contrib files.
/www/core
/www/libraries
/www/modules/contrib
/www/themes/contrib
/www/libraries
/www/translations/contrib

/www/autoload.php
/www/index.php
Expand Down
12 changes: 12 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,16 @@
"type": "zip"
}
}
},
"drupal-l10n": {
"type": "vcs",
"url": "https://github.com/FlorentTorregrosa/drupal-l10n"
}
},
"require": {
"composer/installers": "^1.0.21",
"cweagans/composer-patches": "~1.0",
"drupal-composer/drupal-l10n": "dev-master",
"drupal-composer/drupal-scaffold": "^2.2",
"drupal/admin_toolbar": "1.19.0",
"drupal/core": "8.3.2",
Expand Down Expand Up @@ -91,6 +96,7 @@
"sort-packages": true
},
"scripts": {
"drupal-l10n": "DrupalComposer\\DrupalL10n\\Plugin::download",
"drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
"post-create-project-cmd": [
"bash ./scripts/init.sh"
Expand Down Expand Up @@ -121,6 +127,12 @@
"sites/example.settings.local.php"
]
},
"drupal-l10n": {
"destination": "translations/contrib",
"languages": [
"fr"
]
},
"patches": {
"drupal/redis": {
"Add status page and some statistics": "https://www.drupal.org/files/issues/redis-statistics-7.patch"
Expand Down
53 changes: 49 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions www/sites/default/settings.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

$settings['container_yamls'][] = __DIR__ . '/services.yml';

// Translations.
$config['locale.settings']['translation']['path'] = 'translations/contrib';
$config['locale.settings']['translation']['use_source'] = 'local';

// TODO: Remove this line when it will no more be added when installing with
// Drush.
$settings['install_profile'] = 'standard';
Expand Down

0 comments on commit 183a92c

Please sign in to comment.