Skip to content
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

SLB-269: finish multilingual features #139

Merged
merged 36 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
015df10
feat(SLB-269): add locale arguments to content hub schema
pmelab Feb 7, 2024
f124738
fix: clear content hub queries on all node changes
pmelab Feb 7, 2024
7bdb805
feat(SLB-269): implement content hub locale filter in drupal
pmelab Feb 7, 2024
c8d4461
feat(SLB-269): pass current locale into content hub operation
pmelab Feb 7, 2024
7835ca2
feat(SLB-269): render a content hub page for each language
pmelab Feb 7, 2024
164d30a
test(SLB-269): multilingual content hub integration test
pmelab Feb 7, 2024
c4e212f
feat(SLB-269): translations context for dynamically updating the lang…
pmelab Feb 8, 2024
ddb5bd5
feat(SLB-269): add language switcher component
pmelab Feb 8, 2024
2c185c4
feat(SLB-269): initialize the language switcher from routes
pmelab Feb 8, 2024
b7572b4
refactor: remove leftover debug log
pmelab Feb 8, 2024
ba6c2c6
test(SLB-269): language switcher integration tests
pmelab Feb 8, 2024
bfe1a89
test: add content hub full page story
pmelab Feb 8, 2024
8fe8341
fix: wrong footer navigation
pmelab Feb 8, 2024
7150934
test: menu integration tests
pmelab Feb 8, 2024
df69c17
chore(SLB-269): upgrade @amazeelabs/gatsby-source-silverback
pmelab Feb 8, 2024
3282caf
test(SLB-269): example data for a multilingual decap page
pmelab Feb 8, 2024
e4015b5
fix(SLB-269): make decap page sourcing compatible to multilingual pages
pmelab Feb 8, 2024
403c2fb
feat(SLB-269): gatsby directive to retrieve decap translations
pmelab Feb 8, 2024
deb45ea
test(SLB-269): integration tests for translated decap pages
pmelab Feb 8, 2024
ccb4a12
feat(SLB-269): import translations when prepping database
pmelab Feb 10, 2024
0e42a37
feat(SLB-269): translate interface strings in decap
pmelab Feb 13, 2024
30ad655
feat(SLB-269): graphql schema for translatable strings
pmelab Feb 13, 2024
faab9ad
refactor: upgrade graphql directives module and use simpler @value di…
pmelab Feb 13, 2024
ab1e6fe
feat(SLB-269): source translatable strings into gatsby datastore
pmelab Feb 13, 2024
da0e975
feat(SLB-269): inject translation strings into ui
pmelab Feb 13, 2024
4d663d7
test(SLB-269): integration tests for translation strings
pmelab Feb 13, 2024
cc66d7a
refactor: fix wrong variable naming in menu integration test
pmelab Feb 13, 2024
9379a3f
test(SLB-269): integration tests for translation strings
pmelab Feb 13, 2024
5e4447d
chore(SLB-269): update @amazeelabs/gatsby-source-silverback
pmelab Feb 16, 2024
7d5fc1e
chore(SLB-269): add temporary copies of new directives
pmelab Feb 16, 2024
3cf2db1
feat(SLB-269): source and render drupal translation strings
pmelab Feb 16, 2024
4acc173
test(SLB-269): test case for translation strings from drupal
pmelab Feb 16, 2024
378c95c
chore: lockfile update after rebase
pmelab Feb 16, 2024
ec9e50e
fix: missing directive declaration file
pmelab Feb 16, 2024
55e1dd6
refactor(SLB-269): switch to shared @translatableString directive
pmelab Feb 16, 2024
d033d5d
refactor(SLB-269): switch to shared @translatableString directive
pmelab Feb 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apps/cms/prep-database.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
if [ ! -z $LAGOON ]
then
if [ ! -z $LAGOON ]; then
# Do not touch database on Lagoon
exit 0
fi

if ! test -f web/sites/default/files/.sqlite
then
if ! test -f web/sites/default/files/.sqlite; then
pnpm drupal-install
pnpm export-webforms
else
pnpm drush cr
fi

# In any case, re-import translation string.
pnpm import-translations
Leksat marked this conversation as resolved.
Show resolved Hide resolved
pnpm drush cr
14 changes: 12 additions & 2 deletions apps/cms/scripts/translations-import.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?php
/** @var \Drupal\silverback_translations\TranslationsProcessorInterface $processor */

/**
* @file
* Import translation strings from the ui package.
*/

/**
* The translations processor for importing.
*
* @var \Drupal\silverback_translations\TranslationsProcessorInterface $processor.
*/
$processor = \Drupal::service('silverback_translations.json_processor');
$sources = file_get_contents('../generated/translations.json');
$sources = file_get_contents('../node_modules/@custom/ui/build/translatables.json');
$processor->createSources($sources, 'gatsby');