Retranslate the complete Japanese online edition from Chinese (#2008)

* Retranslate the complete Japanese online edition from Chinese

* Fit Japanese homepage labels and localize heading permalinks

* Point Japanese contribution instructions to the Japanese preview

* Replace locale conditionals with multilingual UI tables
This commit is contained in:
Yudong Jin
2026-10-30 02:12:26 +08:00
committed by GitHub
parent 455e8c1281
commit 7257641e0e
1987 changed files with 23531 additions and 23261 deletions

View File

@@ -7,7 +7,7 @@
/* for ループ */
function forLoop(n) {
let res = 0;
// 1, 2, ..., n-1, n を順に加算する
// ループで 1, 2, ..., n-1, n の和を求める
for (let i = 1; i <= n; i++) {
res += i;
}
@@ -18,7 +18,7 @@ function forLoop(n) {
function whileLoop(n) {
let res = 0;
let i = 1; // 条件変数を初期化する
// 1, 2, ..., n-1, n を順に加算する
// ループで 1, 2, ..., n-1, n の和を求める
while (i <= n) {
res += i;
i++; // 条件変数を更新する
@@ -26,11 +26,11 @@ function whileLoop(n) {
return res;
}
/* while ループ(2回更新) */
/* while ループ(2 回の更新) */
function whileLoopII(n) {
let res = 0;
let i = 1; // 条件変数を初期化する
// 1, 4, 10, ... を順に加算する
// ループで 1, 4, 10, ... の和を求める
while (i <= n) {
res += i;
// 条件変数を更新する
@@ -43,9 +43,9 @@ function whileLoopII(n) {
/* 二重 for ループ */
function nestedForLoop(n) {
let res = '';
// i = 1, 2, ..., n-1, n とループする
// i = 1, 2, ..., n-1, n のループ
for (let i = 1; i <= n; i++) {
// j = 1, 2, ..., n-1, n とループする
// j = 1, 2, ..., n-1, n のループ
for (let j = 1; j <= n; j++) {
res += `(${i}, ${j}), `;
}
@@ -53,18 +53,18 @@ function nestedForLoop(n) {
return res;
}
/* Driver Code */
/* 実行用コード */
const n = 5;
let res;
res = forLoop(n);
console.log(`for ループの合計結果 res = ${res}`);
console.log(`for ループで求めた和 res = ${res}`);
res = whileLoop(n);
console.log(`while ループの合計結果 res = ${res}`);
console.log(`while ループで求めた和 res = ${res}`);
res = whileLoopII(n);
console.log(`while ループ(2 回更新)の合計結果 res = ${res}`);
console.log(`while ループ(2 回の更新)で求めた和 res = ${res}`);
const resStr = nestedForLoop(n);
console.log(`二重 for ループの走査結果 ${resStr}`);