Skip to content
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 lxl-web/src/lib/components/find/FacetRange.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
class="btn btn-primary size-8"
disabled={!rangeFrom && !rangeTo}
type="submit"
aria-label={page.data.t('general.apply')}
aria-label={page.data.t('search.search')}
>
<BiSearch class="text-base" />
</button>
Expand Down
11 changes: 8 additions & 3 deletions lxl-web/src/lib/components/my-pages/Libraries.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import { onMount } from 'svelte';
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import { page } from '$app/state';
import { SvelteURLSearchParams } from 'svelte/reactivity';
import { getUserSettings } from '$lib/contexts/userSettings';
Expand Down Expand Up @@ -51,7 +52,10 @@
params.set('_r', page.url.searchParams.get('_r') as string);
}

goto(page.url.pathname + `?${params.toString()}`, { replaceState: true, keepFocus: true });
goto(resolve(page.url.pathname + `?${params.toString()}`), {
replaceState: true,
keepFocus: true
});
}

let search = useSearchRequest({
Expand Down Expand Up @@ -89,7 +93,7 @@
<div class="flex flex-col-reverse justify-between gap-6 py-2 md:flex-row">
<div class="w-full max-w-xl lg:w-6/12">
<h2 class="mt-4 font-medium">
<label for="my-libraries-search">{page.data.t('myPages.findAndAdd')}</label>
{page.data.t('myPages.findAndAdd')}
</h2>
<div class="relative mt-2">
<input
Expand All @@ -98,6 +102,7 @@
placeholder={page.data.t('myPages.findLibrary')}
class="bg-input h-9 w-full max-w-xl rounded-sm border border-neutral-300 pr-2 pl-8 text-base sm:text-sm"
oninput={handleInputChange}
aria-label={page.data.t('myPages.findLibrary')}
type="search"
/>
<BiSearch class="text-subtle absolute top-0 left-2.5 h-9 text-sm" />
Expand Down Expand Up @@ -136,7 +141,7 @@
<div class="w-full lg:w-6/12">
<h2 id="my-libraries" class="mt-4 flex items-center gap-2 font-medium">
<BiHouseHeart class="libraries-indicator" aria-hidden="true" />
<span>{page.data.t('myPages.favouriteLibraries')}</span>
<span>{page.data.t('myPages.myFavouriteLibraries')}</span>
</h2>
{#if mergedLibraries.length}
<ol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
class={[
'action text-subtle hidden rounded-r-md border-l border-l-neutral-300 sm:flex 2xl:rounded-r-lg'
]}
aria-label={page.data.t('supersearch.search')}
aria-label={page.data.t('search.search')}
>
<IconSearch aria-hidden="true" class={['flex size-4.5']} />
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@
'action rounded-r-md border-l-neutral-300 sm:rounded-r-lg sm:border-l',
isHomeRoute || expanded ? 'hidden sm:flex' : 'flex'
]}
aria-label={page.data.t('supersearch.search')}
aria-label={page.data.t('search.search')}
tabindex={isHomeRoute ? -1 : undefined}
>
<IconSearch aria-hidden="true" class={['flex size-4.5']} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
return page.data.t('supersearch.clear');
}
if (isFocusedRow(inputRowIndex) || isFocusedRow(showAllResultsRowIndex)) {
return page.data.t('supersearch.search');
return page.data.t('search.search');
}
if (isFocusedRow(qualifiersRowIndex)) {
return page.data.t('supersearch.add');
Expand Down
8 changes: 3 additions & 5 deletions lxl-web/src/lib/i18n/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export default {
fjarrlan: 'Fjärrlån',
myPages: 'My pages',
changeLang: 'På svenska',
search: 'Search',
login: 'Log in',
searchPlaceholder: 'Search for title, author, subject...',
searchSubsetPlaceholder: 'Search within',
Expand Down Expand Up @@ -70,8 +69,9 @@ export default {
libraries: 'Libraries',
favouriteLibraries: 'Favourite libraries',
favouriteLibrary: 'favourite library',
myFavouriteLibraries: 'My favourite libraries',
findLibrary: 'Search library or location',
findAndAdd: 'Find and add favourite libraries',
findAndAdd: 'Add favourite libraries',
noResultsFor: 'No results for',
hitsFor: 'hits for',
settingsLinkHeading: 'Permanent link for settings',
Expand Down Expand Up @@ -149,7 +149,7 @@ export default {
exploreCategories: 'Explore categories',
loading: 'Loading...',
filter: 'Filter',
findFilter: 'Find filter',
findFilter: 'Search for filter',
filters: 'Filters',
activeFilter: 'Active filter',
selectedFilters: 'Selected filters',
Expand Down Expand Up @@ -202,7 +202,6 @@ export default {
showEquals: 'Only show exact matches for'
},
supersearch: {
search: 'Search',
addQualifiers: 'Filter',
moreQualifiers: 'More filters',
loading: 'Loading...',
Expand Down Expand Up @@ -258,7 +257,6 @@ export default {
latestInstanceCover: 'Cover of latest edition',
instanceCover: 'Cover of edition',
close: 'Close',
apply: 'Apply',
from: 'From',
to: 'To',
year: 'year',
Expand Down
8 changes: 3 additions & 5 deletions lxl-web/src/lib/i18n/locales/sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default {
fjarrlan: 'Fjärrlån',
myPages: 'Mina sidor',
changeLang: 'In English',
search: 'Sök',
login: 'Logga in',
searchPlaceholder: 'Sök titel, upphovsperson, ämnen...',
searchSubsetPlaceholder: 'Sök inom',
Expand Down Expand Up @@ -69,8 +68,9 @@ export default {
libraries: 'Bibliotek',
favouriteLibraries: 'Favoritbibliotek',
favouriteLibrary: 'favoritbibliotek',
myFavouriteLibraries: 'Mina favoritbibliotek',
findLibrary: 'Sök efter bibliotek',
findAndAdd: 'Hitta och lägg till favoritbibliotek',
findAndAdd: 'Lägg till favoritbibliotek',
noResultsFor: 'Inga sökträffar för',
hitsFor: 'träffar för',
settingsLinkHeading: 'Permanent länk för inställningarna',
Expand Down Expand Up @@ -148,7 +148,7 @@ export default {
exploreCategories: 'Utforska kategorier',
loading: 'Laddar...',
filter: 'Filter',
findFilter: 'Hitta filter',
findFilter: 'Sök efter filter',
filters: 'Sökfilter',
activeFilter: 'Aktivt filter',
selectedFilters: 'Valda filter',
Expand Down Expand Up @@ -201,7 +201,6 @@ export default {
showEquals: 'Visa bara exakta träffar för'
},
supersearch: {
search: 'Sök',
addQualifiers: 'Filter',
moreQualifiers: 'Fler filter',
loading: 'Laddar...',
Expand Down Expand Up @@ -257,7 +256,6 @@ export default {
latestInstanceCover: 'Senaste utgåvans omslag',
instanceCover: 'Utgåvans omslag',
close: 'Stäng',
apply: 'Tillämpa',
from: 'Från',
to: 'Till',
year: 'år',
Expand Down
4 changes: 2 additions & 2 deletions lxl-web/src/routes/(app)/[[lang=lang]]/AppBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@
tabindex={mounted ? undefined : 0}
class="action hover:bg-primary-200"
onclick={handleClickSearchAction}
aria-label={page.data.t('header.search')}
aria-label={page.data.t('search.search')}
aria-labelledby={searchLabelId}
>
{@render actionItemContents({
Icon: IconSearch,
label: page.data.t('header.search'),
label: page.data.t('search.search'),
id: searchLabelId
})}
</svelte:element>
Expand Down
4 changes: 2 additions & 2 deletions lxl-web/src/routes/(app)/[[lang=lang]]/AppSearch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

const action = $derived(page.data.locale === baseLocale ? '/find' : `/${page.data.locale}/find`);

const ariaLabel = $derived(page.data.t('header.search'));
const ariaLabel = $derived(page.data.t('search.search'));
const placeholder: string = $derived(
page.data.subsetMapping
? `${page.data.t('header.searchSubsetPlaceholder')}: ${displayMappingToString(page.data.subsetMapping)}`
Expand Down Expand Up @@ -67,7 +67,7 @@
{placeholder}
collapsedAriaLabelledBy={ariaLabelledBy}
collapsedAriaLabel={ariaLabel}
expandedAriaLabel={page.data.t('header.search')}
expandedAriaLabel={page.data.t('search.search')}
onCursorChange={(value) => (cursor = value)}
qualifierSuggestions={page.data.qualifierSuggestions || []}
{initialValueFromFallback}
Expand Down
Loading