Skip to content
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
6 changes: 5 additions & 1 deletion packages/app-address-book/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-claims/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-contracts/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-council/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-dashboard/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-democracy/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-explorer/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-extrinsics/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-generic-asset/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-js/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-parachains/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-settings/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/app-storage/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
8 changes: 6 additions & 2 deletions packages/app-sudo/src/translate.ts
Original file line number Diff line number Diff line change
@@ -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']);
10 changes: 7 additions & 3 deletions packages/app-tech-comm/src/translate.ts
Original file line number Diff line number Diff line change
@@ -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']);
6 changes: 5 additions & 1 deletion packages/app-toolbox/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/react-components/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
6 changes: 5 additions & 1 deletion packages/react-signer/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);