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
4 changes: 3 additions & 1 deletion packages/frontend/core/src/desktop/dialogs/setting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import { GlobalContextService } from '@affine/core/modules/global-context';
import { createIsland, type Island } from '@affine/core/utils/island';
import { ServerDeploymentType } from '@affine/graphql';
import { Trans } from '@affine/i18n';
import { Trans, useTranslation } from '@affine/i18n';
import { ContactWithUsIcon } from '@blocksuite/icons/rc';
import { FrameworkScope, useLiveData, useService } from '@toeverything/infra';
import { debounce } from 'lodash-es';
Expand Down Expand Up @@ -72,10 +72,12 @@
scrollAnchor: initialScrollAnchor,
});
const globalContextService = useService(GlobalContextService);
const { i18n } = useTranslation('translation');

const currentServerId = useLiveData(
globalContextService.globalContext.serverId.$
);
const currentLanguageKey = i18n.resolvedLanguage ?? i18n.language;

Check failure on line 80 in packages/frontend/core/src/desktop/dialogs/setting/index.tsx

View workflow job for this annotation

GitHub Actions / Lint

eslint(no-unused-vars)

Variable 'currentLanguageKey' is declared but never used. Unused variables should start with a '_'.

Check failure on line 80 in packages/frontend/core/src/desktop/dialogs/setting/index.tsx

View workflow job for this annotation

GitHub Actions / Typecheck

'currentLanguageKey' is declared but its value is never read.
const serversService = useService(ServersService);
const defaultServerService = useService(DefaultServerService);
const currentServer =
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/i18n/src/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export const useI18n = () => {
return useMemo(() => createI18nWrapper(() => i18n), [i18n]);
};

export { I18nextProvider, Trans } from 'react-i18next';
export { I18nextProvider, Trans, useTranslation } from 'react-i18next';
Loading