mirror of
				https://github.com/privacyguides/privacyguides.org.git
				synced 2025-10-31 11:36:36 +00:00 
			
		
		
		
	feat!: Enable zh-TW language (#3119)
Signed-off-by: blacklight447 <niek@privacyguides.org> Signed-off-by: Daniel Gray <dngray@privacyguides.org>
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] | ||||
|     strategy: | ||||
|       matrix: | ||||
|         lang: [es, fr, he, it, nl, ru, zh-Hant] | ||||
|         lang: [es, fr, he, it, nl, ru, zh-Hant, zh-TW] | ||||
|       fail-fast: false | ||||
|     uses: ./.github/workflows/build.yml | ||||
|     with: | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/publish-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/publish-release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -50,7 +50,7 @@ jobs: | ||||
|     needs: submodule | ||||
|     strategy: | ||||
|       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] | ||||
|     permissions: | ||||
|       contents: read | ||||
|   | ||||
| @@ -209,10 +209,14 @@ extra: | ||||
|       link: /nl/ | ||||
|       lang: nl | ||||
|       icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1f3-1f1f1.svg | ||||
|     - name: 正體中文 | ||||
|     - name: 中文 (繁體) | ||||
|       link: /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: Русский | ||||
|       link: /ru/ | ||||
|       lang: ru | ||||
|   | ||||
							
								
								
									
										6
									
								
								run.sh
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								run.sh
									
									
									
									
									
								
							| @@ -100,14 +100,14 @@ if [ "$language" == "he" ]; then | ||||
|   export BUILD_THEME_FONT_TEXT="Open Sans" | ||||
| fi | ||||
|  | ||||
| # Set font if chinese | ||||
| if [ "$language" == "zh-Hant" ]; then | ||||
| # Set font if russian or chinese | ||||
| if [[ "ru zh-Hant zh-TW" =~ $language ]]; then | ||||
|   export BUILD_THEME_FONT_CODE="Noto Sans TC" | ||||
|   export BUILD_THEME_FONT_TEXT="Noto Sans TC" | ||||
| fi | ||||
|  | ||||
| # 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" | ||||
| 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 >- | ||||
|     {%- if config.theme.language == "he" -%} | ||||
|       Suez One | ||||
|     {%- elif config.theme.language == ("zh-Hant" or "ru") -%} | ||||
|     {%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%} | ||||
|       Noto Sans TC | ||||
|     {%- else -%} | ||||
|       Public Sans | ||||
|   | ||||
| @@ -19,7 +19,7 @@ definitions: | ||||
|   - &title_font_family >- | ||||
|     {%- if config.theme.language == "he" -%} | ||||
|       Suez One | ||||
|     {%- elif config.theme.language == ("zh-Hant" or "ru") -%} | ||||
|     {%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%} | ||||
|       Noto Serif TC | ||||
|     {%- else -%} | ||||
|       Bagnard | ||||
| @@ -35,7 +35,7 @@ definitions: | ||||
|   - &font_family >- | ||||
|     {%- if config.theme.language == "he" -%} | ||||
|       Suez One | ||||
|     {%- elif config.theme.language == ("zh-Hant" or "ru") -%} | ||||
|     {%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%} | ||||
|       Noto Sans TC | ||||
|     {%- else -%} | ||||
|       Public Sans | ||||
|   | ||||
| @@ -15,7 +15,7 @@ definitions: | ||||
|   - &title_font_family >- | ||||
|     {%- if config.theme.language == "he" -%} | ||||
|       Suez One | ||||
|     {%- elif config.theme.language == ("zh-Hant" or "ru") -%} | ||||
|     {%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%} | ||||
|       Noto Serif TC | ||||
|     {%- else -%} | ||||
|       Bagnard | ||||
| @@ -24,7 +24,7 @@ definitions: | ||||
|   - &font_family >- | ||||
|     {%- if config.theme.language == "he" -%} | ||||
|       Suez One | ||||
|     {%- elif config.theme.language == ("zh-Hant" or "ru") -%} | ||||
|     {%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%} | ||||
|       Noto Sans TC | ||||
|     {%- else -%} | ||||
|       Public Sans | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Gray
						Daniel Gray