Skip to content

Commit

Permalink
fix: make error summary title localisable
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Sep 20, 2020
1 parent df5067d commit aea81a4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/endpoint-share/views/share.njk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "form.njk" %}

{% from "preview/macro.njk" import preview %}
{% set errorSummaryTitle = __("errorSummaryTitle") %}

{% block fieldset %}
{{ preview({
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/layouts/form.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<form class="form" method="post">
{{ errorSummary({
title: {
text: "There is a problem"
text: errorSummaryTitle or "There is a problem"
},
errorList: errors | errorList
}) | indent(8) if errors }}
Expand Down
1 change: 1 addition & 0 deletions packages/indiekit/locales/de.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export const de = {
error: 'Error',
errorSummaryTitle: 'Es gibt ein Problem',
noValue: 'Nicht vorgesehen',
optionalValue: '(Optional)',
guidance: {
Expand Down
1 change: 1 addition & 0 deletions packages/indiekit/locales/en.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export const en = {
error: 'Error',
errorSummaryTitle: 'There is a problem',
noValue: 'Not set',
optionalValue: '(optional)',
guidance: {
Expand Down

0 comments on commit aea81a4

Please sign in to comment.