Skip to content

Commit 1ddbfa7

Browse files
authoredOct 13, 2023
Merge pull request BlackPythonDevs#61 from oleksis/oleksis/issue60
Add the Swahili language set to the list of languages
2 parents b0160d1 + 6d6107b commit 1ddbfa7

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed
 

‎_articles/sw/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: index
3+
title: Jumuiya ya Wasanidi Programu wa Python Nyeusi.
4+
lang: sw
5+
permalink: /sw/
6+
---
7+
8+
{% assign t = site.data.locales[page.lang][page.lang] %} {% if page.title %} {% assign header = page.title %} {% else %} {% assign header = site.title %} {% endif %}
9+
<h1>{{ t.index.lead }}</h1>

‎_data/locales/sw.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sw:
2+
locale_name: Swahili
3+
nav:
4+
- Nyumbani
5+
- Kutuhusu
6+
- Matukio
7+
- Mikutano
8+
- Jamii
9+
index:
10+
lead: Karibu kwenye Jumuiya ya Wasanidi Programu wa Python Nyeusi.
11+
article:
12+
table_of_contents: Jedwali la Yaliyomo
13+
footer:
14+
contribute:
15+
heading: Kuchangia
16+
description: Unahitaji kutoa mapendekezo? Maudhui haya ni chanzo wazi. Tusaidie kuboresha.
17+
button: Kuchangia
18+
subscribe:
19+
heading: Endelea kuwasiliana
20+
description: Kuwa wa kwanza kusikia kuhusu vidokezo vya hivi karibuni vya chanzo wazi vya BPDevs na rasilimali.
21+
label: Anwani ya barua pepe
22+
button: Kujiunga

‎assets/js/bpd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function loadLanguage(lang) {
2323

2424
// Check if the URL path is more than just /path/ and starts with a language code
2525
let path_parts = base_pathname.split("/");
26-
let isLongPath = path_parts.length > 3;
26+
let isLongPath = path_parts.length >= 3;
2727
let startsWithLangCode = lang_path_regex.test(base_pathname);
2828

2929
if (isLongPath && startsWithLangCode) {

0 commit comments

Comments
 (0)
Please sign in to comment.