🚧 use i18n
This commit is contained in:
parent
5876af0cdd
commit
4ddba793e2
8
.github/workflows/docker-publish.yml
vendored
8
.github/workflows/docker-publish.yml
vendored
@ -10,7 +10,7 @@ on:
|
|||||||
- cron: '20 0 * * *'
|
- cron: '20 0 * * *'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- main
|
||||||
- feature/**
|
- feature/**
|
||||||
# Publish semver tags as releases.
|
# Publish semver tags as releases.
|
||||||
tags: [ 'v*.*.*' ]
|
tags: [ 'v*.*.*' ]
|
||||||
@ -50,8 +50,8 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
name: Docker Build & Push
|
name: Docker Build & Push
|
||||||
# if: github.repository == 'gethomepage/homepage'
|
if: github.repository == 'gethomepage/homepage'
|
||||||
runs-on: ubuntu-22.04
|
runs-on: self-hosted
|
||||||
needs:
|
needs:
|
||||||
- pre-commit
|
- pre-commit
|
||||||
permissions:
|
permissions:
|
||||||
@ -128,7 +128,7 @@ jobs:
|
|||||||
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||||
# https://github.com/docker/setup-qemu-action#about
|
# https://github.com/docker/setup-qemu-action#about
|
||||||
# platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
# platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||||
|
|
||||||
|
|||||||
13
docs/widgets/services/moviebot.md
Normal file
13
docs/widgets/services/moviebot.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
title: Moviebot
|
||||||
|
description: Moviebot Widget Configuration
|
||||||
|
---
|
||||||
|
|
||||||
|
Learn more about [Moviebot](https://moviebot.fun/).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
widget:
|
||||||
|
type: moviebot
|
||||||
|
url: http://moviebot.host.or.ip:port
|
||||||
|
key: api_keymoviebot
|
||||||
|
```
|
||||||
@ -606,6 +606,8 @@
|
|||||||
"moviebot": {
|
"moviebot": {
|
||||||
"subscribe": "SUB",
|
"subscribe": "SUB",
|
||||||
"sites": "SITE",
|
"sites": "SITE",
|
||||||
|
"errorSites": "{{errorSites}} ERROR",
|
||||||
|
"normalSites": "{{normalSites}} AVAILABLE",
|
||||||
"todayUp": "UPLOADED",
|
"todayUp": "UPLOADED",
|
||||||
"todayDl": "DOWNLOAD"
|
"todayDl": "DOWNLOAD"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -464,6 +464,8 @@
|
|||||||
"moviebot": {
|
"moviebot": {
|
||||||
"subscribe": "订阅中",
|
"subscribe": "订阅中",
|
||||||
"sites": "站点",
|
"sites": "站点",
|
||||||
|
"errorSites": "异常 {{errorSites}} 个",
|
||||||
|
"normalSites": "可用 {{normalSites}} 个",
|
||||||
"todayUp": "今日上传",
|
"todayUp": "今日上传",
|
||||||
"todayDl": "今日下载"
|
"todayDl": "今日下载"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import Block from "components/services/widget/block";
|
import Block from "components/services/widget/block";
|
||||||
import Container from "components/services/widget/container";
|
import Container from "components/services/widget/container";
|
||||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||||
|
|
||||||
export default function Component({ service }) {
|
export default function Component({ service }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
const { widget } = service;
|
const { widget } = service;
|
||||||
|
|
||||||
const { data: listTVResult } = useWidgetAPI(widget, "SubscribeList", {
|
const { data: listTVResult } = useWidgetAPI(widget, "SubscribeList", {
|
||||||
@ -34,7 +37,10 @@ export default function Component({ service }) {
|
|||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<Block label="moviebot.subscribe" value={subingTVList.length + subingMovieList.length} />
|
<Block label="moviebot.subscribe" value={subingTVList.length + subingMovieList.length} />
|
||||||
<Block label="moviebot.sites" value={errorSites ? `异常 ${errorSites} 个` : `可用 ${normalSites} 个`} />
|
<Block
|
||||||
|
label="moviebot.sites"
|
||||||
|
value={errorSites ? t("moviebot.errorSites", { errorSites }) : t("moviebot.normalSites", { normalSites })}
|
||||||
|
/>
|
||||||
|
|
||||||
<Block
|
<Block
|
||||||
label="moviebot.todayUp"
|
label="moviebot.todayUp"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user