File tree Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Original file line number Diff line number Diff line change
1
+ import { useTranslation } from "next-i18next"
1
2
import {
2
3
CurrentRefinements ,
3
4
Hits ,
@@ -106,6 +107,8 @@ const Layout: FC<
106
107
const hierarchicalMenu = useBillHierarchicalMenu ( )
107
108
const status = useSearchStatus ( )
108
109
110
+ const { t } = useTranslation ( "billSearch" )
111
+
109
112
return (
110
113
< SearchContainer >
111
114
< Row >
@@ -132,9 +135,9 @@ const Layout: FC<
132
135
/>
133
136
{ status === "empty" ? (
134
137
< NoResults >
135
- Your search has yielded zero results!
138
+ { t ( "zero_results" ) }
136
139
< br />
137
- < b > Try another search term </ b >
140
+ < b > { t ( "another_term" ) } </ b >
138
141
</ NoResults >
139
142
) : (
140
143
< Hits hitComponent = { BillHit } />
Original file line number Diff line number Diff line change @@ -3,6 +3,19 @@ import { RefinementListItem } from "instantsearch.js/es/connectors/refinement-li
3
3
import { useCallback } from "react"
4
4
import { useRefinements } from "../useRefinements"
5
5
6
+ // for legacy code purposes, things like:
7
+ //
8
+ // `legislative session` and `session`
9
+ //
10
+ // are used by variables that are named things like:
11
+ //
12
+ // `general court` and `court`
13
+ //
14
+ // see example below:
15
+ //
16
+ // attribute: "court",
17
+ // searchablePlaceholder: "Legislative Session",
18
+
6
19
export const useBillRefinements = ( list : Number ) => {
7
20
const baseProps = { limit : 500 , searchable : true }
8
21
const propsList1 = [
Original file line number Diff line number Diff line change
1
+ import { useTranslation } from "next-i18next"
1
2
import { Container } from "components/bootstrap"
2
3
import { createPage } from "components/page"
3
4
import { BillSearch } from "components/search"
@@ -6,9 +7,11 @@ import { createGetStaticTranslationProps } from "components/translations"
6
7
export default createPage ( {
7
8
title : "Browse Bills" ,
8
9
Page : ( ) => {
10
+ const { t } = useTranslation ( "billSearch" )
11
+
9
12
return (
10
13
< Container fluid = "md" className = "mt-3" >
11
- < h1 > Browse Bills </ h1 >
14
+ < h1 > { t ( "browse_bills" ) } </ h1 >
12
15
< BillSearch />
13
16
</ Container >
14
17
)
@@ -17,6 +20,7 @@ export default createPage({
17
20
18
21
export const getStaticProps = createGetStaticTranslationProps ( [
19
22
"auth" ,
23
+ "billSearch" ,
20
24
"common" ,
21
25
"footer" ,
22
26
"testimony"
Original file line number Diff line number Diff line change
1
+ {
2
+ "another_term" : " Try another search term" ,
3
+ "browse_bills" : " Browse Bills" ,
4
+ "zero_results" : " Your search has yielded zero results!"
5
+ }
You can’t perform that action at this time.
0 commit comments