diff --git a/packages/app-address-book/src/translate.ts b/packages/app-address-book/src/translate.ts index a0baa8dbf7..af6c5eb754 100644 --- a/packages/app-address-book/src/translate.ts +++ b/packages/app-address-book/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-address-book'); +} export default withTranslation(['app-address-book']); diff --git a/packages/app-claims/src/translate.ts b/packages/app-claims/src/translate.ts index 1f0b79dc09..07e877cb39 100644 --- a/packages/app-claims/src/translate.ts +++ b/packages/app-claims/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-claims'); +} export default withTranslation(['app-claims']); diff --git a/packages/app-contracts/src/translate.ts b/packages/app-contracts/src/translate.ts index fbd789d271..e390261599 100644 --- a/packages/app-contracts/src/translate.ts +++ b/packages/app-contracts/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-contracts'); +} export default withTranslation(['app-contracts']); diff --git a/packages/app-council/src/translate.ts b/packages/app-council/src/translate.ts index 847d7a18ee..f886c8b437 100644 --- a/packages/app-council/src/translate.ts +++ b/packages/app-council/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-council'); +} export default withTranslation(['app-council']); diff --git a/packages/app-dashboard/src/translate.ts b/packages/app-dashboard/src/translate.ts index a2ad8e6424..290ee12a7c 100644 --- a/packages/app-dashboard/src/translate.ts +++ b/packages/app-dashboard/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-dashboard'); +} export default withTranslation(['app-dashboard']); diff --git a/packages/app-democracy/src/translate.ts b/packages/app-democracy/src/translate.ts index 55b0d83356..fa5895053f 100644 --- a/packages/app-democracy/src/translate.ts +++ b/packages/app-democracy/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-democracy'); +} export default withTranslation(['app-democracy']); diff --git a/packages/app-explorer/src/translate.ts b/packages/app-explorer/src/translate.ts index 83ed9b1130..7cc51ce307 100644 --- a/packages/app-explorer/src/translate.ts +++ b/packages/app-explorer/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-explorer'); +} export default withTranslation(['app-explorer']); diff --git a/packages/app-extrinsics/src/translate.ts b/packages/app-extrinsics/src/translate.ts index f82a301b4c..77a66eaf74 100644 --- a/packages/app-extrinsics/src/translate.ts +++ b/packages/app-extrinsics/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-extrinsics'); +} export default withTranslation(['app-extrinsics']); diff --git a/packages/app-generic-asset/src/translate.ts b/packages/app-generic-asset/src/translate.ts index a408ae3f2c..422b042ac8 100644 --- a/packages/app-generic-asset/src/translate.ts +++ b/packages/app-generic-asset/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-generic-asset'); +} export default withTranslation(['app-generic-asset']); diff --git a/packages/app-js/src/translate.ts b/packages/app-js/src/translate.ts index a33fc587e1..1e00400ae8 100644 --- a/packages/app-js/src/translate.ts +++ b/packages/app-js/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-js'); +} export default withTranslation(['app-js']); diff --git a/packages/app-parachains/src/translate.ts b/packages/app-parachains/src/translate.ts index 9604204094..bcd1c236e0 100644 --- a/packages/app-parachains/src/translate.ts +++ b/packages/app-parachains/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-parachains'); +} export default withTranslation(['app-parachains']); diff --git a/packages/app-settings/src/translate.ts b/packages/app-settings/src/translate.ts index 1bc2fdcb3a..9dea90b071 100644 --- a/packages/app-settings/src/translate.ts +++ b/packages/app-settings/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-settings'); +} export default withTranslation(['app-settings']); diff --git a/packages/app-storage/src/translate.ts b/packages/app-storage/src/translate.ts index 45be9cb81d..ad9b8713d9 100644 --- a/packages/app-storage/src/translate.ts +++ b/packages/app-storage/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-storage'); +} export default withTranslation(['app-storage']); diff --git a/packages/app-sudo/src/translate.ts b/packages/app-sudo/src/translate.ts index 897160cbb5..5fa8767d2a 100644 --- a/packages/app-sudo/src/translate.ts +++ b/packages/app-sudo/src/translate.ts @@ -1,7 +1,11 @@ -// Copyright 2017-2019 @polkadot/app-123code authors & contributors +// Copyright 2017-2019 @polkadot/app-sudo authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-sudo'); +} export default withTranslation(['app-sudo']); diff --git a/packages/app-tech-comm/src/translate.ts b/packages/app-tech-comm/src/translate.ts index 847d7a18ee..a89645a677 100644 --- a/packages/app-tech-comm/src/translate.ts +++ b/packages/app-tech-comm/src/translate.ts @@ -1,7 +1,11 @@ -// Copyright 2017-2019 @polkadot/app-council authors & contributors +// Copyright 2017-2019 @polkadot/app-tech-comm authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; -export default withTranslation(['app-council']); +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-tech-comm'); +} + +export default withTranslation(['app-tech-comm']); diff --git a/packages/app-toolbox/src/translate.ts b/packages/app-toolbox/src/translate.ts index 187fb8c7c3..648530b5e5 100644 --- a/packages/app-toolbox/src/translate.ts +++ b/packages/app-toolbox/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('app-toolbox'); +} export default withTranslation(['app-toolbox']); diff --git a/packages/react-components/src/translate.ts b/packages/react-components/src/translate.ts index 71aca2de88..b4074d9633 100644 --- a/packages/react-components/src/translate.ts +++ b/packages/react-components/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('react-components'); +} export default withTranslation(['react-components']); diff --git a/packages/react-signer/src/translate.ts b/packages/react-signer/src/translate.ts index 6973bab365..145dac15f2 100644 --- a/packages/react-signer/src/translate.ts +++ b/packages/react-signer/src/translate.ts @@ -2,6 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { withTranslation } from 'react-i18next'; +import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next'; + +export function useTranslation (): UseTranslationResponse { + return useTranslationBase('react-signer'); +} export default withTranslation(['react-signer']);