Skip to content

Commit

Permalink
remove logo alt text form translation files
Browse files Browse the repository at this point in the history
  • Loading branch information
AadneRo committed Jun 4, 2024
1 parent f36bcd8 commit caae916
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
6 changes: 2 additions & 4 deletions packages/dnb-eufemia/src/components/logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ const defaultProps: LogoProps = {
function Logo(localProps: LogoProps) {
const context = useContext(Context)

// Two different translations for sbanken and dnb as different props: {alt, sbankenAlt}
const translations = context.getTranslation(localProps).Logo

const props = extendPropsWithContext(
convertSnakeCaseProps(localProps),
defaultProps,
Expand Down Expand Up @@ -114,8 +111,9 @@ function Logo(localProps: LogoProps) {
return 'dnb'
}, [brand, variant])

// Alt text for the logo does not need to be translated. DNB alt will be the same in english, and sbanken alt should always be in norwegian
const altText =
logoType === 'dnb' ? translations.alt : translations.sbankenAlt
logoType === 'dnb' ? 'DNB Logo' : 'Sbanken - et konsept fra DNB logo'

const sharedClasses = classnames(
classNameProp,
Expand Down
4 changes: 0 additions & 4 deletions packages/dnb-eufemia/src/shared/locales/en-GB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ export default {
text_replaced: 'Replaced',
text_unknown: 'Unknown',
},
Logo: {
alt: 'DNB Logo',
sbankenAlt: 'Sbanken - a concept from DNB',
},
Tag: {
removeIconTitle: 'Remove',
addIconTitle: 'Add',
Expand Down
4 changes: 0 additions & 4 deletions packages/dnb-eufemia/src/shared/locales/nb-NO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ export default {
text_replaced: 'Erstattet',
text_unknown: 'Ukjent',
},
Logo: {
alt: 'DNB Logo',
sbankenAlt: 'Sbanken - et konsept fra DNB logo',
},
Tag: {
removeIconTitle: 'Fjern',
addIconTitle: 'Legg til',
Expand Down

0 comments on commit caae916

Please sign in to comment.