Skip to content

Commit

Permalink
Add missing text extractions
Browse files Browse the repository at this point in the history
Adding some missing text extractions that were spotted by
@bogdanadrianmarc during PR review

Github issue #233
  • Loading branch information
ijdickinson committed Aug 13, 2020
1 parent 1395af1 commit f98c1dc
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/javascript/components/compare-selection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default {
prompt() {
const label = this.selectedLocation ? this.selectedLocation.labels[this.$locale] : '';
return `Select an area to compare against ${label}`;
return this.$t('js.compare.action_prompt', { location: label });
}
},
Expand Down
12 changes: 6 additions & 6 deletions app/javascript/components/data-view-dates.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<el-button
@click='onChangeDates'
class='c-options-selection__button'
title='change start or end date'
:title='$t("js.dates_picker.select_dates")'
>
{{ fromDateFormatted }}
{{ $t('preposition.to') }}
Expand All @@ -14,14 +14,14 @@
</span>

<el-dialog
title='Change the date range'
:title='$t("js.dates_picker.date_range_prompt")'
:visible.sync='dialogVisible'
:show-close='true'
>
<el-row>
<el-col :span='12'>
<label>
Start<span class='u-sr-only'>dd/mm/yyyy day two digits, month two digits, year four digits</span>:
{{ $t("js.dates_picker.start") }}<span class='u-sr-only'>{{ $t('browse.edit.form.dates_format_sr') }}</span>:
<el-date-picker
v-model='newFromDate'
type='month'
Expand All @@ -31,7 +31,7 @@
</el-col>
<el-col :span='12'>
<label>
End<span class='u-sr-only'>dd/mm/yyyy day two digits, month two digits, year four digits</span>:
{{ $t("js.dates_picker.end") }}<span class='u-sr-only'>{{ $t('browse.edit.form.dates_format_sr') }}</span>:
<el-date-picker
v-model='newToDate'
type='month'
Expand All @@ -49,8 +49,8 @@
</p>
</el-row>
<span slot='footer' class='dialog-footer'>
<el-button @click='dialogVisible = false'>Cancel</el-button>
<el-button type='primary' @click='onSaveChanges'>Confirm</el-button>
<el-button @click='dialogVisible = false'>{{ $t("js.action.cancel") }}</el-button>
<el-button type='primary' @click='onSaveChanges'>{{ $t("js.action.confirm") }}</el-button>
</span>
</el-dialog>
</div>
Expand Down
5 changes: 3 additions & 2 deletions app/views/compare/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@
%input{ type: 'hidden', name: 'location[]', value: location.gss }

%li.c-compare__add-location
Add another location:
= t('compare.show.add_location')
%input{ type: 'text', name: 'location-term', value: @view_state.search_term }
%button{ type: 'submit', value: 'search', name: 'form-action' }
= t('action.search')

- if @view_state.search_results
%p Search results:
%p
= t('compare.show.search_results')
%ul.c-compare__search_results
- @view_state.search_results.each do |location|
%li
Expand Down
9 changes: 9 additions & 0 deletions config/locales/cy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ cy:
show:
heading: "[cy] Compare UKHPI statistics across locations"
prompt: "[cy] Select up to five locations to compare any UKHPI statistic, for a range of dates."
add_location: "[cy] Add another location:"
search_results: "[cy] Search results:"

print:
locations_summary: "[cy] #{n_locations} locations"
unavailable: "[cy] We're sorry, #{indicator_name} is not available for #{statistic_name}."
Expand Down Expand Up @@ -181,6 +184,7 @@ cy:
license: "[cy] This data is licensed under the terms of the <a href='http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3'>Open Government License</a>."

compare:
action_prompt: "[cy] Select an area to compare against %{location}"
prompt: "[cy] You can see how %{selectedLocationLabel} compares to other places:"
select_action: "[cy] select another location"
compare_action: "[cy] Compare"
Expand All @@ -196,6 +200,11 @@ cy:
csv_format: "[cy] CSV (spreadsheet)"
json_format: "[cy] JSON"

dates_picker:
select_dates: "[cy] change start or end date"
date_range_prompt: "[cy] Change the date range"
start: "[cy] Start:"
end: "[cy] End:"

# old-------------

Expand Down
9 changes: 9 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ en:
show:
heading: "Compare UKHPI statistics across locations"
prompt: "Select up to five locations to compare any UKHPI statistic, for a range of dates."
add_location: "Add another location:"
search_results: "Search results:"

print:
locations_summary: "#{n_locations} locations"
unavailable: "We're sorry, #{indicator_name} is not available for #{statistic_name}."
Expand Down Expand Up @@ -181,6 +184,7 @@ en:
license: "This data is licensed under the terms of the <a href='http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3'>Open Government License</a>."

compare:
action_prompt: "Select an area to compare against %{location}"
prompt: "You can see how %{selectedLocationLabel} compares to other places:"
select_action: "select another location"
compare_action: "Compare"
Expand All @@ -196,6 +200,11 @@ en:
csv_format: "CSV (spreadsheet)"
json_format: "JSON"

dates_picker:
select_dates: "change start or end date"
date_range_prompt: "Change the date range"
start: "Start:"
end: "End:"

# old-------------

Expand Down

0 comments on commit f98c1dc

Please sign in to comment.