From c89c09220c5cff54a5e902a716269372b0c8f2ff Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Thu, 5 Oct 2023 14:57:07 -0700 Subject: [PATCH] refactor(i18n): use consistent naming (searchTerm over searchString) --- dev/test-studio/plugins/locale-no-nb/bundles/studio.ts | 2 +- .../core/form/inputs/ReferenceInput/ReferenceAutocomplete.tsx | 2 +- packages/sanity/src/core/i18n/bundles/studio.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/test-studio/plugins/locale-no-nb/bundles/studio.ts b/dev/test-studio/plugins/locale-no-nb/bundles/studio.ts index 285c61dbfbd6..8caeba408eb2 100644 --- a/dev/test-studio/plugins/locale-no-nb/bundles/studio.ts +++ b/dev/test-studio/plugins/locale-no-nb/bundles/studio.ts @@ -140,7 +140,7 @@ const studioResources: Record = { /** Message shown when no documents were found that matched the given search string */ 'inputs.reference.no-results-for-query': - 'Ingen resultater for «{{searchString}}»', + 'Ingen resultater for «{{searchTerm}}»', /** Label for action to create a new document from the reference input */ 'inputs.reference.action.create-new-document': 'Opprett ny', diff --git a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceAutocomplete.tsx b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceAutocomplete.tsx index 0f4e2dda6f2c..c0cedaf18366 100644 --- a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceAutocomplete.tsx +++ b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceAutocomplete.tsx @@ -59,7 +59,7 @@ export const ReferenceAutocomplete = forwardRef(function ReferenceAutocomplete( t={t} i18nKey="inputs.reference.no-results-for-query" components={{SearchTerm: ({children}) => {children}}} - values={{searchString: props.searchString || ''}} + values={{searchTerm: props.searchString || ''}} /> diff --git a/packages/sanity/src/core/i18n/bundles/studio.ts b/packages/sanity/src/core/i18n/bundles/studio.ts index 2e34c24ad1d0..13825814a2df 100644 --- a/packages/sanity/src/core/i18n/bundles/studio.ts +++ b/packages/sanity/src/core/i18n/bundles/studio.ts @@ -250,7 +250,7 @@ export const studioLocaleStrings = { /** Message shown when no documents were found that matched the given search string */ 'inputs.reference.no-results-for-query': - 'No results for “{{searchString}}”', + 'No results for “{{searchTerm}}”', /** Label for action to create a new document from the reference input */ 'inputs.reference.action.create-new-document': 'Create new',