mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: strict eslint check (#1084)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import i18next, { Resource } from 'i18next';
|
||||
import { Trans, initReactI18next, useTranslation } from 'react-i18next';
|
||||
import { initReactI18next, Trans, useTranslation } from 'react-i18next';
|
||||
|
||||
import { LOCALES } from './resources';
|
||||
import type en_US from './resources/en.json';
|
||||
|
||||
@@ -24,7 +25,7 @@ declare module 'react-i18next' {
|
||||
|
||||
const STORAGE_KEY = 'i18n_lng';
|
||||
|
||||
export { Trans, i18n, useTranslation, LOCALES };
|
||||
export { i18n, LOCALES, Trans, useTranslation };
|
||||
|
||||
const resources = LOCALES.reduce<Resource>(
|
||||
(acc, { tag, res }) => ({ ...acc, [tag]: { translation: res } }),
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
// Run `pnpm run download-resources` to regenerate.
|
||||
// To overwrite this, please overwrite download.ts script.
|
||||
import en from './en.json';
|
||||
import zh_Hans from './zh-Hans.json';
|
||||
import fr from './fr.json';
|
||||
import de from './de.json';
|
||||
import en from './en.json';
|
||||
import fr from './fr.json';
|
||||
import ru from './ru.json';
|
||||
import zh_Hans from './zh-Hans.json';
|
||||
|
||||
export const LOCALES = [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// cSpell:ignore Tolgee
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
import { format } from 'prettier';
|
||||
|
||||
import { getAllProjectLanguages, getRemoteTranslations } from './api.js';
|
||||
import type { TranslationRes } from './utils.js';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// cSpell:ignore Tolgee
|
||||
import { readFile } from 'fs/promises';
|
||||
import path from 'path';
|
||||
|
||||
import { createsNewKey, getRemoteTranslations } from './api.js';
|
||||
import type { TranslationRes } from './utils.js';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user