Skip to content

Commit

Permalink
Merge pull request #1420 from City-of-Helsinki/hds-2069-translations
Browse files Browse the repository at this point in the history
(release-4.0.0) hds-2069: fi and sv translations for Select
  • Loading branch information
NikoHelle authored Nov 19, 2024
2 parents 06d7a4a + 5e7ff35 commit 37df7c9
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 92 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions packages/react/src/components/select/Select.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ describe('<Select />', () => {
);
const notification = getScreenReaderNotifications()[0] as string;
expect(notification.includes('Option 1')).toBeTruthy();
expect(notification.includes('Found 1 option')).toBeTruthy();
expect(notification.includes('Löytyi 1 vaihtoehto.')).toBeTruthy();
});
});
describe('Search', () => {
Expand Down Expand Up @@ -540,7 +540,7 @@ describe('<Select />', () => {
listAndInputContainer: {
'aria-hidden': true,
role: 'dialog',
'aria-label': `${defaultLabel}. FI: 12 choices.`,
'aria-label': `${defaultLabel}. 12 vaihtoehtoa.`,
},
list: {
// these undefined values indicate that the element should not have special attributes
Expand Down Expand Up @@ -630,7 +630,7 @@ describe('<Select />', () => {
},
list: {
'aria-multiselectable': undefined,
'aria-label': `FI: 12 choices.`,
'aria-label': `12 vaihtoehtoa.`,
role: 'dialog',
},
options: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('<ListAndInputContainer />', () => {
const listElement = getElementById(getElementIds().selectionsAndListsContainer);
expect(listElement.getAttribute('role')).toBe('dialog');
const ariaLabel = listElement.getAttribute('aria-label');
expect(ariaLabel?.includes(`${optionCountInAllGroups} choices`)).toBeTruthy();
expect(ariaLabel?.includes(`${optionCountInAllGroups} vaihtoehtoa`)).toBeTruthy();
expect(ariaLabel?.includes(getText(getProps(), 'label'))).toBeTruthy();
});
it('Without input, multiSelect and group labels, role and aria-label are not set', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`<ListAndInputContainer /> Component is rendered 1`] = `
<DocumentFragment>
<div
aria-hidden="false"
aria-label="Select label. FI: 12 choices."
aria-label="Select label. 12 vaihtoehtoa."
class="listAndInputContainer listAndInputContainerVisible"
id="test-select-component-sl-container"
role="dialog"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`<MultiSelectListWithGroups /> Component is rendered 1`] = `
<div
aria-checked="false"
aria-disabled="false"
aria-label="FI: Group0 (choose all)"
aria-label="Group0 (valitse kaikki)"
class="listItem groupLabel focusableListItem selectableListItem multiSelectListItem"
id="test-select-component-option-0"
role="checkbox"
Expand Down Expand Up @@ -159,7 +159,7 @@ exports[`<MultiSelectListWithGroups /> Component is rendered 1`] = `
<div
aria-checked="false"
aria-disabled="false"
aria-label="FI: Group1 (choose all)"
aria-label="Group1 (valitse kaikki)"
class="listItem groupLabel focusableListItem selectableListItem multiSelectListItem"
id="test-select-component-option-4"
role="checkbox"
Expand Down Expand Up @@ -269,7 +269,7 @@ exports[`<MultiSelectListWithGroups /> Component is rendered 1`] = `
<div
aria-checked="false"
aria-disabled="false"
aria-label="FI: Group2 (choose all)"
aria-label="Group2 (valitse kaikki)"
class="listItem groupLabel focusableListItem selectableListItem multiSelectListItem"
id="test-select-component-option-7"
role="checkbox"
Expand Down
168 changes: 84 additions & 84 deletions packages/react/src/components/select/texts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,99 +61,99 @@ export const defaultTexts: Record<SupportedLanguage, Texts> = {
},
fi: {
assistive: '',
clearButtonAriaLabel_one: 'FI: Remove current selection of "{{label}}".',
clearButtonAriaLabel_multiple: 'FI: Remove all {{selectionCount}} selections.',
clearButtonAriaLabel_one: 'Poista nykyinen valinta "{{label}}".',
clearButtonAriaLabel_multiple: 'Poista kaikki {{selectionCount}} valintaa.',
error: '',
label: '',
noSelectedOptions: 'FI: 0 selected options',
placeholder: 'FI: Choose one',
required: 'FI: Required.',
selectedOptionsCount_zero: 'FI: {{selectionCount}} selected options',
selectedOptionsCount_one: 'FI: {{selectionCount}} selected option',
selectedOptionsCount_multiple: 'FI: {{selectionCount}} selected options',
dropdownButtonAriaLabel: 'FI: ',
multiSelectGroupAriaLabel: 'FI: {{label}} (choose all)',
tagsClearAllButton: 'FI: Clear all',
tagsClearAllButtonAriaLabel_one: 'FI: Clear the selected option "{{label}}".',
tagsClearAllButtonAriaLabel_multiple: 'FI: Clear all {{selectionCount}} selected options.',
tagsRemaining_one: 'FI: There is one selection remaining.',
tagsRemaining_multiple: 'FI: There are {{selectionCount}} selections remaining.',
tagRemoved: 'FI: Selected option "{{value}}" removed.',
tagRemoveSelectionAriaLabel: 'FI: Remove selection "{{label}}".',
tagsPartiallyHidden: 'FI: Some selected options are now hidden.',
tagsShowAllButton: 'FI: Show all ({{selectionCount}})',
tagsShowLessButton: 'FI: Show less',
noSelectedOptions: '0 valittua vaihtoehtoa',
placeholder: 'Valitse yksi',
required: 'Pakollinen.',
selectedOptionsCount_zero: 'Ei yhtään valittua valittua',
selectedOptionsCount_one: '{{selectionCount}} valittu vaihtoehto',
selectedOptionsCount_multiple: '{{selectionCount}} valittua vaihtoehtoa',
dropdownButtonAriaLabel: '',
multiSelectGroupAriaLabel: '{{label}} (valitse kaikki)',
tagsClearAllButton: 'Tyhjennä kaikki',
tagsClearAllButtonAriaLabel_one: 'Tyhjennä valittu vaihtoehto "{{label}}".',
tagsClearAllButtonAriaLabel_multiple: 'Tyhjennä kaikki {{selectionCount}} valitut vaihtoehdot.',
tagsRemaining_one: 'Yksi valinta jäljellä.',
tagsRemaining_multiple: 'Jäljellä on {{selectionCount}} valintoja.',
tagRemoved: 'Valittu vaihtoehto "{{value}}" poistettu.',
tagRemoveSelectionAriaLabel: 'Poista valinta "{{label}}".',
tagsPartiallyHidden: 'Jotkin valitut vaihtoehdot on nyt piilotettu.',
tagsShowAllButton: 'Näytä kaikki ({{selectionCount}})',
tagsShowLessButton: 'Näytä vähemmän',
// no _one _multiple needed for this. There must be 2+ options if some tags are hidden.
tagsShowAllButtonAriaLabel: 'FI: Show all {{selectionCount}} selected options.',
tagsShowLessButtonAriaLabel: 'FI: Show less options.',
filterLabel: 'FI: Filter',
filterPlaceholder: 'FI: Type text to filter results with',
filterClearButtonAriaLabel: 'FI: Clear filter',
filteredWithoutResultsInfo: 'FI: No options found for "{{value}}".',
filterWithAnotherTerm: 'FI: Try a different term.',
filterResults: 'FI: Filtered results for "{{value}}".',
filterResultsCount_one: 'FI: Found 1 option.',
filterResultsCount_multiple: 'FI: Found {{numberIndicator}} options.',
choiceCount_one: 'FI: One choice.',
choiceCount_multiple: 'FI: {{numberIndicator}} choices.',
searchLabel: 'FI: Search',
searchPlaceholder: 'FI: Type text to search results with',
searchClearButtonAriaLabel: 'FI: Clear search',
searchedWithoutResultsInfo: 'FI: No options found for "{{value}}".',
searchWithAnotherTerm: 'FI: Try a different term.',
searchErrorTitle: "FI: We couldn't load the options.",
searchErrorText: 'FI: Try again or if the problem persists contact support.',
searching: 'FI: Searching for "{{value}}".',
searchResults_one: 'FI: Found one option for search term "{{value}}".',
searchResults_multiple: 'FI: Found {{numberIndicator}} options for search term "{{value}}".',
tagsShowAllButtonAriaLabel: 'Näytä kaikki {{selectionCount}} valitut vaihtoehdot.',
tagsShowLessButtonAriaLabel: 'Näytä vähemmän vaihtoehtoja.',
filterLabel: 'Suodata',
filterPlaceholder: 'Anna teksti suodatusta varten',
filterClearButtonAriaLabel: 'Tyhjennä suodatukset',
filteredWithoutResultsInfo: 'Vaihtoehtoja ei löytynyt suodatukselle "{{value}}".',
filterWithAnotherTerm: 'Kokeile toisia sanoja.',
filterResults: 'Suodatetut tulokset termille "{{value}}".',
filterResultsCount_one: 'Löytyi 1 vaihtoehto.',
filterResultsCount_multiple: 'Löytyi {{numberIndicator}} vaihtoehtoa.',
choiceCount_one: 'Yksi vaihtoehto.',
choiceCount_multiple: '{{numberIndicator}} vaihtoehtoa.',
searchLabel: 'Hae',
searchPlaceholder: 'Anna teksti hakua varten',
searchClearButtonAriaLabel: 'Tyhjennä haku',
searchedWithoutResultsInfo: 'Vaihtoehtoja ei löytynyt haulla "{{value}}".',
searchWithAnotherTerm: 'Kokeile toisia hakusanoja.',
searchErrorTitle: 'Emme voineet ladata hakutuloksia.',
searchErrorText: 'Yritä uudelleen tai, jos ongelma jatkuu, ota yhteyttä asiakaspalveluun.',
searching: 'Etsitään haulla "{{value}}".',
searchResults_one: 'Löytyi yksi vaihtoehto hakusanalle "{{value}}".',
searchResults_multiple: 'Löytyi {{numberIndicator}} vaihtoehtoa hakusanalle "{{value}}".',
},
sv: {
assistive: '',
clearButtonAriaLabel_one: 'SV: Remove current selection of "{{label}}".',
clearButtonAriaLabel_multiple: 'SV: Remove all {{selectionCount}} selections.',
clearButtonAriaLabel_one: "Ta bort aktuellt val '{{label}}'.",
clearButtonAriaLabel_multiple: 'Ta bort alla {{selectionCount}} val.',
error: '',
label: '',
noSelectedOptions: 'SV: 0 selected options',
placeholder: 'SV: Choose one',
required: 'SV: Required.',
selectedOptionsCount_zero: 'SV: {{selectionCount}} selected options',
selectedOptionsCount_one: 'SV: {{selectionCount}} selected option',
selectedOptionsCount_multiple: 'SV: {{selectionCount}} selected options',
dropdownButtonAriaLabel: 'SV: ',
multiSelectGroupAriaLabel: 'SV: {{label}} (choose all)',
tagsClearAllButton: 'SV: Clear all',
tagsClearAllButtonAriaLabel_one: 'SV: Clear the selected option "{{label}}".',
tagsClearAllButtonAriaLabel_multiple: 'SV: Clear all {{selectionCount}} selected options.',
tagsRemaining_one: 'SV: There is one selection remaining.',
tagsRemaining_multiple: 'SV: There are {{selectionCount}} selections remaining.',
tagRemoved: 'SV: Selected option "{{value}}" removed.',
tagRemoveSelectionAriaLabel: 'SV: Remove selection "{{label}}".',
tagsPartiallyHidden: 'SV: Some selected options are now hidden.',
tagsShowAllButton: 'SV: Show all ({{selectionCount}})',
tagsShowLessButton: 'SV: Show less',
noSelectedOptions: '0 valda alternativ',
placeholder: 'Välj ett',
required: 'Obligatoriskt.',
selectedOptionsCount_zero: '{{selectionCount}} valda alternativ',
selectedOptionsCount_one: '{{selectionCount}} valt alternativ',
selectedOptionsCount_multiple: '{{selectionCount}} valda alternativ',
dropdownButtonAriaLabel: '',
multiSelectGroupAriaLabel: '{{etikett}} (välj alla)',
tagsClearAllButton: 'Rensa alla',
tagsClearAllButtonAriaLabel_one: 'Rensa det valda alternativet "{{label}}".',
tagsClearAllButtonAriaLabel_multiple: 'Rensa alla {{selectionCount}} valda alternativ.',
tagsRemaining_one: 'Det finns ett val kvar.',
tagsRemaining_multiple: 'Det finns {{selectionCount}} val kvar.',
tagRemoved: "Det valda alternativet '{{value}}' har tagits bort.",
tagRemoveSelectionAriaLabel: "Ta bort valet '{{label}}'.",
tagsPartiallyHidden: 'Vissa valda alternativ är nu dolda.',
tagsShowAllButton: 'Visa alla ({{selectionCount}})',
tagsShowLessButton: 'Visa mindre',
// no _one _multiple needed for this. There must be 2+ options if some tags are hidden.
tagsShowAllButtonAriaLabel: 'SV: Show all {{selectionCount}} selected options.',
tagsShowLessButtonAriaLabel: 'SV: Show less options.',
filterLabel: 'SV: Filter',
filterPlaceholder: 'SV: Type text to filter results with',
filterClearButtonAriaLabel: 'SV: Clear filter',
filteredWithoutResultsInfo: 'SV: No options found for "{{value}}".',
filterWithAnotherTerm: 'SV: Try a different term.',
filterResults: 'SV: Filtered results for "{{value}}".',
filterResultsCount_one: 'SV: Found 1 option.',
filterResultsCount_multiple: 'SV: Found {{numberIndicator}} options.',
choiceCount_one: 'SV: One choice.',
choiceCount_multiple: 'SV: {{numberIndicator}} choices.',
searchLabel: 'SV: Search',
searchPlaceholder: 'SV: Type text to search results with',
searchClearButtonAriaLabel: 'SV: Clear search',
searchedWithoutResultsInfo: 'SV: No options found for "{{value}}".',
searchWithAnotherTerm: 'SV: Try a different term.',
searchErrorTitle: "SV: We couldn't load the options.",
searchErrorText: 'SV: Try again or if the problem persists contact support.',
searching: 'SV: Searching for "{{value}}".',
searchResults_one: 'SV: Found one option for search term "{{value}}".',
searchResults_multiple: 'SV: Found {{numberIndicator}} options for search term "{{value}}".',
tagsShowAllButtonAriaLabel: 'Visa alla {{selectionCount}} valda alternativ.',
tagsShowLessButtonAriaLabel: 'Visa färre alternativ.',
filterLabel: 'Filtrera',
filterPlaceholder: 'Skriv text för att filtrera resultat med',
filterClearButtonAriaLabel: 'Rensa filter',
filteredWithoutResultsInfo: "Inga alternativ hittades för '{{value}}'.",
filterWithAnotherTerm: 'Försök med en annan term.',
filterResults: 'Filtrerade resultat för "{{value}}".',
filterResultsCount_one: 'Hittade 1 alternativ.',
filterResultsCount_multiple: 'Hittade {{numberIndicator}} alternativ.',
choiceCount_one: 'Ett val.',
choiceCount_multiple: '{{antalIndikator}} val.',
searchLabel: 'Sök',
searchPlaceholder: 'Skriv text för att söka resultat med',
searchClearButtonAriaLabel: 'Rensa sökning',
searchedWithoutResultsInfo: "Inga alternativ hittades för '{{value}}'.",
searchWithAnotherTerm: 'Försök med en annan term.',
searchErrorTitle: 'Vi kunde inte ladda alternativen.',
searchErrorText: 'Försök igen eller kontakta support om problemet kvarstår.',
searching: "Söker efter '{{value}}'.",
searchResults_one: 'Hittade ett alternativ för söktermen "{{value}}".',
searchResults_multiple: 'Hittade {{numberIndicator}} alternativ för söktermen "{{value}}".',
},
};

Expand Down

0 comments on commit 37df7c9

Please sign in to comment.