@@ -39,17 +39,20 @@ export function findTranslation(
3939) : Promise < AustrianTranslation | undefined > {
4040 const normalized = austrian . trim ( ) . toLowerCase ( ) ;
4141 const withoutWhitespace = normalized . replace ( / [ ^ \w \s ] / gu, "" ) ;
42- return ctx
43- . selectFrom ( "austrianTranslations" )
44- . where ( ( { eb, or } ) =>
45- or ( [
46- // we want like to be case-insensitive, we don't need a placeholder
47- // We might have translations with punctuations in it, so we simply try to match the whole string against it
48- eb ( "austrian" , "like" , normalized ) ,
49- // If we couldn't find a translation with the punctuations in it, we remove the special chars
50- eb ( "austrian" , "like" , withoutWhitespace ) ,
51- ] ) ,
52- )
53- . selectAll ( )
54- . executeTakeFirst ( ) ;
42+ return (
43+ ctx
44+ . selectFrom ( "austrianTranslations" )
45+ // oxlint-disable-next-line typescript/unbound-method
46+ . where ( ( { eb, or } ) =>
47+ or ( [
48+ // we want like to be case-insensitive, we don't need a placeholder
49+ // We might have translations with punctuations in it, so we simply try to match the whole string against it
50+ eb ( "austrian" , "like" , normalized ) ,
51+ // If we couldn't find a translation with the punctuations in it, we remove the special chars
52+ eb ( "austrian" , "like" , withoutWhitespace ) ,
53+ ] ) ,
54+ )
55+ . selectAll ( )
56+ . executeTakeFirst ( )
57+ ) ;
5558}
0 commit comments