mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-09-12 13:08:47 +00:00
feat!: Enable zh-TW language (#3119)
This commit is contained in:
2
.github/workflows/build-pr.yml
vendored
2
.github/workflows/build-pr.yml
vendored
@@ -80,7 +80,7 @@ jobs:
|
|||||||
needs: [submodule, metadata]
|
needs: [submodule, metadata]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
lang: [es, fr, he, it, nl, ru, zh-Hant]
|
lang: [es, fr, he, it, nl, ru, zh-Hant, zh-TW]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
|
2
.github/workflows/publish-release.yml
vendored
2
.github/workflows/publish-release.yml
vendored
@@ -50,7 +50,7 @@ jobs:
|
|||||||
needs: submodule
|
needs: submodule
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
lang: [en, es, fr, he, it, nl, ru, zh-Hant]
|
lang: [en, es, fr, he, it, nl, ru, zh-Hant, zh-TW]
|
||||||
build: [build, offline]
|
build: [build, offline]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
@@ -208,10 +208,14 @@ extra:
|
|||||||
link: /nl/
|
link: /nl/
|
||||||
lang: nl
|
lang: nl
|
||||||
icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1f3-1f1f1.svg
|
icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1f3-1f1f1.svg
|
||||||
- name: 正體中文
|
- name: 中文 (繁體)
|
||||||
link: /zh-hant/
|
link: /zh-hant/
|
||||||
lang: zh-Hant
|
lang: zh-Hant
|
||||||
icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1ed-1f1f0.svg
|
icon: https://raw.githubusercontent.com/jdecked/twemoji/master/assets/svg/1f1ed-1f1f0.svg
|
||||||
|
- name: 中文 (繁體,台灣)
|
||||||
|
link: /zh-TW/
|
||||||
|
lang: zh-TW
|
||||||
|
icon: https://raw.githubusercontent.com/jdecked/twemoji/master/assets/svg/1f1f9-1f1fc.svg
|
||||||
- name: Русский
|
- name: Русский
|
||||||
link: /ru/
|
link: /ru/
|
||||||
lang: ru
|
lang: ru
|
||||||
|
6
run.sh
6
run.sh
@@ -100,14 +100,14 @@ if [ "$language" == "he" ]; then
|
|||||||
export BUILD_THEME_FONT_TEXT="Open Sans"
|
export BUILD_THEME_FONT_TEXT="Open Sans"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set font if chinese
|
# Set font if russian or chinese
|
||||||
if [ "$language" == "zh-Hant" ]; then
|
if [[ "ru zh-Hant zh-TW" =~ $language ]]; then
|
||||||
export BUILD_THEME_FONT_CODE="Noto Sans TC"
|
export BUILD_THEME_FONT_CODE="Noto Sans TC"
|
||||||
export BUILD_THEME_FONT_TEXT="Noto Sans TC"
|
export BUILD_THEME_FONT_TEXT="Noto Sans TC"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set stylesheet if hebrew or russian or chinese
|
# Set stylesheet if hebrew or russian or chinese
|
||||||
if [[ "he ru zh-Hant" =~ $language ]]; then
|
if [[ "he ru zh-Hant zh-TW" =~ $language ]]; then
|
||||||
export TRANSLATION_STYLESHEET="assets/stylesheets/lang-$language.css?v=20240410"
|
export TRANSLATION_STYLESHEET="assets/stylesheets/lang-$language.css?v=20240410"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
58
theme/assets/stylesheets/lang-zh-TW.css
Normal file
58
theme/assets/stylesheets/lang-zh-TW.css
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
/// Copyright (c) 2023 Jonah Aragon <jonah@triplebit.net>
|
||||||
|
///
|
||||||
|
/// Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
/// copy of this software and associated documentation files (the "Software"),
|
||||||
|
/// to deal in the Software without restriction, including without limitation
|
||||||
|
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
/// and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
/// Software is furnished to do so, subject to the following conditions:
|
||||||
|
///
|
||||||
|
/// The above copyright notice and this permission notice shall be included in
|
||||||
|
/// all copies or substantial portions of the Software.
|
||||||
|
///
|
||||||
|
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
/// DEALINGS
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* chinese-traditional */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noto Serif TC';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-chinese-traditional-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-chinese-traditional-400-normal.woff) format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noto Serif TC';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-latin-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-latin-400-normal.woff) format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* chinese-traditional */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noto Serif TC';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
src: url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-chinese-traditional-700-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-chinese-traditional-700-normal.woff) format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noto Serif TC';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
src: url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-latin-700-normal.woff2) format('woff2'), url(https://fonts.bunny.net/noto-serif-tc/files/noto-serif-tc-latin-700-normal.woff) format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, .md-header__topic {
|
||||||
|
font-family: "Bagnard", "Noto Serif TC", serif;
|
||||||
|
font-weight: 700!important;
|
||||||
|
}
|
@@ -11,7 +11,7 @@ definitions:
|
|||||||
- &font_family >-
|
- &font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Sans TC
|
Noto Sans TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Public Sans
|
Public Sans
|
||||||
|
@@ -19,7 +19,7 @@ definitions:
|
|||||||
- &title_font_family >-
|
- &title_font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Serif TC
|
Noto Serif TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Bagnard
|
Bagnard
|
||||||
@@ -35,7 +35,7 @@ definitions:
|
|||||||
- &font_family >-
|
- &font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Sans TC
|
Noto Sans TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Public Sans
|
Public Sans
|
||||||
|
@@ -15,7 +15,7 @@ definitions:
|
|||||||
- &title_font_family >-
|
- &title_font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Serif TC
|
Noto Serif TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Bagnard
|
Bagnard
|
||||||
@@ -24,7 +24,7 @@ definitions:
|
|||||||
- &font_family >-
|
- &font_family >-
|
||||||
{%- if config.theme.language == "he" -%}
|
{%- if config.theme.language == "he" -%}
|
||||||
Suez One
|
Suez One
|
||||||
{%- elif config.theme.language == ("zh-Hant" or "ru") -%}
|
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
|
||||||
Noto Sans TC
|
Noto Sans TC
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Public Sans
|
Public Sans
|
||||||
|
Reference in New Issue
Block a user