Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo #13336

Merged
merged 2 commits into from
Aug 11, 2024
Merged
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
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