- [CommandsPage] update translations

- bump caniuse-liste
This commit is contained in:
Dawid Wysokiński 2021-01-09 11:02:02 +01:00
parent 4b9b9319b1
commit eaf5f0c44d
7 changed files with 49 additions and 39 deletions

View File

@ -3,17 +3,23 @@ import PropTypes from 'prop-types';
import { Card, CardHeader, CardContent, Typography } from '@material-ui/core'; import { Card, CardHeader, CardContent, Typography } from '@material-ui/core';
function Command({ command, commandSyntax, description, example }) { function Command({
command,
commandSyntax,
description,
example,
exampleText = '',
}) {
return ( return (
<Card> <Card style={{ height: '100%' }}>
<CardHeader title={command} subheader={commandSyntax} /> <CardHeader title={command} subheader={commandSyntax} />
<CardContent> <CardContent style={{ height: '100%' }}>
<Typography> <Typography>
{description} {description}
{example && ( {example && (
<> <>
<br /> <br />
<strong>Example</strong>: {example} <strong>{exampleText}</strong>: {example}
</> </>
)} )}
</Typography> </Typography>

View File

@ -27,7 +27,7 @@ const CommandsPage = ({ location, pageContext }) => {
<Grid container spacing={2}> <Grid container spacing={2}>
{c.commandsForEveryone.map(cmd => ( {c.commandsForEveryone.map(cmd => (
<Grid key={cmd.command} item xs={12} sm={6}> <Grid key={cmd.command} item xs={12} sm={6}>
<Command {...cmd} /> <Command {...cmd} exampleText={t.example} />
</Grid> </Grid>
))} ))}
</Grid> </Grid>
@ -39,7 +39,7 @@ const CommandsPage = ({ location, pageContext }) => {
<Grid container spacing={2}> <Grid container spacing={2}>
{c.adminCommands.map(cmd => ( {c.adminCommands.map(cmd => (
<Grid key={cmd.command} item xs={12} sm={6}> <Grid key={cmd.command} item xs={12} sm={6}>
<Command {...cmd} /> <Command {...cmd} exampleText={t.example} />
</Grid> </Grid>
))} ))}
</Grid> </Grid>

View File

@ -8,42 +8,42 @@ const commandsForEveryone = [
{ {
command: 'tw!tribe topoda', command: 'tw!tribe topoda',
commandSyntax: commandSyntax:
'tw!tribe topoda [server] [page] [tribe_id1] [tribe_id2] ... [tribe_idn]', 'tw!tribe topoda [server] [page] [tribe id/tag, you can enter more than one]',
description: description:
'This command generates a player list from selected tribes ordered by ODA.', 'This command generates a player list from selected tribes ordered by ODA.',
example: 'tw!tribe topoda pl143 1 975 170', example: 'tw!tribe topoda en113 1 KEKW',
}, },
{ {
command: 'tw!tribe topodd', command: 'tw!tribe topodd',
commandSyntax: commandSyntax:
'tw!tribe topodd [server] [page] [tribe_id1] [tribe_id2] ... [tribe_idn]', 'tw!tribe topodd [server] [page] [tribe id/tag, you can enter more than one]',
description: description:
'This command generates a player list from selected tribes ordered by ODD.', 'This command generates a player list from selected tribes ordered by ODD.',
example: 'tw!tribe topodd pl143 1 975 170', example: 'tw!tribe topodd en113 1 KEKW',
}, },
{ {
command: 'tw!tribe topods', command: 'tw!tribe topods',
commandSyntax: commandSyntax:
'tw!tribe topods [server] [page] [tribe_id1] [tribe_id2] ... [tribe_idn]', 'tw!tribe topods [server] [page] [tribe id/tag, you can enter more than one]',
description: description:
'This command generates a player list from selected tribes ordered by ODS.', 'This command generates a player list from selected tribes ordered by ODS.',
example: 'tw!tribe topods pl143 1 975 170', example: 'tw!tribe topods en113 1 KEKW',
}, },
{ {
command: 'tw!tribe topod', command: 'tw!tribe topod',
commandSyntax: commandSyntax:
'tw!tribe topod [server] [page] [tribe_id1] [tribe_id2] ... [tribe_idn]', 'tw!tribe topod [server] [page] [tribe id/tag, you can enter more than one]',
description: description:
'This command generates a player list from selected tribes ordered by OD.', 'This command generates a player list from selected tribes ordered by OD.',
example: 'tw!tribe topod pl143 1 975 170', example: 'tw!tribe topod en113 1 KEKW',
}, },
{ {
command: 'tw!tribe toppoints', command: 'tw!tribe toppoints',
commandSyntax: commandSyntax:
'tw!tribe toppoints [server] [page] [tribe_id1] [tribe_id2] ... [tribe_idn]', 'tw!tribe toppoints [server] [page] [tribe id/tag, you can enter more than one]',
description: description:
'This command generates a player list from selected tribes ordered by points.', 'This command generates a player list from selected tribes ordered by points.',
example: 'tw!tribe toppoints pl143 1 975 170', example: 'tw!tribe toppoints en113 1 KEKW',
}, },
]; ];
@ -69,9 +69,10 @@ const adminCommands = [
}, },
{ {
command: 'tw!observe', command: 'tw!observe',
commandSyntax: 'tw!observe [group ID from tw!groups] [server] [tribe id]', commandSyntax:
'tw!observe [group ID from tw!groups] [server] [tribe id/tribe tag]',
description: 'This command adds a tribe to the observation group.', description: 'This command adds a tribe to the observation group.',
example: 'tw!observe 1 pl143 975 170', example: 'tw!observe 1 en113 KEKW',
}, },
{ {
command: 'tw!observations', command: 'tw!observations',
@ -85,7 +86,7 @@ const adminCommands = [
commandSyntax: commandSyntax:
'tw!deleteobservation [group ID from tw!groups] [id from tw!observations]', 'tw!deleteobservation [group ID from tw!groups] [id from tw!observations]',
description: 'This command removes a tribe from the observation group.', description: 'This command removes a tribe from the observation group.',
example: 'tw!deleteobservation 1 pl143 975 170', example: 'tw!deleteobservation 1 1',
}, },
{ {
command: 'tw!conqueredvillages', command: 'tw!conqueredvillages',

View File

@ -6,44 +6,44 @@ const commandsForEveryone = [
example: 'tw!help', example: 'tw!help',
}, },
{ {
command: 'tw!tribe topatt', command: 'tw!tribe topod',
commandSyntax: commandSyntax:
'tw!tribe topatt [serwer] [strona] [id_plemienia1] [id_plemienia2] ... [id_plemienia n]', 'tw!tribe topod [serwer] [strona] [id/skrót plemienia, można podać więcej niż 1]',
description: description:
'Generuje listę graczy z wybranych plemion i sortuje po pokonanych w ataku.', 'Generuje listę graczy z wybranych plemion i sortuje po pokonanych w ataku.',
example: 'tw!tribe topatt pl143 1 975 170', example: 'tw!tribe topod pl148 1 AWW! AWW!!',
}, },
{ {
command: 'tw!tribe topdef', command: 'tw!tribe topodd',
commandSyntax: commandSyntax:
'tw!tribe topdef [serwer] [strona] [id_plemienia1] [id_plemienia2] ... [id_plemienia n]', 'tw!tribe topodd [serwer] [strona] [id/skrót plemienia, można podać więcej niż 1]',
description: description:
'Generuje listę graczy z wybranych plemion i sortuje po pokonanych w obronie.', 'Generuje listę graczy z wybranych plemion i sortuje po pokonanych w obronie.',
example: 'tw!tribe topdef pl143 1 975 170', example: 'tw!tribe topodd pl148 1 AWW! AWW!!',
}, },
{ {
command: 'tw!tribe topsupp', command: 'tw!tribe topods',
commandSyntax: commandSyntax:
'tw!tribe topsupp [serwer] [strona] [id_plemienia1] [id_plemienia2] ... [id_plemienia n]', 'tw!tribe topods [serwer] [strona] [id/skrót plemienia, można podać więcej niż 1]',
description: description:
'Generuje listę graczy z wybranych plemion i sortuje po pokonanych jako wspierający.', 'Generuje listę graczy z wybranych plemion i sortuje po pokonanych jako wspierający.',
example: 'tw!tribe topsupp pl143 1 975 170', example: 'tw!tribe topods pl148 1 AWW! AWW!!',
}, },
{ {
command: 'tw!tribe toptotal', command: 'tw!tribe topod',
commandSyntax: commandSyntax:
'tw!tribe toptotal [serwer] [strona] [id_plemienia1] [id_plemienia2] ... [id_plemienia n]', 'tw!tribe topod [serwer] [strona] [id/skrót plemienia, można podać więcej niż 1]',
description: description:
'Generuje listę graczy z wybranych plemion i sortuje po pokonanych ogólnie.', 'Generuje listę graczy z wybranych plemion i sortuje po pokonanych ogólnie.',
example: 'tw!tribe toptotal pl143 1 975 170', example: 'tw!tribe topod pl148 1 AWW! AWW!!',
}, },
{ {
command: 'tw!tribe toppoints', command: 'tw!tribe toppoints',
commandSyntax: commandSyntax:
'tw!tribe toppoints [serwer] [strona] [id_plemienia1] [id_plemienia2] ... [id_plemienia n]', 'tw!tribe toppoints [serwer] [strona] [id/skrót plemienia, można podać więcej niż 1]',
description: description:
'Generuje listę graczy z wybranych plemion i sortuje po punktach.', 'Generuje listę graczy z wybranych plemion i sortuje po punktach.',
example: 'tw!tribe toppoints pl143 1 975 170', example: 'tw!tribe toppoints pl148 1 AWW! AWW!!',
}, },
]; ];
@ -69,9 +69,10 @@ const adminCommands = [
}, },
{ {
command: 'tw!observe', command: 'tw!observe',
commandSyntax: 'tw!observe [ID grupy z tw!groups] [serwer] [id plemienia]', commandSyntax:
'tw!observe [ID grupy z tw!groups] [serwer] [id plemienia/skrót plemienia]',
description: 'Dodaje plemię do grupy.', description: 'Dodaje plemię do grupy.',
example: 'tw!observe 1 pl143 975 170', example: 'tw!observe 1 pl148 AWW!',
}, },
{ {
command: 'tw!observations', command: 'tw!observations',
@ -84,7 +85,7 @@ const adminCommands = [
commandSyntax: commandSyntax:
'tw!deleteobservation [ID grupy z tw!groups] [id z tw!observations]', 'tw!deleteobservation [ID grupy z tw!groups] [id z tw!observations]',
description: 'Usuwa plemię z grupy.', description: 'Usuwa plemię z grupy.',
example: 'tw!deleteobservation 1 pl143 975 170', example: 'tw!deleteobservation 1 1',
}, },
{ {
command: 'tw!conqueredvillages', command: 'tw!conqueredvillages',

View File

@ -1,6 +1,7 @@
export default { export default {
title: 'Commands', title: 'Commands',
description: 'List of commands offered by TWHelp Discord Bot with examples', description: 'List of commands offered by TWHelp Discord Bot with examples',
example: 'Example',
commandsForEveryoneSection: { commandsForEveryoneSection: {
title: 'For everyone', title: 'For everyone',
}, },

View File

@ -2,6 +2,7 @@ export default {
title: 'Komendy', title: 'Komendy',
description: description:
'Lista komend oferowanych przez TWHelp Discord Bot z przykładami', 'Lista komend oferowanych przez TWHelp Discord Bot z przykładami',
example: 'Przykład',
commandsForEveryoneSection: { commandsForEveryoneSection: {
title: 'Dla wszystkich', title: 'Dla wszystkich',
}, },

View File

@ -3567,9 +3567,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0" lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001043, caniuse-lite@^1.0.30001087: caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001043, caniuse-lite@^1.0.30001087:
version "1.0.30001087" version "1.0.30001173"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001087.tgz#4a0bdc5998a114fcf8b7954e7ba6c2c29831c54a" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001173.tgz"
integrity sha512-KAQRGtt+eGCQBSp2iZTQibdCf9oe6cNTi5lmpsW38NnxP4WMYzfU6HCRmh4kJyh6LrTM9/uyElK4xcO93kafpg== integrity sha512-R3aqmjrICdGCTAnSXtNyvWYMK3YtV5jwudbq0T7nN9k4kmE4CBuwPqyJ+KBzepSTh0huivV2gLbSMEzTTmfeYw==
caseless@~0.12.0: caseless@~0.12.0:
version "0.12.0" version "0.12.0"