🚧 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 * * *'
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- main
|
||||
- feature/**
|
||||
# Publish semver tags as releases.
|
||||
tags: [ 'v*.*.*' ]
|
||||
@ -50,8 +50,8 @@ jobs:
|
||||
|
||||
build:
|
||||
name: Docker Build & Push
|
||||
# if: github.repository == 'gethomepage/homepage'
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.repository == 'gethomepage/homepage'
|
||||
runs-on: self-hosted
|
||||
needs:
|
||||
- pre-commit
|
||||
permissions:
|
||||
@ -128,7 +128,7 @@ jobs:
|
||||
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||
# 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
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
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,9 +606,11 @@
|
||||
"moviebot": {
|
||||
"subscribe": "SUB",
|
||||
"sites": "SITE",
|
||||
"errorSites": "{{errorSites}} ERROR",
|
||||
"normalSites": "{{normalSites}} AVAILABLE",
|
||||
"todayUp": "UPLOADED",
|
||||
"todayDl": "DOWNLOAD"
|
||||
},
|
||||
},
|
||||
"octoprint": {
|
||||
"printer_state": "Status",
|
||||
"temp_tool": "Tool temp",
|
||||
|
||||
@ -464,6 +464,8 @@
|
||||
"moviebot": {
|
||||
"subscribe": "订阅中",
|
||||
"sites": "站点",
|
||||
"errorSites": "异常 {{errorSites}} 个",
|
||||
"normalSites": "可用 {{normalSites}} 个",
|
||||
"todayUp": "今日上传",
|
||||
"todayDl": "今日下载"
|
||||
},
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
import { useTranslation } from "next-i18next";
|
||||
|
||||
import Block from "components/services/widget/block";
|
||||
import Container from "components/services/widget/container";
|
||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { t } = useTranslation();
|
||||
const { widget } = service;
|
||||
|
||||
const { data: listTVResult } = useWidgetAPI(widget, "SubscribeList", {
|
||||
@ -34,7 +37,10 @@ export default function Component({ service }) {
|
||||
return (
|
||||
<Container service={service}>
|
||||
<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
|
||||
label="moviebot.todayUp"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user