Skip to content

Commit

Permalink
Merge pull request #1497 from govuk-one-login/BAU/remove-cy-feature-flag
Browse files Browse the repository at this point in the history
Bau/remove cy feature flag
  • Loading branch information
BeckaL authored Mar 28, 2024
2 parents 1182317 + 852eec2 commit 181e6f6
Show file tree
Hide file tree
Showing 22 changed files with 40 additions and 85 deletions.
1 change: 0 additions & 1 deletion .env.authdev1
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ VTR=["Cl","Cl.Cm"]
#
SUPPORT_MFA_OPTIONS=1
SUPPORT_INTERNATIONAL_NUMBERS=1
SUPPORT_LANGUAGE_CY=1
SUPPORT_ACCOUNT_RECOVERY=1
SUPPORT_AUTH_ORCH_SPLIT=1
SUPPORT_AUTHORIZE_CONTROLLER=1
Expand Down
1 change: 0 additions & 1 deletion .env.build
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ VTR=["Cl","Cl.Cm"]
#
SUPPORT_MFA_OPTIONS=1
SUPPORT_INTERNATIONAL_NUMBERS=1
SUPPORT_LANGUAGE_CY=1
SUPPORT_ACCOUNT_RECOVERY=1
SUPPORT_AUTH_ORCH_SPLIT=1
SUPPORT_AUTHORIZE_CONTROLLER=1
Expand Down
2 changes: 0 additions & 2 deletions ci/tasks/deploy-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ params:
BASIC_AUTH_PASSWORD: ((no-basic-auth-password))
INCOMING_TRAFFIC_CIDR_BLOCKS: '["0.0.0.0/0"]'
BASIC_AUTH_BYPASS_CIDR_BLOCKS: '[]'
SUPPORT_LANGUAGE_CY: "0"
inputs:
- name: frontend-src
- name: frontend-image
Expand Down Expand Up @@ -72,7 +71,6 @@ run:
-var "sidecar_image_uri=${SIDECAR_IMAGE_URI}" \
-var "sidecar_image_tag=${SIDECAR_IMAGE_TAG}" \
-var "sidecar_image_digest=${SIDECAR_IMAGE_DIGEST}" \
-var "support_language_cy=${SUPPORT_LANGUAGE_CY}" \
-var "basic_auth_username=${NORMALISED_BASIC_AUTH_USERNAME}" \
-var "basic_auth_password=${NORMALISED_BASIC_AUTH_PASSWORD}" \
-var "incoming_traffic_cidr_blocks=${INCOMING_TRAFFIC_CIDR_BLOCKS}" \
Expand Down
1 change: 0 additions & 1 deletion ci/terraform/authdev1.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ service_domain = "authdev1.sandpit.account.gov.uk"
zone_id = "Z062000928I8D7S9X1OVA"
session_expiry = 300000
gtm_id = ""
support_language_cy = "1"
support_account_recovery = "1"
support_auth_orch_split = "1"
support_authorize_controller = "1"
Expand Down
1 change: 0 additions & 1 deletion ci/terraform/authdev2.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ service_domain = "authdev2.sandpit.account.gov.uk"
zone_id = "Z062000928I8D7S9X1OVA"
session_expiry = 300000
gtm_id = ""
support_language_cy = "1"
support_account_recovery = "1"
support_auth_orch_split = "1"
support_authorize_controller = "1"
Expand Down
1 change: 0 additions & 1 deletion ci/terraform/build.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ frontend_task_definition_cpu = 512
frontend_task_definition_memory = 1024

support_international_numbers = "1"
support_language_cy = "1"
support_account_recovery = "1"
support_auth_orch_split = "1"
support_authorize_controller = "1"
Expand Down
1 change: 0 additions & 1 deletion ci/terraform/dev.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ basic_auth_bypass_cidr_blocks = []
deployer_role_arn = "arn:aws:iam::761723964695:role/deployer-role-pipeline-dev"
common_state_bucket = "digital-identity-dev-tfstate"
incoming_traffic_cidr_blocks = ["0.0.0.0/0"]
support_language_cy = "1"
support_account_recovery = "1"
support_international_numbers = "1"

Expand Down
4 changes: 0 additions & 4 deletions ci/terraform/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ locals {
name = "SUPPORT_INTERNATIONAL_NUMBERS"
value = var.support_international_numbers
},
{
name = "SUPPORT_LANGUAGE_CY"
value = var.support_language_cy
},
{
name = "SUPPORT_AUTH_ORCH_SPLIT"
value = var.support_auth_orch_split
Expand Down
1 change: 0 additions & 1 deletion ci/terraform/integration.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ frontend_task_definition_cpu = 512
frontend_task_definition_memory = 1024

support_international_numbers = "1"
support_language_cy = "1"
support_account_recovery = "1"
support_account_interventions = "1"
support_auth_orch_split = "1"
Expand Down
1 change: 0 additions & 1 deletion ci/terraform/sandpit.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ service_domain = "sandpit.account.gov.uk"
zone_id = "Z1031735QZMC84WYW1TP"
session_expiry = 300000
gtm_id = ""
support_language_cy = "1"
support_account_recovery = "1"
support_auth_orch_split = "1"
support_authorize_controller = "1"
Expand Down
1 change: 0 additions & 1 deletion ci/terraform/staging.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ frontend_task_definition_memory = 2048
frontend_auto_scaling_min_count = 4
frontend_auto_scaling_max_count = 240
ecs_desired_count = 4
support_language_cy = "1"
support_international_numbers = "1"
support_account_recovery = "1"
support_account_interventions = "1"
Expand Down
4 changes: 0 additions & 4 deletions ci/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ variable "support_international_numbers" {
type = string
}

variable "support_language_cy" {
type = string
}

variable "support_auth_orch_split" {
type = string
default = "0"
Expand Down
1 change: 0 additions & 1 deletion docker-compose.frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ services:
ANALYTICS_COOKIE_DOMAIN: localhost

SUPPORT_INTERNATIONAL_NUMBERS: ${SUPPORT_INTERNATIONAL_NUMBERS:?this should be set in your .env file.}
SUPPORT_LANGUAGE_CY: ${SUPPORT_LANGUAGE_CY:?this should be set in your .env file.}
SUPPORT_ACCOUNT_RECOVERY: ${SUPPORT_ACCOUNT_RECOVERY:?this should be set in your .env file.}
SUPPORT_AUTH_ORCH_SPLIT: ${SUPPORT_AUTH_ORCH_SPLIT:?this should be set in your .env file.}

Expand Down
30 changes: 12 additions & 18 deletions src/components/prove-identity-welcome/index-existing-session.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,18 @@
<li>{{ 'pages.proveIdentityWelcome.section2.listItem1_3' | translate }}</li>
</ul>

{% if supportLanguageCY %}
{% set insetTextInnerHtml %}
{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.start' | translate }}
<a href="{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkHref' | translate }}"
class="govuk-link"
rel="noreferrer">{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.inPageLanguage' | translate }}
<span lang="{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.destinationLanguageCode' | translate }}">{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.inDestinationLanguage' | translate }}</span></a>.
{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.end' | translate }}
{% endset %}

{{ govukInsetText({
html: insetTextInnerHtml
}) }}
{% else %}
{{ govukInsetText({
text: 'pages.proveIdentityWelcome.section1.insetTextEnglishOnly' | translate
}) }}
{% endif %}
{% set insetTextInnerHtml %}
{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.start' | translate }}
<a href="{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkHref' | translate }}"
class="govuk-link"
rel="noreferrer">{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.inPageLanguage' | translate }}
<span lang="{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.destinationLanguageCode' | translate }}">{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.inDestinationLanguage' | translate }}</span></a>.
{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.end' | translate }}
{% endset %}

{{ govukInsetText({
html: insetTextInnerHtml
}) }}

<form id="form-tracking" action="/prove-identity-welcome" method="post" novalidate="novalidate">

Expand Down
32 changes: 13 additions & 19 deletions src/components/prove-identity-welcome/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,19 @@
<li>{{ 'pages.proveIdentityWelcome.section2.listItem1_3' | translate }}</li>
</ul>

{% if supportLanguageCY %}
{% set insetTextInnerHtml %}
{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.start' | translate }}
<a href="{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkHref' | translate }}"
class="govuk-link"
rel="noreferrer">{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.inPageLanguage' | translate }}
<span lang="{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.destinationLanguageCode' | translate }}">{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.inDestinationLanguage' | translate }}</span></a>.
{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.end' | translate }}

{% endset %}

{{ govukInsetText({
html: insetTextInnerHtml
}) }}
{% else %}
{{ govukInsetText({
text: 'pages.proveIdentityWelcome.section1.insetTextEnglishOnly' | translate
}) }}
{% endif %}
{% set insetTextInnerHtml %}
{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.start' | translate }}
<a href="{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkHref' | translate }}"
class="govuk-link"
rel="noreferrer">{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.inPageLanguage' | translate }}
<span lang="{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.destinationLanguageCode' | translate }}">{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.linkText.inDestinationLanguage' | translate }}</span></a>.
{{ 'pages.proveIdentityWelcome.section1.insetAlternativeLanguage.end' | translate }}

{% endset %}

{{ govukInsetText({
html: insetTextInnerHtml
}) }}

<form id="form-tracking" action="/prove-identity-welcome" method="post" novalidate="novalidate">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ import { Request, Response } from "express";
import { getNextPathAndUpdateJourney } from "../common/constants";
import { USER_JOURNEY_EVENTS } from "../common/state-machine/state-machine";
import { PATH_NAMES } from "../../app.constants";
import { supportLanguageCY } from "../../config";

export function proveIdentityWelcomeGet(req: Request, res: Response): void {
res.render(
req.session.user.isAuthenticated
? "prove-identity-welcome/index-existing-session.njk"
: "prove-identity-welcome/index.njk",
{
supportLanguageCY: supportLanguageCY() ? true : null,
}
: "prove-identity-welcome/index.njk"
);
}

Expand Down
20 changes: 9 additions & 11 deletions src/components/sign-in-or-create/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,15 @@
<li>{{ 'pages.signInOrCreate.bullet2' | translate }}</li>
{% endif %}
</ul>
{% if supportLanguageCY %}
{% set altLangInsetHtml %}
{{ 'pages.signInOrCreate.insetAlternativeLanguage.paragraph1' | translate }}
<a href="{{ 'pages.signInOrCreate.insetAlternativeLanguage.linkHref' | translate }}" class="govuk-link" rel="noreferrer">
{{ 'pages.signInOrCreate.insetAlternativeLanguage.linkText.inPageLanguage' | translate }}
<span lang="{{ 'pages.signInOrCreate.insetAlternativeLanguage.linkText.destinationLanguageCode' | translate }}">{{ 'pages.signInOrCreate.insetAlternativeLanguage.linkText.inDestinationLanguage' | translate }}</span></a>.
{% endset %}
{{ govukInsetText({
html: altLangInsetHtml
}) }}
{% endif %}
{% set altLangInsetHtml %}
{{ 'pages.signInOrCreate.insetAlternativeLanguage.paragraph1' | translate }}
<a href="{{ 'pages.signInOrCreate.insetAlternativeLanguage.linkHref' | translate }}" class="govuk-link" rel="noreferrer">
{{ 'pages.signInOrCreate.insetAlternativeLanguage.linkText.inPageLanguage' | translate }}
<span lang="{{ 'pages.signInOrCreate.insetAlternativeLanguage.linkText.destinationLanguageCode' | translate }}">{{ 'pages.signInOrCreate.insetAlternativeLanguage.linkText.inDestinationLanguage' | translate }}</span></a>.
{% endset %}
{{ govukInsetText({
html: altLangInsetHtml
}) }}

<form action="/sign-in-or-create" method="post" novalidate="novalidate">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Request, Response } from "express";
import { getNextPathAndUpdateJourney } from "../common/constants";
import { USER_JOURNEY_EVENTS } from "../common/state-machine/state-machine";
import { supportInternationalNumbers, supportLanguageCY } from "../../config";
import { supportInternationalNumbers } from "../../config";

export function signInOrCreateGet(req: Request, res: Response): void {
req.session.user.isAccountCreationJourney = false;
Expand All @@ -13,7 +13,6 @@ export function signInOrCreateGet(req: Request, res: Response): void {
res.render("sign-in-or-create/index.njk", {
serviceType: req.session.client.serviceType,
supportInternationalNumbers: supportInternationalNumbers() ? true : null,
supportLanguageCY: supportLanguageCY() ? true : null,
});
}

Expand Down
4 changes: 0 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ export function supportInternationalNumbers(): boolean {
return process.env.SUPPORT_INTERNATIONAL_NUMBERS === "1";
}

export function supportLanguageCY(): boolean {
return process.env.SUPPORT_LANGUAGE_CY === "1";
}

export function supportAccountRecovery(): boolean {
return process.env.SUPPORT_ACCOUNT_RECOVERY === "1";
}
Expand Down
4 changes: 2 additions & 2 deletions src/config/i18next.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LOCALE } from "../app.constants";
import { getServiceDomain, supportLanguageCY } from "../config";
import { getServiceDomain } from "../config";

export function i18nextConfigurationOptions(
path: string
Expand All @@ -8,7 +8,7 @@ export function i18nextConfigurationOptions(
debug: false,
fallbackLng: LOCALE.EN,
preload: [LOCALE.EN],
supportedLngs: supportLanguageCY() ? [LOCALE.EN, LOCALE.CY] : [LOCALE.EN],
supportedLngs: [LOCALE.EN, LOCALE.CY],
backend: {
loadPath: path,
allowMultiLoading: true,
Expand Down
3 changes: 1 addition & 2 deletions src/locales/cy/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2217,8 +2217,7 @@
},
"linkHref": "?lng=en",
"end": ""
},
"insetTextEnglishOnly": "This service is currently only available in English."
}
},
"section2": {
"paragraph1": "Byddwch angen:",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2217,8 +2217,7 @@
},
"linkHref": "?lng=cy",
"end": "Not all ways to prove your identity are available in Welsh yet."
},
"insetTextEnglishOnly": "This service is currently only available in English."
}
},
"section2": {
"paragraph1": "You’ll need:",
Expand Down

0 comments on commit 181e6f6

Please sign in to comment.