Skip to content

Commit

Permalink
docs: fixed some spelling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
imtaotao committed Sep 4, 2024
1 parent b5a95da commit 3a142a6
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 30 deletions.
14 changes: 7 additions & 7 deletions demo/src/components/danmu/Transmitter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const Transmitter = ({
toast({
duration: 800,
variant: 'destructive',
description: msg || t('notEmpityValue'),
description: msg || t('notEmptyValue'),
});
};

Expand Down Expand Up @@ -115,11 +115,11 @@ export const Transmitter = ({
</SheetTitle>
<div className="grid gap-4 py-4">
<div className="grid grid-cols-4 items-center gap-4">
<Label htmlFor="postion-x" className="text-right font-bold">
<Label htmlFor="position-x" className="text-right font-bold">
{t('position')} X (%)
</Label>
<Input
id="postion-x"
id="position-x"
type="number"
min={0}
max={100}
Expand All @@ -129,11 +129,11 @@ export const Transmitter = ({
/>
</div>
<div className="grid grid-cols-4 items-center gap-4">
<Label htmlFor="postion-y" className="text-right font-bold">
<Label htmlFor="position-y" className="text-right font-bold">
{t('position')} Y (%)
</Label>
<Input
id="postion-y"
id="position-y"
type="number"
min={0}
max={100}
Expand All @@ -143,11 +143,11 @@ export const Transmitter = ({
/>
</div>
<div className="grid grid-cols-4 items-center gap-4">
<Label htmlFor="postion-y" className="text-right font-bold">
<Label htmlFor="position-y" className="text-right font-bold">
{t('time')} (ms)
</Label>
<Input
id="postion-y"
id="position-y"
type="number"
defaultValue={duration}
className="col-span-3 w-3/4"
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/sidebar/SidebarGap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const SidebarGap = memo(
<Input
className="h-4/5"
type="number"
placeholder={t('danmakaGap')}
placeholder={t('danmakuGap')}
defaultValue={manager.options.gap}
onChange={throttle(1000, (e) => {
manager.updateOptions({ gap: Number(e.target.value) });
Expand Down
4 changes: 2 additions & 2 deletions demo/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ export const enMap = {
randomColor: 'Random color',
clearDanmaku: 'Clear danmaku',
currentlyFrozen: 'Currently frozen',
notEmpityValue: 'Danmaku value cannot be empty',
notEmptyValue: 'Danmaku value cannot be empty',
inputDanmaku: 'Enter your danmaku content.',
setFlexiblePosition: 'Set flexible danmaku position information',
facileDanmaku: 'Facile danmaku',
flexibleDanmaku: 'Advanced danmaku',
correctedDuration: 'Corrected duration',
thisIsA: 'This is a ',
danmakaGap: 'Danmaku gap',
danmakuGap: 'Danmaku gap',
opacity: 'Opacity',
setArea: 'Rendering area',
setDirection: 'Direction (left/right)',
Expand Down
4 changes: 2 additions & 2 deletions demo/src/i18n/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ export const zhMap = {
randomColor: '随机颜色',
clearDanmaku: '清空弹幕',
currentlyFrozen: '当前处于冻结状态',
notEmpityValue: '弹幕值不能为空',
notEmptyValue: '弹幕值不能为空',
inputDanmaku: '输入你的弹幕内容。',
setFlexiblePosition: '设置高级弹幕的位置信息',
facileDanmaku: '普通弹幕',
flexibleDanmaku: '高级弹幕',
correctedDuration: '被修正过运动时间',
thisIsA: '这个是一个',
danmakaGap: '弹幕间距',
danmakuGap: '弹幕间距',
opacity: '透明度',
setArea: '渲染区域',
setDirection: '方向(左/右)',
Expand Down
15 changes: 6 additions & 9 deletions docs/en/cases/like.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,15 @@ export function Danmaku({ danmaku }) {

## Developing the Toolbar Component

```tsx {14-15}
```tsx {11-12}
export function Tool() {
// Send `like/dislike` request and store the result in the database
const send = (type: string) => {
fetch(
'http://abc.com/like',
{
method: 'POST',
body: JSON.stringify({ type }),
},
);
}
fetch('http://abc.com/like', {
method: 'POST',
body: JSON.stringify({ type }),
});
};
return (
<div>
<button onClick={() => send('good')}>like</button>
Expand Down
15 changes: 6 additions & 9 deletions docs/zh/cases/like.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,15 @@ export function Danmaku({ danmaku }) {

## 开发工具栏组件

```tsx {14-15}
```tsx {11-12}
export function Tool() {
// 发送 `点赞/点踩` 的请求,将结果存储在数据库
const send = (type: string) => {
fetch(
'http://abc.com/like',
{
method: 'POST',
body: JSON.stringify({ type }),
},
);
}
fetch('http://abc.com/like', {
method: 'POST',
body: JSON.stringify({ type }),
});
};
return (
<div>
<button onClick={() => send('good')}>点赞</button>
Expand Down

0 comments on commit 3a142a6

Please sign in to comment.