Skip to content

Commit b6e3ae7

Browse files
committed
Merge branch 'master' of https://github.com/bellcom/os2core
2 parents 7986a3c + 2e5b265 commit b6e3ae7

5 files changed

Lines changed: 22863 additions & 25912 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
translations/translations-dumps/*

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,28 @@ drush si os2core --db-url=mysql://db_user:db_pass@mysql_host/db_name--locale=da
1919
### Installation profile
2020

2121
The installation profile only enables commonly used ui modules. It is up to the developer to decide which of the supplied OS2Core modules are needed. These can be enabled from the "Modules" page, otherwise they can be removed.
22+
23+
## Export translations
24+
Get latest db dump from production environment.
25+
Make sure that you have set up correct translation folder.
26+
27+
Check in your `settings.php`
28+
```
29+
$settings['custom_translations_directory'] = 'profiles/contrib/os2core/translations';
30+
```
31+
Run export translation command:
32+
```
33+
drush language-export --langcodes=da --file=os2core-drupal-8.x.da.po
34+
```
35+
## Update translations
36+
37+
```
38+
git pull
39+
sh profiles/contrib/os2core/scripts/translations-update.sh
40+
```
41+
Script includes following steps:
42+
- dumping current translations to `./translations/translation-dumps` directory
43+
- import current version of translation file
44+
45+
46+
After export all changes should be reviewed and commited.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"drupal/chosen": "^2.9",
5252
"drupal/linkit": "^5.0",
5353
"drupal/ckeditor_entity_link": "^1.0@alpha",
54+
"drupal/drush_language": "^1.0@RC",
5455
"os2web/os2web_datalookup": "^1.0",
5556
"os2web/os2web_nemlogin": "^1.0",
5657
"os2web/os2web_simplesaml": "8.x-dev",

scripts/translations-update.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
ROOT_DIR=$(realpath "$(dirname $0)/../")
3+
DRUSH_EXEC=$(which drush)
4+
5+
echo 'Exporting existing translations.'
6+
mkdir -p $ROOT_DIR/translations/translations-dumps/
7+
$DRUSH_EXEC language-export --langcodes=da --file=$ROOT_DIR/translations/translations-dumps/da-dump-$(date +'%Y%m%d-%H%M%S').po
8+
9+
echo "Importing translations from $ROOT_DIR/translations/os2core-drupal-8.x.da.po."
10+
$DRUSH_EXEC language-import --langcode=da $ROOT_DIR/translations/os2core-drupal-8.x.da.po

0 commit comments

Comments
 (0)