Skip to content

Commit

Permalink
Fix typo (#13336)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlqn authored Aug 11, 2024
1 parent 42b6beb commit 0dcb16e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions frontend/language/src/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,8 @@
"resourceadm.about_resource_homepage_text": "Link to information about where the end user can find the service and information about it.",
"resourceadm.about_resource_keywords_label": "Keywords",
"resourceadm.about_resource_keywords_text": "Add keywords for the resource, separating each word with a comma \",\". Examples are words that are easy to search for.",
"resourceadm.about_resource_langauge_error_missing_1": "You are missing translation for {{usageString}} in {{lang}}.",
"resourceadm.about_resource_langauge_error_missing_2": "You are missing translation for {{usageString}} in {{lang1}} and {{lang2}}.",
"resourceadm.about_resource_language_error_missing_1": "You are missing translation for {{usageString}} in {{lang}}.",
"resourceadm.about_resource_language_error_missing_2": "You are missing translation for {{usageString}} in {{lang1}} and {{lang2}}.",
"resourceadm.about_resource_public_service_dont_show": "will not be",
"resourceadm.about_resource_public_service_label": "Display in public directories",
"resourceadm.about_resource_public_service_show": "will be",
Expand Down
4 changes: 2 additions & 2 deletions frontend/language/src/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,8 @@
"resourceadm.about_resource_identifier_label": "Ressurs-id",
"resourceadm.about_resource_keywords_label": "Nøkkelord for ressursen (Bokmål, nynorsk og engelsk)",
"resourceadm.about_resource_keywords_text": "Ord som er enkle å søke på. Separer hvert ord med komma \",\".",
"resourceadm.about_resource_langauge_error_missing_1": "Du mangler oversettelse for {{usageString}} på {{lang}}.",
"resourceadm.about_resource_langauge_error_missing_2": "Du mangler oversettelse for {{usageString}} på {{lang1}} og {{lang2}}.",
"resourceadm.about_resource_language_error_missing_1": "Du mangler oversettelse for {{usageString}} på {{lang}}.",
"resourceadm.about_resource_language_error_missing_2": "Du mangler oversettelse for {{usageString}} på {{lang1}} og {{lang2}}.",
"resourceadm.about_resource_limited_by_rrr_description": "Velg om ressursen skal være begrenset av tilgangslister",
"resourceadm.about_resource_limited_by_rrr_label": "Tilgangslister",
"resourceadm.about_resource_reference": "Referanse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('getMissingInputLanguageString', () => {

it('to map a language with 1 non-empty field to correct string', () => {
const translationFunctionMock = (key: string) => {
if (key === 'resourceadm.about_resource_langauge_error_missing_1')
if (key === 'resourceadm.about_resource_language_error_missing_1')
return 'Du mangler oversettelse for test på Engelsk.';
return key;
};
Expand All @@ -85,7 +85,7 @@ describe('getMissingInputLanguageString', () => {

it('to map a language with 2 non-empty fields to correct string', () => {
const translationFunctionMock = (key: string) => {
if (key === 'resourceadm.about_resource_langauge_error_missing_2')
if (key === 'resourceadm.about_resource_language_error_missing_2')
return 'Du mangler oversettelse for test på Nynorsk og Engelsk.';
return key;
};
Expand Down
4 changes: 2 additions & 2 deletions frontend/resourceadm/utils/resourceUtils/resourceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ export const getMissingInputLanguageString = (

// Return different messages based on the length
if (missingLanguages.length === 1) {
return translationFunction('resourceadm.about_resource_langauge_error_missing_1', {
return translationFunction('resourceadm.about_resource_language_error_missing_1', {
usageString,
lang: mapLanguageKeyToLanguageText(missingLanguages[0], translationFunction),
});
} else if (missingLanguages.length > 1) {
const lastLang = missingLanguages.pop();
return translationFunction('resourceadm.about_resource_langauge_error_missing_2', {
return translationFunction('resourceadm.about_resource_language_error_missing_2', {
usageString,
lang1: missingLanguages
.map((lang) => mapLanguageKeyToLanguageText(lang, translationFunction))
Expand Down

0 comments on commit 0dcb16e

Please sign in to comment.