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-9588: Add missing translations and fix broken ones to event search #923

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/js/linkedevents.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/js/react/apps/linkedevents/containers/FormContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ function FormContainer() {
};

const bothCheckboxes = showFreeFilter && showRemoteFilter;
const showOnlyLabel = Drupal.t('Show only', {}, { context: 'Event search: event type prefix' });
const freeTranslation = Drupal.t('Free-of-charge events', {}, { context: 'Event search' });
const remoteTranslation = Drupal.t('Remote events', {}, { context: 'Event search' });
const showOnlyLabel = Drupal.t('Show only', {}, { context: 'Events search: event type prefix' });
const freeTranslation = Drupal.t('Free-of-charge events', {}, { context: 'Events search' });
const remoteTranslation = Drupal.t('Remote events', {}, { context: 'Events search' });
const freeLabel = bothCheckboxes ? freeTranslation : `${showOnlyLabel} ${freeTranslation.toLowerCase()}`;
const remoteLabel = bothCheckboxes ? remoteTranslation : `${showOnlyLabel} ${remoteTranslation.toLowerCase()}`;

Expand All @@ -51,7 +51,7 @@ function FormContainer() {

return (
<form className='hdbt-search--react__form-container' role='search' onSubmit={handleSubmit}>
<HeadingTag className='event-list__filter-title'>{Drupal.t('Filter events', {}, { context: 'Event search: search form title' })}</HeadingTag>
<HeadingTag className='event-list__filter-title'>{Drupal.t('Filter events', {}, { context: 'Events search: search form title' })}</HeadingTag>
<div className='event-form__filters-container'>
<div className='event-form__filter-section-container'>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function ResultsContainer({ countNumber, events, loading, error }: ResultsContai
<ResultsHeader
resultText={
<>
{ Drupal.formatPlural(count, '1 event', '@count events',{},{context: 'Event search: result count'}) }
{ Drupal.formatPlural(count, '1 event', '@count events',{},{context: 'Events search: result count'}) }
</>
}
ref={scrollTarget}
Expand Down
2 changes: 1 addition & 1 deletion src/js/react/apps/linkedevents/helpers/GetDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import HDS_DATE_FORMAT from '../utils/HDS_DATE_FORMAT';

const getDateString = ({ startDate, endDate }: DateSelectDateTimes): string => {
if ((!startDate || !startDate.isValid) && (!endDate || !endDate.isValid)) {
return Drupal.t('All', {}, { context: 'Event search' });
return Drupal.t('All', {}, { context: 'Events search' });
}

if ((startDate && startDate.isValid) && (!endDate || !endDate.isValid)) {
Expand Down
10 changes: 9 additions & 1 deletion translations/fi.po
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ msgctxt "Time of event"
msgid "Time"
msgstr "Aika"

msgctxt "Event search: result count"
msgctxt "Events search: result count"
msgid "1 event"
msgid_plural "@count events"
msgstr[0] "1 tapahtuma"
Expand Down Expand Up @@ -1135,6 +1135,14 @@ msgctxt "Events search"
msgid "Refine search in tapahtumat.hel.fi"
msgstr "Tarkenna hakua tapahtumat.hel.fi:ssä"

msgctxt "Events search: event type prefix"
msgid "Show only"
msgstr "Näytä vain"

msgctxt "Events search: search form title"
msgid "Filter events"
msgstr "Etsi tapahtumia"

msgctxt "React search: submit button label"
msgid "Search"
msgstr "Etsi"
Expand Down
10 changes: 9 additions & 1 deletion translations/sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ msgctxt "Time of event"
msgid "Time"
msgstr "Tid"

msgctxt "Event search: result count"
msgctxt "Events search: result count"
msgid "1 event"
msgid_plural "@count events"
msgstr[0] "1 evenemang"
Expand Down Expand Up @@ -1137,6 +1137,14 @@ msgctxt "Events search"
msgid "Refine search in tapahtumat.hel.fi"
msgstr "Förfina sökningen i tapahtumat.hel.fi"

msgctxt "Events search: event type prefix"
msgid "Show only"
msgstr "Visa endast"

msgctxt "Events search: search form title"
msgid "Filter events"
msgstr "Filtrera evenemang"

msgctxt "React search: submit button label"
msgid "Search"
msgstr "Sök"
Expand Down
Loading