kubernetes / kubernetes/website
[ar] Arabic navbar renders paragraphs inside nav links and is missing five sections
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 15.7k
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 204
Description
Found while reviewing the Arabic staging preview for #57407.
Preview: https://deploy-preview-57407--kubernetes-io-ar-staging.netlify.app/ar/
## Problem 1 — whole paragraphs are rendered inside navbar links
The Arabic navbar currently renders this:
```
توثيقتعرف على كيفية استخدام كوبيرنيتيس مع الوثائق والدروس التعليمية والمراجع. يمكنك حتى أن تساعد في المساهمة في الوثائق
ابدأ الآنمستعد للبدء؟ قم ببناء عنقود كوبيرنيتيس بسيط لتشغيل تطبيق تجريبي .
```
where English renders `Documentation`.
`layouts/partials/navbar.html` renders a menu entry as:
```go-html-template
{{ with .Pre}}{{ $pre }}{{ end }}{{ .Title }}{{ with .Post}}{{ $post }}{{ end }}
```
so anything in `menu.main.post` lands **inside** the anchor. Two Arabic pages still carry a `post:` key that upstream English dropped some time ago:
- `content/ar/docs/home/_index.md` — `menu.main.post` holds a `
` describing the docs
- `content/ar/docs/tutorials/hello-minikube.md` — has an entire `menu.main` block with a `post:` paragraph
`content/en/docs/tutorials/hello-minikube.md` has no `menu:` block at all, so Arabic also shows a top-level nav item that does not exist in any other localization.
This is not a regression from the recent branch move — the frontmatter dates from the original 2024 translation, when the English pages still used that pattern. It only became visible now that the Arabic staging site builds again.
## Problem 2 — five navigation sections are missing
| English | Arabic |
|---|---|
| Documentation | توثيق |
| Kubernetes Blog | *missing* |
| Training | *missing* |
| Careers | *missing* |
| Partners | *missing* |
| Community | *missing* |
| Versions | الإصدارات |
The main menu is built from `.Site.Menus.main`, which Hugo populates from page frontmatter. `content/ar/` has no `blog/`, `training/`, `careers/`, `partners/` or `community/` section pages, so those entries never appear.
For comparison, `content/fa/` carries `careers/_index.html`, `community/_index.html`, `partners/_index.html` and `training/_index.html` — which is why the Persian navbar is complete.
## Proposed fix
Problem 1 is a two-line frontmatter fix and is in the PR below. Verified locally with Hugo 0.144.2:
```
before: توثيقتعرف على كيفية استخدام كوبيرنيتيس... / ابدأ الآنمستعد للبدء؟...
after: توثيق
```
Problem 2 needs four or five short pages translated and is better handled as its own piece of work. Tracked on the Arabic umbrella issue #57557.
/language ar
/area localization
/sig docs
Contributor guide
Research direction
Start with layouts/partials/navbar.html and the frontmatter in content/ar/docs/home/_index.md and content/ar/docs/tutorials/hello-minikube.md. Compare the Arabic pages with content/en/docs/tutorials/hello-minikube.md and the corresponding content/fa/ section pages. Done means the Arabic navbar no longer places paragraphs inside links, and the missing sections are handled as tracked in umbrella issue #57557.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- hugo
- Domain
- documentation, frontend, localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100