Move compact input translations to morfo

active-uix
dev 5 months ago
parent ed96f7ca4f
commit 8d685ad2ef

@ -30,10 +30,13 @@ import { comboboxMorfo } from '$uix/morfo/components/combobox';
import { commandMorfo } from '$uix/morfo/components/command';
import { drawerMorfo } from '$uix/morfo/components/drawer';
import { feedMorfo } from '$uix/morfo/components/feed';
import { gridListMorfo } from '$uix/morfo/components/grid-list';
import { listboxMorfo } from '$uix/morfo/components/listbox';
import { meterMorfo } from '$uix/morfo/components/meter';
import { navigationMenuMorfo } from '$uix/morfo/components/navigation-menu';
import { pinInputMorfo } from '$uix/morfo/components/pin-input';
import { progressMorfo } from '$uix/morfo/components/progress';
import { ratingGroupMorfo } from '$uix/morfo/components/rating-group';
import { scrollAreaMorfo } from '$uix/morfo/components/scroll-area';
import { searchFieldMorfo } from '$uix/morfo/components/search-field';
import { splitterMorfo } from '$uix/morfo/components/splitter';
@ -133,7 +136,6 @@ describe('createActiveUix (standalone)', () => {
expect(out.length).toBeGreaterThan(0);
expect(uix.langs.t('components.calendar.prev-month')).toBe('Mes anterior');
expect(uix.langs.t('components.range-calendar.range-start')).toBe('inicio del rango');
expect(uix.langs.t('components.rating-group.value-text', { value: 3, max: 5 })).toBe('3 de 5');
} finally {
uix.dispose();
}
@ -227,6 +229,13 @@ describe('createActiveUix (standalone)', () => {
expect(uix.langs.t('components.scroll-area.scrollbar-horizontal')).toBe(
'Barra de desplazamiento horizontal'
);
registerMorfo(gridListMorfo);
registerMorfo(pinInputMorfo);
registerMorfo(ratingGroupMorfo);
expect(uix.langs.t('components.grid-list.label')).toBe('Lista en cuadrícula');
expect(uix.langs.t('components.grid-list.select-row')).toBe('Seleccionar fila');
expect(uix.langs.t('components.pin-input.input')).toBe('Código de verificación');
expect(uix.langs.t('components.rating-group.label')).toBe('Valoración');
} finally {
uix.dispose();
_resetMorfoRegistryForTesting();

@ -68,12 +68,6 @@ export const componentLangs = {
copied: { es: 'Copiado', en: 'Copied' },
},
'grid-list': {
label: { es: 'Lista en cuadrícula', en: 'Grid list' },
'select-row': { es: 'Seleccionar fila', en: 'Select row' },
'select-all': { es: 'Seleccionar todo', en: 'Select all' },
},
carousel: {
label: { es: 'Carrusel', en: 'Carousel' },
prev: { es: 'Diapositiva anterior', en: 'Previous slide' },
@ -263,22 +257,6 @@ export const componentLangs = {
page: { es: 'Página {{value}}', en: 'Page {{value}}' },
},
'pin-input': {
input: { es: 'Código de verificación', en: 'Verification code' },
cell: {
es: 'Carácter {{index}} de {{length}}',
en: 'Character {{index}} of {{length}}'
},
},
'rating-group': {
label: { es: 'Valoración', en: 'Rating' },
'value-text': {
es: '{{value}} de {{max}}',
en: '{{value}} out of {{max}}'
},
},
table: {
label: { es: 'Tabla de datos', en: 'Data table' },
'sort-asc': { es: 'Ordenado ascendente', en: 'Sorted ascending' },
@ -292,10 +270,6 @@ export const componentLangs = {
'row-detail-collapse': { es: 'Ocultar detalles', en: 'Hide details' },
},
'number-field': {
role: { es: 'Campo numérico', en: 'Number field' },
},
'tag-group': {
label: { es: 'Etiquetas', en: 'Tags' },
remove: { es: 'Eliminar {{tag}}', en: 'Remove {{tag}}' },

@ -6,6 +6,10 @@ export const gridListMorfo = {
kebab: 'grid-list',
scope: ['soma'],
apg: 'https://www.w3.org/WAI/ARIA/apg/patterns/grid/',
translations: {
label: { es: 'Lista en cuadrícula', en: 'Grid list' },
'select-row': { es: 'Seleccionar fila', en: 'Select row' }
},
parts: [
{
name: 'Provider',
@ -26,7 +30,7 @@ export const gridListMorfo = {
aria: [
{
attr: 'aria-label',
value: v.translationRef('#?components.grid-list.label|List'),
value: v.translationRef('#?components.grid-list.label|Grid list'),
severity: 'recommended'
},
{

@ -5,6 +5,9 @@ export const pinInputMorfo = {
name: 'PinInput',
kebab: 'pin-input',
scope: ['soma'],
translations: {
input: { es: 'Código de verificación', en: 'Verification code' }
},
parts: [
{
name: 'Provider',

@ -5,6 +5,9 @@ export const ratingGroupMorfo = {
name: 'RatingGroup',
kebab: 'rating-group',
scope: ['soma'],
translations: {
label: { es: 'Valoración', en: 'Rating' }
},
parts: [
{
name: 'Provider',

@ -1,5 +1,4 @@
export const GRID_LIST_LANGS = {
LABEL: '#?components.grid-list.label|Grid list',
SELECT_ROW: '#?components.grid-list.select-row|Select row',
SELECT_ALL: '#?components.grid-list.select-all|Select all'
SELECT_ROW: '#?components.grid-list.select-row|Select row'
} as const;

@ -1,6 +1,5 @@
/** Idlangref constants for the NumberField component. */
export const NUMBER_FIELD_LANGS = {
INCREMENT: '#?common.buttons.increment|Increment',
DECREMENT: '#?common.buttons.decrement|Decrement',
ROLE: '#?components.number-field.role|Number field',
DECREMENT: '#?common.buttons.decrement|Decrement'
} as const;

@ -1,5 +1,4 @@
/** Idlangref constants for the PinInput component. */
export const PIN_INPUT_LANGS = {
INPUT: '#?components.pin-input.input|Verification code',
CELL: '#?components.pin-input.cell|Character {{index}} of {{length}}',
INPUT: '#?components.pin-input.input|Verification code'
} as const;

@ -1,5 +1,4 @@
/** Idlangref constants for the RatingGroup component. */
export const RATING_GROUP_LANGS = {
LABEL: '#?components.rating-group.label|Rating',
VALUE_TEXT: '#?components.rating-group.value-text|{{value}} out of {{max}}',
LABEL: '#?components.rating-group.label|Rating'
} as const;

Loading…
Cancel
Save

Powered by TurnKey Linux.