From 0c8f45eb3de566569054e89f09d2a1b3908863fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Machulda?= Date: Tue, 6 Dec 2022 13:39:16 +0100 Subject: [PATCH] Style: Simplify constants imports --- src/__tests__/utils.test.ts | 2 +- src/languages/cs.ts | 3 +-- src/languages/de.ts | 3 +-- src/languages/en.ts | 3 +-- src/languages/hu.ts | 5 ++--- src/languages/pl.ts | 3 +-- src/languages/ru.ts | 3 +-- src/languages/sk.ts | 3 +-- src/languages/uk.ts | 3 +-- src/utils.ts | 2 +- 10 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/__tests__/utils.test.ts b/src/__tests__/utils.test.ts index 90e342b6..0ff92a0e 100644 --- a/src/__tests__/utils.test.ts +++ b/src/__tests__/utils.test.ts @@ -6,7 +6,7 @@ import { legalizeLmc, pluralize, } from '../utils'; -import { SecondaryButtonMode } from '../constants/SecondaryButtonMode'; +import { SecondaryButtonMode } from '../constants'; describe('utils', () => { describe('addSeparators', () => { diff --git a/src/languages/cs.ts b/src/languages/cs.ts index 1dc3866c..931c2d22 100644 --- a/src/languages/cs.ts +++ b/src/languages/cs.ts @@ -7,9 +7,8 @@ import { legalizeLmc, } from '../utils'; import { ExtraMessages, Values } from '../types'; -import { CookieConsentCategory } from '../constants'; +import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; -import { SecondaryButtonMode } from '../constants/SecondaryButtonMode'; const extra = { and: 'a', diff --git a/src/languages/de.ts b/src/languages/de.ts index dac472a3..6b7f6aa1 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -6,9 +6,8 @@ import { legalizeLmc, } from '../utils'; import { ExtraMessages, Values } from '../types'; -import { CookieConsentCategory } from '../constants'; +import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; -import { SecondaryButtonMode } from '../constants/SecondaryButtonMode'; const extra = { and: 'und', diff --git a/src/languages/en.ts b/src/languages/en.ts index 1e753bbe..948808a2 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -6,9 +6,8 @@ import { legalizeLmc, } from '../utils'; import { ExtraMessages, Values } from '../types'; -import { CookieConsentCategory } from '../constants'; +import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; -import { SecondaryButtonMode } from '../constants/SecondaryButtonMode'; const extra = { and: 'and', diff --git a/src/languages/hu.ts b/src/languages/hu.ts index 1808f527..dc321cc1 100644 --- a/src/languages/hu.ts +++ b/src/languages/hu.ts @@ -6,13 +6,12 @@ import { legalizeLmc, } from '../utils'; import { ExtraMessages, Values } from '../types'; -import { CookieConsentCategory } from '../constants'; +import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; -import { SecondaryButtonMode } from '../constants/SecondaryButtonMode'; const extra = { and: 'és', - legalName: 'LMC és a csoporthoz tartozó vállalatok', + legalName: 'LMC csoport és a hozzá tartozó vállalatok', }; /** diff --git a/src/languages/pl.ts b/src/languages/pl.ts index ab52869d..d5ed8e90 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -7,9 +7,8 @@ import { pluralize, } from '../utils'; import { ExtraMessages, Values } from '../types'; -import { CookieConsentCategory } from '../constants'; +import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; -import { SecondaryButtonMode } from '../constants/SecondaryButtonMode'; const extra = { and: 'i', diff --git a/src/languages/ru.ts b/src/languages/ru.ts index 927c5072..37f4ad7c 100644 --- a/src/languages/ru.ts +++ b/src/languages/ru.ts @@ -7,9 +7,8 @@ import { pluralize, } from '../utils'; import { ExtraMessages, Values } from '../types'; -import { CookieConsentCategory } from '../constants'; +import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; -import { SecondaryButtonMode } from '../constants/SecondaryButtonMode'; const extra = { and: 'и', diff --git a/src/languages/sk.ts b/src/languages/sk.ts index 2ca18b57..42669fcf 100644 --- a/src/languages/sk.ts +++ b/src/languages/sk.ts @@ -7,9 +7,8 @@ import { pluralize, } from '../utils'; import { ExtraMessages, Values } from '../types'; -import { CookieConsentCategory } from '../constants'; +import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; -import { SecondaryButtonMode } from '../constants/SecondaryButtonMode'; const extra = { and: 'a', diff --git a/src/languages/uk.ts b/src/languages/uk.ts index 03143efe..ac000986 100644 --- a/src/languages/uk.ts +++ b/src/languages/uk.ts @@ -7,9 +7,8 @@ import { pluralize, } from '../utils'; import { ExtraMessages, Values } from '../types'; -import { CookieConsentCategory } from '../constants'; +import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; -import { SecondaryButtonMode } from '../constants/SecondaryButtonMode'; const extra = { and: 'i', diff --git a/src/utils.ts b/src/utils.ts index da82b845..91f8a7cc 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ import { Values } from './types'; -import { SecondaryButtonMode } from './constants/SecondaryButtonMode'; +import { SecondaryButtonMode } from './constants'; import { VanillaCookieConsent } from './types/vanilla-cookieconsent'; export const addSeparators = (strings: string[], and: string = ''): string =>