Skip to content

Commit

Permalink
Chore: 修复自订翻译部分 BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Dec 12, 2024
1 parent 25e6cfe commit 6a795ba
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
8 changes: 7 additions & 1 deletion config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,7 @@ disableThemeInject = false
]
[projectsAdapters.params]
hiddenFromHomePage = true
hiddenFromFeed = true

# Auto translation configuration
# See: https://github.com/xnx3/translate/
Expand All @@ -1258,6 +1259,7 @@ disableThemeInject = false
# See: https://translate.zvo.cn/43086.html
service = 'translate.service'
# List of language ID to translate to, e.g. ["english", "chinese_simplified", "chinese_traditional", ...]
# If not set, it will be translated to all languages
# See the full language list: https://api.translate.zvo.cn/language.json
languages = [
'english',
Expand All @@ -1278,9 +1280,13 @@ disableThemeInject = false
ignoreClass = []
# Tag names that need to be ignored for translation, e.g. ["title", ...]
ignoreTag = []
# Selectors that need to be ignored for translation, e.g. ["[data-adapters='projects'] .single-subtitle", ...]
ignoreSelector = []
# Texts that need to be ignored for translation, e.g. ["FixIt", "Lruihao", ...]
ignoreText = [
'Lruihao',
'https://github.com/hugo-fixit',
'https://fixit.lruihao.cn',
'CSE',
]
# Whether to detect the local language
detectLocalLanguage = true
Expand Down
5 changes: 2 additions & 3 deletions content/en/ecosystem/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ aliases:
subtitle: <https://github.com/hugo-fixit>
sectionSlot: If you want to develop your own components or preview the effects of some of the above components, you might as well take a look at the following articles.
layout: projects
cascade:
params:
type: posts
pageStyle: wide
description: "The Hugo FixIt ecosystem includes: documentation, theme components, development tools, third-party components, etc."
keyword:
Expand All @@ -18,6 +15,8 @@ keyword:
resources:
- name: featured-image
src: images/components-cover.webp
autoTranslate:
onlyLocalLang: false
menu:
main:
identifier: ecosystem
Expand Down
5 changes: 2 additions & 3 deletions content/zh-cn/ecosystem/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ aliases:
subtitle: <https://github.com/hugo-fixit>
sectionSlot: "如果你想开发自己的组件或者预览上面某些组件的效果,不妨看看下面的这些文章。"
layout: projects
cascade:
params:
type: posts
pageStyle: wide
description: "Hugo FixIt 生态系统,包括:文档、主题组件、开发工具、第三方组件等。"
keyword:
Expand All @@ -18,6 +15,8 @@ keyword:
resources:
- name: featured-image
src: images/components-cover.webp
autoTranslate:
onlyLocalLang: false
menu:
main:
identifier: components
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/hugo-fixit/FixIt v0.3.16 // indirect
github.com/hugo-fixit/cmpt-translate v1.2.0 // indirect
github.com/hugo-fixit/cmpt-translate v1.3.0 // indirect
github.com/hugo-fixit/component-projects v1.4.1 // indirect
github.com/hugo-fixit/shortcode-caniuse v1.2.2 // indirect
github.com/hugo-fixit/shortcode-rewards v1.0.5 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/hugo-fixit/FixIt v0.3.16 h1:ZffekHaqk/fJyuiagCdj1IjPczh5Dd57nnPZKSFWT6Q=
github.com/hugo-fixit/FixIt v0.3.16/go.mod h1:3XIRedrqakO7/a4ZnhE46haMRF8HgsT0N0B5j5D2iRU=
github.com/hugo-fixit/cmpt-translate v1.2.0 h1:jfkSTIcGWbGZri9J47Sy2vGmfJkkuyKyTG462DuidfE=
github.com/hugo-fixit/cmpt-translate v1.2.0/go.mod h1:JZ0STubquTlRgyyGhGPlt2s0KJ1gCa99+P8ltTwQRM4=
github.com/hugo-fixit/cmpt-translate v1.3.0 h1:gvG2BbhWocQzOumyEIWvgJwr39ZrUm0FGh4M7Hk0uD0=
github.com/hugo-fixit/cmpt-translate v1.3.0/go.mod h1:JZ0STubquTlRgyyGhGPlt2s0KJ1gCa99+P8ltTwQRM4=
github.com/hugo-fixit/component-projects v1.4.1 h1:aSDOf9A8Z2AH8jBq/Xgaw5esm6OMFGDTZ/p2FDG9V1E=
github.com/hugo-fixit/component-projects v1.4.1/go.mod h1:nXW0R37REwpfwUD1I4RtB5QW71vw66nRyB9uEpYxr+c=
github.com/hugo-fixit/shortcode-caniuse v1.2.2 h1:cuJVdJ1A0IgJnMQjifCDeRSRxIY0plTgs+wthCbrIls=
Expand Down

0 comments on commit 6a795ba

Please sign in to comment.