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 8164 calculator translations #604

Merged
merged 6 commits into from
Mar 30, 2023
Merged

Conversation

Arkkimaagi
Copy link
Contributor

@Arkkimaagi Arkkimaagi commented Mar 28, 2023

UHF-8164

  • We have received the first calculator translations and they need to be implemented asap

What was done

  • First calculator translations were added with also global translations
  • Some minor logic fixes to cater to translation needs
  • Finetuned minimum value of free days as requested

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the HDBT theme
    • composer require drupal/hdbt:dev-UHF-8164_calculator_translations
  • Run make drush-cr
  • Enable calculator module in console: drush en helfi_calculator
  • Add calculator paragraph to upper and lower content area in /admin/structure/types/manage/page/fields
  • Enable "Daycare payment"-calculator from /admin/tools/calculator-settings and add Calculator data from below:
    image
CLICK ME! Daycare payment

Calculator data for "Daycare payment"

{
  "family_size_income_limits": {
    "2": {
      "min": 3874,
      "max": 6626
    },
    "3": {
      "min": 4998,
      "max": 7750
    },
    "4": {
      "min": 5675,
      "max": 8427
    },
    "5": {
      "min": 6353,
      "max": 9105
    },
    "6": {
      "min": 7028,
      "max": 9780
    }
  },
  "family_size_beyond_defined_multiplier_euro": 262,
  "minimum_payment_euro": 28,
  "payment_percentage": 10.7,
  "child_1_max_euro": 295,
  "child_2_percent": 40,
  "child_n_percent": 20,
  "discounts": {
    "early_education_on_weekdays": {
      "over_7_hours_percentage": 100,
      "over_5_and_at_most_7_hours_percentage": 80,
      "at_most_5_hours_percentage": 60
    },
    "for_5_year_old": {
      "over_7_hours_percentage": 65,
      "over_5_and_at_most_7_hours_percentage": 40,
      "over_4_and_at_most_5_hours_percentage": 20,
      "at_most_4_hours_percentage": 0
    },
    "for_6_year_old": {
      "over_7_hours_percentage": 65,
      "from_7_to_8_hours_percentage": 60,
      "over_5_and_at_most_7_hours_percentage": 40,
      "at_most_5_hours_percentage": 20
    },
    "round_the_clock_care": {
      "from_161_hours_percentage": 100,
      "from_101_to_160_hours_percentage": 80,
      "from_61_to_100_hours_percentage": 60
    },
    "round_the_clock_care_with_preschool": {
      "from_161_hours_percentage": 65,
      "from_101_to_160_hours_percentage": 40,
      "from_61_to_100_hours_percentage": 20
    },
    "free_day_percentage": 4
  }
}
* Add calculator to a page, select "Daycare payment" from dropdown. ![image](https://user-images.githubusercontent.com/1191667/228743909-c1823e6d-8650-4182-8ea3-650e7d756c14.png)
  • Add swedish and english translations of the same page with the calculator

How to test

  • Check that translations work in main languages (fi, sv, en)
  • Check that code follows our standards

Designers review

  • This PR does not need designers review

@Arkkimaagi Arkkimaagi force-pushed the UHF-8164_calculator_translations branch from 344901f to 3ef6401 Compare March 28, 2023 05:15
@Arkkimaagi Arkkimaagi force-pushed the UHF-7484_service_housing_service_voucher branch from 4425a9f to 2864705 Compare March 28, 2023 05:49
Base automatically changed from UHF-7484_service_housing_service_voucher to main March 28, 2023 06:00
@Arkkimaagi Arkkimaagi force-pushed the UHF-8164_calculator_translations branch from 3ef6401 to 2986bc5 Compare March 28, 2023 06:20
@Arkkimaagi Arkkimaagi force-pushed the UHF-8164_calculator_translations branch from 2986bc5 to 097ba6d Compare March 28, 2023 06:31
@Arkkimaagi Arkkimaagi marked this pull request as ready for review March 30, 2023 06:05
@Arkkimaagi Arkkimaagi mentioned this pull request Mar 30, 2023
3 tasks
@juho-lehmonen juho-lehmonen self-requested a review March 30, 2023 06:35
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.

2 participants