Skip to content

Commit

Permalink
fix(CommandPalette/SelectMenu): missing translations (#3057)
Browse files Browse the repository at this point in the history
  • Loading branch information
Malik-Jouda authored Jan 10, 2025
1 parent a3dbf7c commit d5dba0e
Show file tree
Hide file tree
Showing 31 changed files with 89 additions and 31 deletions.
4 changes: 2 additions & 2 deletions src/runtime/components/CommandPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ import UInput from './Input.vue'
const props = withDefaults(defineProps<CommandPaletteProps<G, T>>(), {
modelValue: '',
placeholder: 'Type a command or search...',
labelKey: 'label',
autofocus: true
})
Expand All @@ -158,7 +157,7 @@ const { t } = useLocale()
const appConfig = useAppConfig()
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'disabled', 'multiple', 'modelValue', 'defaultValue', 'highlightOnHover'), emits)
const inputProps = useForwardProps(reactivePick(props, 'loading', 'loadingIcon', 'placeholder'))
const inputProps = useForwardProps(reactivePick(props, 'loading', 'loadingIcon'))
// eslint-disable-next-line vue/no-dupe-keys
const ui = commandPalette()
Expand Down Expand Up @@ -244,6 +243,7 @@ const groups = computed(() => {
<ListboxRoot v-bind="rootProps" :class="ui.root({ class: [props.class, props.ui?.root] })">
<ListboxFilter v-model="searchTerm" as-child>
<UInput
:placeholder="placeholder || t('commandPalette.placeholder')"
variant="none"
:autofocus="autofocus"
size="lg"
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/SelectMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const { contains } = useFilter({ sensitivity: 'base' })
const rootProps = useForwardPropsEmits(reactivePick(props, 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur', 'highlightOnHover'), emits)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }) as ComboboxContentProps)
const arrowProps = toRef(() => props.arrow as ComboboxArrowProps)
const searchInputProps = toRef(() => defu(props.searchInput, { placeholder: 'Search...', variant: 'none' }) as InputProps)
const searchInputProps = toRef(() => defu(props.searchInput, { placeholder: t('selectMenu.search'), variant: 'none' }) as InputProps)
const { emitFormBlur, emitFormInput, emitFormChange, size: formGroupSize, color, id, name, highlight, disabled } = useFormField<InputProps>(props)
const { orientation, size: buttonGroupSize } = useButtonGroup<InputProps>(props)
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ export default defineLocale({
decrement: 'تقليل'
},
commandPalette: {
placeholder: 'اكتب أمرًا أو ابحث...',
noMatch: 'لا توجد نتائج مطابقة',
noData: 'لا توجد بيانات',
close: 'إغلاق'
},
selectMenu: {
noMatch: 'لا توجد نتائج مطابقة',
noData: 'لا توجد بيانات',
create: 'إنشاء "{label}"'
create: 'إنشاء "{label}"',
search: 'بحث...'
},
toast: {
close: 'إغلاق'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Snížit'
},
commandPalette: {
placeholder: 'Zadejte příkaz nebo hledejte...',
noMatch: 'Žádná shoda',
noData: 'Žádná data',
close: 'Zavřít'
},
selectMenu: {
noMatch: 'Žádná shoda',
noData: 'Žádná data',
create: 'Vytvořit "{label}"'
create: 'Vytvořit "{label}"',
search: 'Hledat...'
},
toast: {
close: 'Zavřít'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Reducer'
},
commandPalette: {
placeholder: 'Skriv en kommando eller søg...',
noMatch: 'Ingen matchende data',
noData: 'Ingen data',
close: 'Luk'
},
selectMenu: {
noMatch: 'Ingen matchende data',
noData: 'Ingen data',
create: 'Opret "{label}"'
create: 'Opret "{label}"',
search: 'Søg...'
},
toast: {
close: 'Luk'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Verringern'
},
commandPalette: {
placeholder: 'Geben Sie einen Befehl ein oder suchen Sie...',
noMatch: 'Nichts gefunden',
noData: 'Keine Daten',
close: 'Schließen'
},
selectMenu: {
noMatch: 'Nichts gefunden',
noData: 'Keine Daten',
create: '"{label}" erstellen'
create: '"{label}" erstellen',
search: 'Suchen...'
},
toast: {
close: 'Schließen'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Μείωση'
},
commandPalette: {
placeholder: 'Πληκτρολογήστε μια εντολή ή αναζητήστε...',
noMatch: 'Δεν βρέθηκαν δεδομένα',
noData: 'Δεν υπάρχουν δεδομένα',
close: 'Κλείσιμο'
},
selectMenu: {
noMatch: 'Δεν βρέθηκαν δεδομένα',
noData: 'Δεν υπάρχουν δεδομένα',
create: 'Δημιουργία "{label}"'
create: 'Δημιουργία "{label}"',
search: 'Αναζήτηση...'
},
toast: {
close: 'Κλείσιμο'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Decrement'
},
commandPalette: {
placeholder: 'Type a command or search...',
noMatch: 'No matching data',
noData: 'No data',
close: 'Close'
},
selectMenu: {
noMatch: 'No matching data',
noData: 'No data',
create: 'Create "{label}"'
create: 'Create "{label}"',
search: 'Search...'
},
toast: {
close: 'Close'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Decremento'
},
commandPalette: {
placeholder: 'Escribe un comando o busca...',
noMatch: 'No hay datos coincidentes',
noData: 'Sin datos',
close: 'Cerrar'
},
selectMenu: {
noMatch: 'No hay datos coincidentes',
noData: 'Sin datos',
create: 'Crear "{label}"'
create: 'Crear "{label}"',
search: 'Buscar...'
},
toast: {
close: 'Cerrar'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/et.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Vähenda'
},
commandPalette: {
placeholder: 'Sisesta käsk või otsi...',
noMatch: 'Pole vastavaid andmeid',
noData: 'Pole andmeid',
close: 'Sulge'
},
selectMenu: {
noMatch: 'Pole vastavaid andmeid',
noData: 'Pole andmeid',
create: 'Loo "{label}"'
create: 'Loo "{label}"',
search: 'Otsi...'
},
toast: {
close: 'Sulge'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/fa_ir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ export default defineLocale({
decrement: 'کاهش'
},
commandPalette: {
placeholder: 'یک دستور وارد کنید یا جستجو کنید...',
noMatch: 'داده‌ای یافت نشد',
noData: 'داده‌ای موجود نیست',
close: 'بستن'
},
selectMenu: {
noMatch: 'داده‌ای یافت نشد',
noData: 'داده‌ای موجود نیست',
create: 'ایجاد "{label}"'
create: 'ایجاد "{label}"',
search: 'جستجو...'
},
toast: {
close: 'بستن'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/fi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Vähennä'
},
commandPalette: {
placeholder: 'Kirjoita komento tai hae...',
noMatch: 'Ei vastaavia tietoja',
noData: 'Ei tietoja',
close: 'Sulje'
},
selectMenu: {
noMatch: 'Ei vastaavia tietoja',
noData: 'Ei tietoja',
create: 'Luo "{label}"'
create: 'Luo "{label}"',
search: 'Hae...'
},
toast: {
close: 'Sulje'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Diminuer'
},
commandPalette: {
placeholder: 'Tapez une commande ou recherchez...',
noMatch: 'Aucune donnée correspondante',
noData: 'Aucune donnée',
close: 'Fermer'
},
selectMenu: {
noMatch: 'Aucune donnée correspondante',
noData: 'Aucune donnée',
create: 'Créer "{label}"'
create: 'Créer "{label}"',
search: 'Rechercher...'
},
toast: {
close: 'Fermer'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Kurangi'
},
commandPalette: {
placeholder: 'Ketik perintah atau cari...',
noMatch: 'Tidak ada data yang cocok',
noData: 'Tidak ada data',
close: 'Tutup'
},
selectMenu: {
noMatch: 'Tidak ada data yang cocok',
noData: 'Tidak ada data',
create: 'Buat "{label}"'
create: 'Buat "{label}"',
search: 'Cari...'
},
toast: {
close: 'Tutup'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Diminuisci'
},
commandPalette: {
placeholder: 'Digita un comando o cerca...',
noMatch: 'Nessun dato corrispondente',
noData: 'Nessun dato',
close: 'Chiudi'
},
selectMenu: {
noMatch: 'Nessun dato corrispondente',
noData: 'Nessun dato',
create: 'Crea "{label}"'
create: 'Crea "{label}"',
search: 'Cerca...'
},
toast: {
close: 'Chiudi'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: '減らす'
},
commandPalette: {
placeholder: 'コマンドを入力するか検索...',
noMatch: '一致するデータがありません',
noData: 'データがありません',
close: '閉じる'
},
selectMenu: {
noMatch: '一致するデータがありません',
noData: 'データがありません',
create: '"{label}"を作成'
create: '"{label}"を作成',
search: '検索...'
},
toast: {
close: '閉じる'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: '감소'
},
commandPalette: {
placeholder: '명령을 입력하거나 검색...',
noMatch: '일치하는 데이터가 없습니다.',
noData: '데이터가 없습니다.',
close: '닫기'
},
selectMenu: {
noMatch: '일치하는 데이터가 없습니다.',
noData: '데이터가 없습니다.',
create: '"{label}" 생성'
create: '"{label}" 생성',
search: '검색...'
},
toast: {
close: '닫기'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Verlagen'
},
commandPalette: {
placeholder: 'Typ een commando of zoek...',
noMatch: 'Geen overeenkomende gegevens',
noData: 'Geen gegevens',
close: 'Sluiten'
},
selectMenu: {
noMatch: 'Geen overeenkomende gegevens',
noData: 'Geen gegevens',
create: '"{label}" creëren'
create: '"{label}" creëren',
search: 'Zoeken...'
},
toast: {
close: 'Sluiten'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Zmniejsz'
},
commandPalette: {
placeholder: 'Wpisz polecenie lub wyszukaj...',
noMatch: 'Brak pasujących danych',
noData: 'Brak danych',
close: 'Zamknij'
},
selectMenu: {
noMatch: 'Brak pasujących danych',
noData: 'Brak danych',
create: 'Utwórz "{label}"'
create: 'Utwórz "{label}"',
search: 'Szukaj...'
},
toast: {
close: 'Zamknij'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Decrementar'
},
commandPalette: {
placeholder: 'Digite um comando ou pesquise...',
noMatch: 'Nenhum dado correspondente',
noData: 'Sem dados',
close: 'Fechar'
},
selectMenu: {
noMatch: 'Nenhum dado correspondente',
noData: 'Sem dados',
create: 'Criar "{label}"'
create: 'Criar "{label}"',
search: 'Buscar...'
},
toast: {
close: 'Fechar'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/pt_br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Decrementar'
},
commandPalette: {
placeholder: 'Digite um comando ou pesquise...',
noMatch: 'Nenhum dado correspondente',
noData: 'Nenhum dado',
close: 'Fechar'
},
selectMenu: {
noMatch: 'Nenhum dado correspondente',
noData: 'Nenhum dado',
create: 'Criar "{label}"'
create: 'Criar "{label}"',
search: 'Pesquisar...'
},
toast: {
close: 'Fechar'
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/locale/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ export default defineLocale({
decrement: 'Уменьшить'
},
commandPalette: {
placeholder: 'Введите команду или выполните поиск...',
noMatch: 'Совпадений не найдено',
noData: 'Нет данных',
close: 'Закрыть'
},
selectMenu: {
noMatch: 'Совпадений не найдено',
noData: 'Нет данных',
create: 'Создать "{label}"'
create: 'Создать "{label}"',
search: 'Поиск...'
},
toast: {
close: 'Закрыть'
Expand Down
Loading

0 comments on commit d5dba0e

Please sign in to comment.