Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import {slide} from 'svelte/transition';
import {watch} from 'runed';
import {computeCommandScore} from 'bits-ui';
import {s} from '$lib/i18n';

type Value = ReadonlyDeep<MutableValue>;

Expand Down Expand Up @@ -199,7 +200,7 @@
<div class="flex items-center gap-2 flex-nowrap">
{#if IsMobile.value}
{#if filterValue}
<XButton onclick={() => (filterValue = '')} aria-label={$t`clear`} />
<XButton onclick={() => (filterValue = '')} aria-label={$t(s.clear)} />
{/if}
{:else}
{#if dirty}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import {cn} from '$lib/utils';
import {watch} from 'runed';
import {computeCommandScore} from 'bits-ui';
import {s} from '$lib/i18n';
type Value = ReadonlyDeep<MutableValue>;
Expand Down Expand Up @@ -113,7 +114,7 @@
<div class="flex items-center gap-2 flex-nowrap">
{#if IsMobile.value}
{#if filterValue}
<XButton onclick={() => (filterValue = '')} aria-label={$t`clear`} />
<XButton onclick={() => (filterValue = '')} aria-label={$t(s.clear)} />
{/if}
{:else}
<XButton onclick={dismiss} />
Expand Down
4 changes: 3 additions & 1 deletion frontend/viewer/src/lib/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {locale} from 'svelte-i18n-lingui';
import {createSubscriber} from 'svelte/reactivity';
import {locale} from 'svelte-i18n-lingui';

export * from './strings.svelte'

const hasSetLang = {value: false};
const subscriber = createSubscriber(update => {
Expand Down
10 changes: 10 additions & 0 deletions frontend/viewer/src/lib/i18n/strings.svelte.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {gt} from 'svelte-i18n-lingui';

export const s = {
get clear() {
return gt({
message: 'clear',
comment: 'Button to clear/empty a text field e.g. when filtering for semantic domains',
});
},
};
4 changes: 2 additions & 2 deletions frontend/viewer/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ msgstr "Citation Form"
msgid "Classic FieldWorks Projects"
msgstr "Classic FieldWorks Projects"

#: src/lib/components/field-editors/select.svelte
#: src/lib/components/field-editors/multi-select.svelte
#. Button to clear/empty a text field e.g. when filtering for semantic domains
#: src/lib/i18n/strings.svelte.ts
msgid "clear"
msgstr "clear"

Expand Down
4 changes: 2 additions & 2 deletions frontend/viewer/src/locales/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ msgstr "Formulario de citación"
msgid "Classic FieldWorks Projects"
msgstr "Proyectos clásicos de FieldWorks"

#: src/lib/components/field-editors/select.svelte
#: src/lib/components/field-editors/multi-select.svelte
#. Button to clear/empty a text field e.g. when filtering for semantic domains
#: src/lib/i18n/strings.svelte.ts
msgid "clear"
msgstr "borrar"

Expand Down
6 changes: 3 additions & 3 deletions frontend/viewer/src/locales/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ msgstr "Formulaire de citation"
msgid "Classic FieldWorks Projects"
msgstr "Projets FieldWorks classiques"

#: src/lib/components/field-editors/select.svelte
#: src/lib/components/field-editors/multi-select.svelte
#. Button to clear/empty a text field e.g. when filtering for semantic domains
#: src/lib/i18n/strings.svelte.ts
msgid "clear"
msgstr "clair"
msgstr ""

#: src/project/tasks/SubjectPopup.svelte
#: src/lib/components/ui/button/x-button.svelte
Expand Down
6 changes: 3 additions & 3 deletions frontend/viewer/src/locales/id.po
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ msgstr "Formulir Kutipan"
msgid "Classic FieldWorks Projects"
msgstr "Proyek FieldWorks Klasik"

#: src/lib/components/field-editors/select.svelte
#: src/lib/components/field-editors/multi-select.svelte
#. Button to clear/empty a text field e.g. when filtering for semantic domains
#: src/lib/i18n/strings.svelte.ts
msgid "clear"
msgstr "jelas"
msgstr ""

#: src/project/tasks/SubjectPopup.svelte
#: src/lib/components/ui/button/x-button.svelte
Expand Down
6 changes: 3 additions & 3 deletions frontend/viewer/src/locales/ko.po
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ msgstr "인용 양식"
msgid "Classic FieldWorks Projects"
msgstr "클래식 FieldWorks 프로젝트"

#: src/lib/components/field-editors/select.svelte
#: src/lib/components/field-editors/multi-select.svelte
#. Button to clear/empty a text field e.g. when filtering for semantic domains
#: src/lib/i18n/strings.svelte.ts
msgid "clear"
msgstr "clear"
msgstr ""

#: src/project/tasks/SubjectPopup.svelte
#: src/lib/components/ui/button/x-button.svelte
Expand Down
6 changes: 3 additions & 3 deletions frontend/viewer/src/locales/ms.po
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ msgstr "Bentuk Petikan"
msgid "Classic FieldWorks Projects"
msgstr "Projek FieldWorks Klasik"

#: src/lib/components/field-editors/select.svelte
#: src/lib/components/field-editors/multi-select.svelte
#. Button to clear/empty a text field e.g. when filtering for semantic domains
#: src/lib/i18n/strings.svelte.ts
msgid "clear"
msgstr "padam"
msgstr ""

#: src/project/tasks/SubjectPopup.svelte
#: src/lib/components/ui/button/x-button.svelte
Expand Down
6 changes: 3 additions & 3 deletions frontend/viewer/src/locales/sw.po
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ msgstr "Fomu ya Manukuu"
msgid "Classic FieldWorks Projects"
msgstr ""

#: src/lib/components/field-editors/select.svelte
#: src/lib/components/field-editors/multi-select.svelte
#. Button to clear/empty a text field e.g. when filtering for semantic domains
#: src/lib/i18n/strings.svelte.ts
msgid "clear"
msgstr "futa"
msgstr ""

#: src/project/tasks/SubjectPopup.svelte
#: src/lib/components/ui/button/x-button.svelte
Expand Down
Loading