@@ -4,7 +4,52 @@ version: '3'
44dotenv : ['.env.local', '.env']
55
66includes :
7- translation : ./task/Taskfile.translation.yml
7+ translation :
8+ taskfile : ./task/Taskfile.translation.yml
9+ vars :
10+ TRANSLATION_MODULES :
11+ # Run `ls web/modules/custom/*/*.info.yml | xargs basename -s '.info.yml'` to get this list
12+ - aarhus_hero
13+
14+ # Only used for development.
15+ # - hoeringsportal_base_fixtures
16+
17+ - hoeringsportal_citizen_proposal
18+ - hoeringsportal_citizen_proposal_archiving
19+ - hoeringsportal_config_settings
20+ - hoeringsportal_content_access
21+ - hoeringsportal_content_blocks
22+ - hoeringsportal_data
23+ - hoeringsportal_deskpro
24+ - hoeringsportal_forms
25+ - hoeringsportal_hearing
26+ - hoeringsportal_openid_connect
27+ - hoeringsportal_project_timeline
28+ - hoeringsportal_public_meeting
29+ - hoeringsportal_quicklinks
30+ - hoeringsportal_test_delta_sync_fixtures
31+
32+ - itk_admin
33+ - itk_admin_links
34+
35+ # - itk_media_entity
36+ # - migrate_subject_data
37+
38+ TRANSLATION_THEMES :
39+ # Run `ls web/themes/custom/*/*.info.yml | xargs basename -s '.info.yml'` to get this []
40+ - hoeringsportal
41+
42+ # - hoeringsportal_admin
43+
44+ TRANSLATION_LANGUAGES :
45+ - da
46+
47+ # During testing and development, you can override TRANSLATION_MODULES and TRANSLATION_THEMES to not process all modules and themes, e.g.
48+ #
49+ # TRANSLATION_MODULES:
50+ # - hoeringsportal_citizen_proposal
51+ #
52+ # TRANSLATION_THEMES: []
853
954vars :
1055 # https://taskfile.dev/reference/templating/
1661 PRETIX_URL : ' {{.TASK_PRETIX_URL | default "http://pretix.hoeringsportal.local.itkdev.dk"}}'
1762 PRETIX_ORGANIZER : ' {{.TASK_PRETIX_ORGANIZER | default "dpl-cms"}}'
1863
19- TRANSLATION_MODULES :
20- # Run `ls web/modules/custom/*/*.info.yml | xargs basename -s '.info.yml'` to get this list
21- - aarhus_hero
22-
23- # Only used for development.
24- # - hoeringsportal_base_fixtures
25-
26- - hoeringsportal_citizen_proposal
27- - hoeringsportal_citizen_proposal_archiving
28- - hoeringsportal_config_settings
29- - hoeringsportal_content_access
30- - hoeringsportal_content_blocks
31- - hoeringsportal_data
32- - hoeringsportal_deskpro
33- - hoeringsportal_forms
34- - hoeringsportal_hearing
35- - hoeringsportal_openid_connect
36- - hoeringsportal_project_timeline
37- - hoeringsportal_public_meeting
38- - hoeringsportal_quicklinks
39- - hoeringsportal_test_delta_sync_fixtures
40-
41- - itk_admin
42- - itk_admin_links
43-
44- # - itk_media_entity
45- # - migrate_subject_data
46-
47- TRANSLATION_THEMES :
48- # Run `ls web/themes/custom/*/*.info.yml | xargs basename -s '.info.yml'` to get this []
49- - hoeringsportal
50-
51- # - hoeringsportal_admin
52-
53- # # During testing and development, you can override TRANSLATION_MODULES and TRANSLATION_THEMES to not process all modules and themes, e.g.
54- # #
55- TRANSLATION_MODULES :
56- - hoeringsportal_citizen_proposal
57-
58- TRANSLATION_THEMES : []
59-
6064tasks :
6165 default :
6266 cmds :
7276 - task composer-install
7377 - task assets-build
7478 - task drush -- --yes site:install --existing-config
75- - task : translations :import
79+ - task : translation :import
7680 - task drush -- --yes cache:rebuild
7781 - task site-open
7882 - task site-open-admin
8589 - task composer-install
8690 - task assets-build
8791 - task drush -- deploy
88- - task : translations :import
92+ - task : translation :import
8993 - task drush -- --yes cache:rebuild
9094 silent : true
9195
@@ -286,20 +290,3 @@ tasks:
286290 - task drush -- --yes pm:uninstall content_fixtures
287291 - task compose-up
288292 silent : true
289-
290- translations:import :
291- cmds :
292- - task compose -- exec phpfpm bash -c '(cd web && ../vendor/bin/drush locale:import --type=customized --override=all da ../translations/custom-translations.da.po)'
293- - task drush -- php:eval "var_export(\Drupal::state()->get('locale.translation.formulae', []))"
294- - ' task drush -- php:eval "var_export(array_map(static fn (\$count) => (new \Drupal\Core\StringTranslation\PluralTranslatableMarkup(\$count, '' 1 item'' , '' @count items'' , options: ['' langcode'' => '' da'' ]))->render(), range(0, 5)));"'
295- - ' task drush -- php:eval "var_export(array_map(static fn (\$count) => (new \Drupal\Core\StringTranslation\PluralTranslatableMarkup(\$count, '' 1 item'' , '' @count items'' , options: ['' langcode'' => '' en'' ]))->render(), range(0, 5)));"'
296- silent : true
297-
298- translations:export :
299- cmds :
300- - task compose -- exec phpfpm bash -c '(cd web && ../vendor/bin/drush locale:export da --types=customized > ../translations/custom-translations.da.po)'
301- # Fix plurals spec in PO file
302- # https://drupalsun.com/eelke/2020/08/17/tale-mistranslated-plurals
303- # https://www.drupal.org/project/drupal/issues/3496223
304- - ' task compose -- exec phpfpm sed -i "s/Plural-Forms: nplurals=2; plural=(n > 1);/Plural-Forms: nplurals=2; plural=(n != 1);/" translations/custom-translations.da.po'
305- silent : true
0 commit comments