Skip to content

Commit

Permalink
fix: add more slots for i18n (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
bleucitron committed Aug 9, 2023
1 parent 14f1205 commit 9e0b164
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/good-boxes-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/site-kit': patch
---

add more i18n slots
5 changes: 3 additions & 2 deletions packages/site-kit/src/lib/search/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Renders a search widget which when clicked (or the corresponding keyboard shortc
import { search_query, searching } from '../stores/search.js';
export let q = '';
export let label = 'Search';
</script>

<form class="search-container" action="/search">
Expand All @@ -20,8 +21,8 @@ Renders a search widget which when clicked (or the corresponding keyboard shortc
on:touchend|preventDefault={() => ($searching = true)}
type="search"
name="q"
placeholder="Search"
aria-label="Search"
placeholder={label}
aria-label={label}
spellcheck="false"
/>

Expand Down
2 changes: 1 addition & 1 deletion packages/site-kit/src/lib/search/SearchResults.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Renders a list of search results
{#if results.length > 0}
<SearchResultList {results} {query} on:select />
{:else if query}
<p class="info">No results</p>
<p class="info"><slot name="no-results">No results</slot></p>
{/if}

<style>
Expand Down

0 comments on commit 9e0b164

Please sign in to comment.