Show the whole 404 page in Russian for missing pages under /ru/

オープン
#14 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript

調査の方向性

Start with src/theme/NotFound/Content/index.js and i18n/ru/code.json to see how the 404 texts are already switched to Russian in the browser. Then find where the root 404.html is served for /ru/ paths and compare it with the built /ru/404.html. Done means a missing /ru/ URL shows a fully Russian page, with a Russian navbar, footer and links, and the choice between the two proposed approaches is recorded in the thread first.

索引モデルが issue の本文から書いたものです。

説明

Problem

GitHub Pages serves only the root 404.html for every missing path, and ignores 404.html files in subfolders. The root 404.html belongs to the default (English) build, so a broken link under /ru/, for example https://docs.lsfusion.org/ru/404/ or https://docs.lsfusion.org/ru/development_manual/, opens the English 404 page. The Russian page that Docusaurus builds at https://docs.lsfusion.org/ru/404.html is never used for such links.

The texts of the 404 page are now switched to Russian on these paths: src/theme/NotFound/Content/index.js takes them from i18n/ru/code.json in the browser. The rest of the page still comes from the English build:

  • the navbar and the footer are in English;
  • their links lead to the English pages, for example Learn leads to / instead of /ru/.

Possible solutions

  1. On a path under /ru/, redirect the root 404 page to /ru/404.html. The page becomes fully Russian, but the address bar shows /ru/404.html instead of the broken URL.
  2. On a path under /ru/, load /ru/404.html and replace the current document with it, keeping the URL. The page becomes fully Russian and the broken URL stays visible, but this relies on non-standard behaviour of a Docusaurus page and needs to be checked again after Docusaurus upgrades.
主要言語
JavaScript
スター
2
フォーク
4
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lsfusion/docusaurus のほかの issue

lsfusion/docusaurus の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。