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

UHF-9388 Translations in optional folder #662

Merged
merged 2 commits into from
Dec 7, 2023

Conversation

khalima
Copy link
Contributor

@khalima khalima commented Dec 5, 2023

UHF-9388

The whole idea of this PR is to solve the recursion problem when installing a Drupal instance from scratch. The logs will get over 100K lines of "Deleted and replaced configuration" errors.

What was done

  • Added patch to support translations from ./config/optional/translations/{langcode} folders
  • Moved all translations to optional/language

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the Helfi Platform config
    • composer require drupal/helfi_platform_config:dev-UHF-9388_optional_translations -W
    • Check that the patch gets installed, if it's not installed run an extra composer install to make sure that it gets installed
  • Run make drush-updb drush-cr

How to test

  • Check that the site install works as before
  • Go to some submodule of platform config and change any translations to test content
  • Run make drush-updb drush-cr drush-cex
  • Login to the site if you haven't already and change your user interface language to the one which configuration files you fiddled. Then check that all those fields have changed their labels. F.e. If you changed lower content field label to "Testi", it should be labeled "Testi" when you try to create a new standard page.
  • Finally check the changed configuration files for the same changes. git diff conf/cmi/language
  • Check that code follows our standards

Bonus

  • Run make new with the platform config UHF-9388_optional_translations installed and check that there is no hundreds of lines of this
    image

Bonus 2

  • Create a new project composer create-project City-of-Helsinki/drupal-helfi-platform:dev-UHF-9388_optional_translations yoursite --no-interaction --repository https://repository.drupal.hel.ninja/
  • Run cd yoursite and make new. Once it's done, go and check that the site is translated and all content types have been created.
  • If you want to, you can also check the test content, Run make shell and drush en -y helfi_test_content

Copy link

sonarqubecloud bot commented Dec 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3af5b9f) 13.07% compared to head (3433458) 13.07%.

❗ Current head 3433458 differs from pull request most recent head a099193. Consider uploading reports for the commit a099193 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #662   +/-   ##
=========================================
  Coverage     13.07%   13.07%           
  Complexity      241      241           
=========================================
  Files            28       28           
  Lines           941      941           
=========================================
  Hits            123      123           
  Misses          818      818           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@khalima khalima mentioned this pull request Dec 7, 2023
2 tasks
@khalima khalima marked this pull request as ready for review December 7, 2023 09:50
Copy link
Contributor

@teroelonen teroelonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just perfect 🦖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants