forked from Shiloh/githaven
Fix document error about 'make trans-copy' (#29710)
Change document to 'make docs' --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com>
This commit is contained in:
parent
70e077036f
commit
607ed27b4f
4
Makefile
4
Makefile
@ -839,10 +839,6 @@ release-sources: | $(DIST_DIRS)
|
|||||||
release-docs: | $(DIST_DIRS) docs
|
release-docs: | $(DIST_DIRS) docs
|
||||||
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs .
|
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs .
|
||||||
|
|
||||||
.PHONY: docs
|
|
||||||
docs:
|
|
||||||
cd docs; bash scripts/trans-copy.sh;
|
|
||||||
|
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
deps: deps-frontend deps-backend deps-tools deps-py
|
deps: deps-frontend deps-backend deps-tools deps-py
|
||||||
|
|
||||||
|
@ -333,14 +333,9 @@ Documentation for the website is found in `docs/`. If you change this you
|
|||||||
can test your changes to ensure that they pass continuous integration using:
|
can test your changes to ensure that they pass continuous integration using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# from the docs directory within Gitea
|
make lint-md
|
||||||
make trans-copy clean build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You will require a copy of [Hugo](https://gohugo.io/) to run this task. Please
|
|
||||||
note: this may generate a number of untracked Git objects, which will need to
|
|
||||||
be cleaned up.
|
|
||||||
|
|
||||||
## Visual Studio Code
|
## Visual Studio Code
|
||||||
|
|
||||||
A `launch.json` and `tasks.json` are provided within `contrib/ide/vscode` for
|
A `launch.json` and `tasks.json` are provided within `contrib/ide/vscode` for
|
||||||
|
@ -307,13 +307,9 @@ TAGS="bindata sqlite sqlite_unlock_notify" make build test-sqlite
|
|||||||
该网站的文档位于 `docs/` 中。如果你改变了文档内容,你可以使用以下测试方法进行持续集成:
|
该网站的文档位于 `docs/` 中。如果你改变了文档内容,你可以使用以下测试方法进行持续集成:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 来自 Gitea 中的 docs 目录
|
make lint-md
|
||||||
make trans-copy clean build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
运行此任务依赖于 [Hugo](https://gohugo.io/)。请注意:这可能会生成一些未跟踪的 Git 对象,
|
|
||||||
需要被清理干净。
|
|
||||||
|
|
||||||
## Visual Studio Code
|
## Visual Studio Code
|
||||||
|
|
||||||
`contrib/ide/vscode` 中为 Visual Studio Code 提供了 `launch.json` 和 `tasks.json`。查看
|
`contrib/ide/vscode` 中为 Visual Studio Code 提供了 `launch.json` 和 `tasks.json`。查看
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
#
|
|
||||||
# This script is used to copy the en-US content to our available locales as a
|
|
||||||
# fallback to always show all pages when displaying a specific locale that is
|
|
||||||
# missing some documents to be translated.
|
|
||||||
#
|
|
||||||
# Just execute the script without any argument and you will get the missing
|
|
||||||
# files copied into the content folder. We are calling this script within the CI
|
|
||||||
# server simply by `make trans-copy`.
|
|
||||||
#
|
|
||||||
|
|
||||||
declare -a LOCALES=(
|
|
||||||
"fr-fr"
|
|
||||||
"nl-nl"
|
|
||||||
"pt-br"
|
|
||||||
"zh-cn"
|
|
||||||
"zh-tw"
|
|
||||||
)
|
|
||||||
|
|
||||||
ROOT=$(realpath $(dirname $0)/..)
|
|
||||||
|
|
||||||
for SOURCE in $(find ${ROOT}/content -type f -iname *.en-us.md); do
|
|
||||||
for LOCALE in "${LOCALES[@]}"; do
|
|
||||||
DEST="${SOURCE%.en-us.md}.${LOCALE}.md"
|
|
||||||
|
|
||||||
if [[ ! -f ${DEST} ]]; then
|
|
||||||
cp ${SOURCE} ${DEST}
|
|
||||||
sed -i.bak "s/en\-us/${LOCALE}/g" ${DEST}
|
|
||||||
rm ${DEST}.bak
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
Loading…
Reference in New Issue
Block a user