chore: Linter warnings
This commit is contained in:
parent
b822e35fbe
commit
6b26d71e28
6 changed files with 24 additions and 83 deletions
|
@ -5,21 +5,6 @@ const common = {
|
||||||
security: [jwt, key],
|
security: [jwt, key],
|
||||||
}
|
}
|
||||||
|
|
||||||
const local = {
|
|
||||||
params: {
|
|
||||||
id: {
|
|
||||||
in: 'path',
|
|
||||||
name: 'id',
|
|
||||||
required: true,
|
|
||||||
description: "The Set's unique ID",
|
|
||||||
schema: {
|
|
||||||
example: 666,
|
|
||||||
type: 'integer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
export const paths = {}
|
export const paths = {}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { log } from '../utils/log.mjs'
|
|
||||||
import { UserModel } from './user.mjs'
|
import { UserModel } from './user.mjs'
|
||||||
import { i18nUrl } from '../utils/index.mjs'
|
import { i18nUrl } from '../utils/index.mjs'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { siteConfig } from 'site/site.config.mjs'
|
|
||||||
import translators from 'site/prebuild/translators.json'
|
import translators from 'site/prebuild/translators.json'
|
||||||
// Context
|
// Context
|
||||||
import { LoadingContext } from 'shared/context/loading-context.mjs'
|
import { LoadingContext } from 'shared/context/loading-context.mjs'
|
||||||
|
@ -8,10 +7,8 @@ import { useAccount } from 'shared/hooks/use-account.mjs'
|
||||||
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
||||||
import { useToast } from 'shared/hooks/use-toast.mjs'
|
import { useToast } from 'shared/hooks/use-toast.mjs'
|
||||||
import { useState, useContext } from 'react'
|
import { useState, useContext } from 'react'
|
||||||
import { useTranslation } from 'next-i18next'
|
|
||||||
// Components
|
// Components
|
||||||
import { ChoiceButton } from 'shared/components/choice-button.mjs'
|
import { ChoiceButton } from 'shared/components/choice-button.mjs'
|
||||||
import { I18nIcon } from 'shared/components/icons.mjs'
|
|
||||||
import { Popout } from 'shared/components/popout.mjs'
|
import { Popout } from 'shared/components/popout.mjs'
|
||||||
import { WebLink } from 'shared/components/web-link.mjs'
|
import { WebLink } from 'shared/components/web-link.mjs'
|
||||||
|
|
||||||
|
@ -48,30 +45,12 @@ const languages = [
|
||||||
'Turkish',
|
'Turkish',
|
||||||
]
|
]
|
||||||
|
|
||||||
const TeamList = ({ language, t }) => {
|
|
||||||
const count = Object.keys(translators[language]).length
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{Object.keys(translators[language])
|
|
||||||
.sort()
|
|
||||||
.map((name, i) => (
|
|
||||||
<span key={name}>
|
|
||||||
<b>{name}</b>
|
|
||||||
{i < count - 2 ? ', ' : i < count - 1 ? ' & ' : ' '}
|
|
||||||
</span>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export const SuggestLanguageForm = () => {
|
export const SuggestLanguageForm = () => {
|
||||||
// Context
|
// Context
|
||||||
const { loading, startLoading, stopLoading } = useContext(LoadingContext)
|
const { startLoading, stopLoading } = useContext(LoadingContext)
|
||||||
|
|
||||||
// Hooks
|
// Hooks
|
||||||
const { t } = useTranslation(ns)
|
const { token } = useAccount()
|
||||||
const { account, setAccount, token } = useAccount()
|
|
||||||
const backend = useBackend(token)
|
const backend = useBackend(token)
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
|
|
||||||
|
|
|
@ -22,30 +22,13 @@ const languages = [
|
||||||
...siteConfig.languagesWip,
|
...siteConfig.languagesWip,
|
||||||
].sort()
|
].sort()
|
||||||
|
|
||||||
const TeamList = ({ language, t }) => {
|
|
||||||
const count = Object.keys(translators[language]).length
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{Object.keys(translators[language])
|
|
||||||
.sort()
|
|
||||||
.map((name, i) => (
|
|
||||||
<span key={name}>
|
|
||||||
<b>{name}</b>
|
|
||||||
{i < count - 2 ? ', ' : i < count - 1 ? ' & ' : ' '}
|
|
||||||
</span>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export const TranslatorInvite = () => {
|
export const TranslatorInvite = () => {
|
||||||
// Context
|
// Context
|
||||||
const { loading, startLoading, stopLoading } = useContext(LoadingContext)
|
const { startLoading, stopLoading } = useContext(LoadingContext)
|
||||||
|
|
||||||
// Hooks
|
// Hooks
|
||||||
const { t } = useTranslation(ns)
|
const { t } = useTranslation(ns)
|
||||||
const { account, setAccount, token } = useAccount()
|
const { token } = useAccount()
|
||||||
const backend = useBackend(token)
|
const backend = useBackend(token)
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
|
|
||||||
|
@ -97,9 +80,7 @@ export const TranslatorInvite = () => {
|
||||||
<p>{t('translation:pleaseChooseTeam')}</p>
|
<p>{t('translation:pleaseChooseTeam')}</p>
|
||||||
<h5>{t('translation:whatTeam')}</h5>
|
<h5>{t('translation:whatTeam')}</h5>
|
||||||
<div className="flex flex-col gap-2 lg:grid lg:grid-cols-2 gap-2 mt- mb-82">
|
<div className="flex flex-col gap-2 lg:grid lg:grid-cols-2 gap-2 mt- mb-82">
|
||||||
{languages.map((language) => {
|
{languages.map((language) => (
|
||||||
const count = Object.keys(translators[language]).length
|
|
||||||
return (
|
|
||||||
<ChoiceButton
|
<ChoiceButton
|
||||||
noMargin
|
noMargin
|
||||||
key={language}
|
key={language}
|
||||||
|
@ -118,8 +99,7 @@ export const TranslatorInvite = () => {
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</ChoiceButton>
|
</ChoiceButton>
|
||||||
)
|
))}
|
||||||
})}
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
@ -9,7 +9,6 @@ import { TranslationStatus } from 'site/components/crowdin/status.mjs'
|
||||||
import { Translators } from 'site/components/crowdin/translators.mjs'
|
import { Translators } from 'site/components/crowdin/translators.mjs'
|
||||||
import { Popout } from 'shared/components/popout.mjs'
|
import { Popout } from 'shared/components/popout.mjs'
|
||||||
import { Breadcrumbs } from 'shared/components/breadcrumbs.mjs'
|
import { Breadcrumbs } from 'shared/components/breadcrumbs.mjs'
|
||||||
import { WebLink } from 'shared/components/web-link.mjs'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
// Translation namespaces used on this page
|
// Translation namespaces used on this page
|
||||||
|
|
|
@ -53,7 +53,6 @@ const downloadReport = async (url) => await sendApiRequest('', false, url)
|
||||||
|
|
||||||
export const prebuildCrowdin = async () => {
|
export const prebuildCrowdin = async () => {
|
||||||
const contributions = {}
|
const contributions = {}
|
||||||
const reports = []
|
|
||||||
for (let language of languages) {
|
for (let language of languages) {
|
||||||
console.log(`Loading translator contributions for ${language}`)
|
console.log(`Loading translator contributions for ${language}`)
|
||||||
contributions[language] = {}
|
contributions[language] = {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue