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

[P4-536] Update namespace separator for i18n #165

Merged
merged 1 commit into from
Jul 25, 2019
Merged

Conversation

teneightfive
Copy link
Contributor

@teneightfive teneightfive commented Jul 24, 2019

The default namespace separator for the i18n library is currently
:.

This has raised an issue with some strings that don't have translations
including a single colon and therefore looking for a particular
namespace first.

When this is not found it removes that first part of the string
and doesn't fallback to the full string.

This caused an issue with NOMIS imported ethnicities which included
a single colon.

This change replaces the single colon with a double with the
assumption that this will less likely occur in fallback strings.

Note: open to other suggestions regarding alternative namespace
separator

@teneightfive teneightfive self-assigned this Jul 24, 2019
@teneightfive teneightfive changed the title Update namespace separator for i18n [P4-536] Update namespace separator for i18n Jul 24, 2019
@@ -73,7 +73,7 @@ module.exports = {
'/health-information': {
controller: Assessment,
next: 'save',
heading: 'moves:steps.health_information.heading',
heading: 'moves::steps.health_information.heading',
buttonText: 'actions:schedule_move',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missed one

The default namespace separator for the i18n library is currently
`:`.

This has raised an issue with some strings that don't have translations
including a single colon and therefore looking for a particular
namespace first.

When this is not found it removes that first part of the string
and doesn't fallback to the full string.

This caused an issue with NOMIS imported ethnicities which included
a single colon.

This change replaces the single colon with a double with the
assumption that this will less likely occur in fallback strings.
@codeclimate
Copy link

codeclimate bot commented Jul 25, 2019

Code Climate has analyzed commit 2e6032b and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 98.1% (0.0% change).

View more on Code Climate.

@teneightfive teneightfive merged commit ae14195 into master Jul 25, 2019
@teneightfive teneightfive deleted the patch/typeahead branch July 25, 2019 10:29
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.

None yet

2 participants