Compare commits

...
Author SHA1 Message Date
Daniel Gray 64b7438ff7 feat!: Enable ar language (#3302) 2026-11-07 13:30:12 +00:00
10 changed files with 80 additions and 13 deletions

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ jobs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:build i18n') }}
strategy:
matrix:
lang: [es, fr, he, it, nl, ru, zh-Hant, zh-TW]
lang: [ar, es, fr, he, it, nl, ru, zh-Hant, zh-TW]
fail-fast: false
uses: ./.github/workflows/build.yml
with:
+1 -1
View File
@@ -176,7 +176,7 @@ jobs:
strategy:
matrix:
lang: [en, es, fr, he, it, nl, ru, zh-Hant]
lang: [ar, en, es, fr, he, it, nl, ru, zh-Hant]
steps:
- name: Download Repository
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
build:
strategy:
matrix:
lang: [en, es, fr, he, it, nl, ru, zh-Hant, zh-TW]
lang: [ar, en, es, fr, he, it, nl, ru, zh-Hant, zh-TW]
permissions:
contents: read
uses: ./.github/workflows/build.yml
+4
View File
@@ -167,6 +167,10 @@ extra:
name: !ENV [SOCIAL_TOR_SITE, "Hidden service"]
language_switcher: !ENV [LANGUAGE_SWITCHER, true]
alternate:
- name: عربي
link: /ar/
lang: ar
icon: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f1f8-1f1e6.svg
- name: English
link: /en/
lang: en
+9 -3
View File
@@ -60,8 +60,8 @@ if [[ "$blog" == false ]]; then
# Source per-language strings
set -a
# shellcheck disable=SC1090
source "includes/strings.$language.env"
# shellcheck disable=SC1090
source "includes/strings.$language.env"
set +a
# Set font if hebrew
@@ -70,6 +70,12 @@ if [[ "$blog" == false ]]; then
export BUILD_THEME_FONT_TEXT="Open Sans"
fi
# Set font if arabic
if [ "$language" == "ar" ]; then
export BUILD_THEME_FONT_CODE="ABeeZee"
export BUILD_THEME_FONT_TEXT="Open Sans"
fi
# Set font if russian or chinese
if [[ "ru zh-Hant zh-TW" =~ $language ]]; then
export BUILD_THEME_FONT_CODE="Noto Sans TC"
@@ -77,7 +83,7 @@ if [[ "$blog" == false ]]; then
fi
# Set stylesheet if hebrew or russian or chinese
if [[ "he ru zh-Hant zh-TW" =~ $language ]]; then
if [[ "ar he ru zh-Hant zh-TW" =~ $language ]]; then
export TRANSLATION_STYLESHEET="assets/stylesheets/lang-$language.css?v=20240410"
fi
+43
View File
@@ -0,0 +1,43 @@
/*
/// Copyright (c) 2026 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
*/
/* arabic */
@font-face {
font-family: 'ABeeZee';
font-style: normal;
font-weight: 400;
src: url(https://fonts.bunny.net/abeezee/files/abeezee-latin-ext-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/abeezee/files/abeezee-latin-ext-400-normal.woff) format('woff');
}
/* latin */
@font-face {
font-family: 'ABeeZee';
font-style: normal;
font-weight: 400;
src: url(https://fonts.bunny.net/abeezee/files/abeezee-latin-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/abeezee/files/abeezee-latin-400-normal.woff) format('woff');
}
h1, h2, h3, .md-header__topic {
font-family: "Bagnard", "ABeeZee", serif;
font-weight: 700!important;
}
+3 -1
View File
@@ -12,7 +12,9 @@ definitions:
Bagnard
- &font_family >-
{%- if config.theme.language == "he" -%}
{%- if config.theme.language == "ar" -%}
ABeeZee
{%- elif config.theme.language == "he" -%}
Suez One
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
Noto Sans TC
+6 -2
View File
@@ -20,7 +20,9 @@ definitions:
{{ layout.color or "#2d2d2d" }}
- &title_font_family >-
{%- if config.theme.language == "he" -%}
{%- if config.theme.language == "ar" -%}
ABeeZee
{%- elif config.theme.language == "he" -%}
Suez One
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
Noto Serif TC
@@ -36,7 +38,9 @@ definitions:
{%- endif -%}
- &font_family >-
{%- if config.theme.language == "he" -%}
{%- if config.theme.language == "ar" -%}
ABeeZee
{%- elif config.theme.language == "he" -%}
Suez One
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
Noto Sans TC
+6 -2
View File
@@ -16,7 +16,9 @@ definitions:
{{ layout.color or "#2d2d2d" }}
- &title_font_family >-
{%- if config.theme.language == "he" -%}
{%- if config.theme.language == "ar" -%}
ABeeZee
{%- elif config.theme.language == "he" -%}
Suez One
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
Noto Serif TC
@@ -25,7 +27,9 @@ definitions:
{%- endif -%}
- &font_family >-
{%- if config.theme.language == "he" -%}
{%- if config.theme.language == "ar" -%}
ABeeZee
{%- elif config.theme.language == "he" -%}
Suez One
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
Noto Sans TC
+6 -2
View File
@@ -20,7 +20,9 @@ definitions:
{{ layout.color or "#2d2d2d" }}
- &title_font_family >-
{%- if config.theme.language == "he" -%}
{%- if config.theme.language == "ar" -%}
ABeeZee
{%- elif config.theme.language == "he" -%}
Suez One
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
Noto Serif TC
@@ -36,7 +38,9 @@ definitions:
{%- endif -%}
- &font_family >-
{%- if config.theme.language == "he" -%}
{%- if config.theme.language == "ar" -%}
ABeeZee
{%- elif config.theme.language == "he" -%}
Suez One
{%- elif config.theme.language == ("ru" or "zh-Hant" or "zh-TW") -%}
Noto Sans TC