Add useTranslation for all apps (#2076)

This commit is contained in:
Jaco Greeff 2019-12-19 11:08:21 +01:00 committed by GitHub
parent fa677032bf
commit 15bd35fd90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 93 additions and 21 deletions

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);

View File

@ -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']);