diff --git a/doc-locale/.markdownlint/.markdownlint-cli2.yaml b/doc-locale/.markdownlint/.markdownlint-cli2.yaml index 648d4665752a5ec503c3340206278d159a8f4757..7436025cfc253d76e900b20bd9cdf8399ba8e6a0 100644 --- a/doc-locale/.markdownlint/.markdownlint-cli2.yaml +++ b/doc-locale/.markdownlint/.markdownlint-cli2.yaml @@ -1,15 +1,19 @@ --- -# Base Markdownlint configuration +# Base Markdownlint configuration for Japanese documentation # Extended Markdownlint configuration in doc/.markdownlint/ # See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for explanations of each rule + +customRules: + - rules/no-four-asterisks.js + - rules/no-fullwidth-asterisks.js + config: # First, set the default default: true - - # Per-rule settings in alphabetical order + code-block-style: # MD046 style: "fenced" - emphasis-style: false # MD049 + emphasis-style: false # MD049 - KEEP DISABLED (original setting) header-style: # MD003 style: "atx" hr-style: # MD035 @@ -27,4 +31,12 @@ config: reference-links-images: false # MD052 ul-style: # MD004 style: "dash" - link-fragments: false # MD051 - English anchor links in translated text fail + link-fragments: false # MD051 - English anchor links in translated text fail + no-space-in-emphasis: true # MD037 + + # CUSTOM JAPANESE RULES (warnings only) + MD-JA001: # Four consecutive asterisks (****) + severity: "warning" + + MD-JA002: # Fullwidth asterisks (* should be *) + severity: "warning" diff --git a/doc-locale/.markdownlint/rules/no-four-asterisks.js b/doc-locale/.markdownlint/rules/no-four-asterisks.js new file mode 100644 index 0000000000000000000000000000000000000000..383d8e7d46020b0a33a44ce9a5d9a1814d26f154 --- /dev/null +++ b/doc-locale/.markdownlint/rules/no-four-asterisks.js @@ -0,0 +1,102 @@ +// MD-JA001: Detects four consecutive asterisks (****) +// Pattern like ****text(unit)**** + +module.exports = { + names: ["MD-JA001", "no-four-asterisks"], + description: "Four consecutive asterisks (****) - likely a formatting error", + tags: ["formatting", "emphasis"], + + function: function rule(params, onError) { + const { lines, tokens } = params; + + // Build a map of lines that are in code blocks or inline code + const codeLines = new Set(); + const inlineCodeRanges = []; + + tokens.forEach(token => { + // Track fenced code blocks + if (token.type === 'fence' || token.type === 'code_block') { + const startLine = token.map[0]; + const endLine = token.map[1]; + for (let i = startLine; i < endLine; i++) { + codeLines.add(i); + } + } + + // Track inline code + if (token.type === 'inline' && token.children) { + token.children.forEach(child => { + if (child.type === 'code_inline') { + inlineCodeRanges.push({ + line: child.lineNumber - 1, // Convert to 0-indexed + content: child.content + }); + } + }); + } + }); + + lines.forEach((line, lineIndex) => { + // Skip if entire line is in a code block + if (codeLines.has(lineIndex)) { + return; + } + + // Find all occurrences of four or more asterisks + const fourAsteriskPattern = /\*{4,}/g; + let match; + + while ((match = fourAsteriskPattern.exec(line)) !== null) { + // Check if this match is inside inline code + const matchStart = match.index; + const matchEnd = match.index + match[0].length; + + const isInInlineCode = inlineCodeRanges.some(range => { + if (range.line !== lineIndex) return false; + + // Check if the asterisks appear in this inline code section + const codeStart = line.indexOf('`' + range.content); + const codeEnd = codeStart + range.content.length + 2; // +2 for backticks + + return matchStart >= codeStart && matchEnd <= codeEnd; + }); + + if (isInInlineCode) { + continue; // Skip if in inline code + } + + const asteriskCount = match[0].length; + const column = match.index + 1; + + let fixInfo = null; + let detail = ""; + + if (asteriskCount === 4) { + const before = line.substring(0, match.index); + const after = line.substring(match.index + 4); + + if (before.match(/[^\s*]$/) && after.match(/^[^\s*]/)) { + fixInfo = { + editColumn: column, + deleteCount: 4, + insertText: "** **" + }; + detail = "Should have space between closing and opening bold markers"; + } else { + detail = "Should be ** to close/open bold sections properly"; + } + } else { + detail = `Found ${asteriskCount} consecutive asterisks - check formatting`; + } + + onError({ + lineNumber: lineIndex + 1, + detail: detail, + context: line.trim(), + range: [column, asteriskCount], + fixInfo: fixInfo + }); + } + }); + } +}; diff --git a/doc-locale/.markdownlint/rules/no-fullwidth-asterisks.js b/doc-locale/.markdownlint/rules/no-fullwidth-asterisks.js new file mode 100644 index 0000000000000000000000000000000000000000..2c9e4c4c14a0af4afe112336d80f8bcc36853e67 --- /dev/null +++ b/doc-locale/.markdownlint/rules/no-fullwidth-asterisks.js @@ -0,0 +1,76 @@ +// MD-JA002: Detect fullwidth asterisks and suggest halfwidth replacement +// Japanese input methods sometimes produce fullwidth * instead of * + +module.exports = { + names: ["MD-JA002", "no-fullwidth-asterisks"], + description: "Fullwidth asterisks (*) should be halfwidth (*)", + tags: ["formatting", "japanese"], + + function: function rule(params, onError) { + const { lines, tokens } = params; + + // Build a map of lines in code blocks + const codeLines = new Set(); + const inlineCodeRanges = []; + + tokens.forEach(token => { + if (token.type === 'fence' || token.type === 'code_block') { + const startLine = token.map[0]; + const endLine = token.map[1]; + for (let i = startLine; i < endLine; i++) { + codeLines.add(i); + } + } + + if (token.type === 'inline' && token.children) { + token.children.forEach(child => { + if (child.type === 'code_inline') { + inlineCodeRanges.push({ + line: child.lineNumber - 1, + content: child.content + }); + } + }); + } + }); + + lines.forEach((line, lineIndex) => { + // Skip code blocks + if (codeLines.has(lineIndex)) { + return; + } + + const fullwidthPattern = /*/g; + let match; + + while ((match = fullwidthPattern.exec(line)) !== null) { + // Check if in inline code + const matchPos = match.index; + const isInInlineCode = inlineCodeRanges.some(range => { + if (range.line !== lineIndex) return false; + const codeStart = line.indexOf('`' + range.content); + const codeEnd = codeStart + range.content.length + 2; + return matchPos >= codeStart && matchPos <= codeEnd; + }); + + if (isInInlineCode) { + continue; + } + + const column = match.index + 1; + + onError({ + lineNumber: lineIndex + 1, + detail: "Fullwidth asterisk (*) should be halfwidth (*)", + context: line.trim(), + range: [column, 1], + fixInfo: { + editColumn: column, + deleteCount: 1, + insertText: "*" + } + }); + } + }); + } +}; diff --git a/doc-locale/ja-jp/administration/reference_architectures/3k_users.md b/doc-locale/ja-jp/administration/reference_architectures/3k_users.md index 8a3349bf907f6f3d557d975e2bcdfcc1f25b5d2c..d9b58db011c93faa48ea516f8021d7e3e6b077d5 100644 --- a/doc-locale/ja-jp/administration/reference_architectures/3k_users.md +++ b/doc-locale/ja-jp/administration/reference_architectures/3k_users.md @@ -888,7 +888,7 @@ Redisのセットアップの要件は次のとおりです。 {{< alert type="warning" >}} -**Gitalyの仕様は、正常に稼働する環境での利用パターンとリポジトリサイズの上位パーセンタイルに基づいています。****ただし、(数ギガバイトを超える)[大規模なモノレポ](_index.md#large-monorepos)または[追加のワークロード](_index.md#additional-workloads)がある場合、これらは環境のパフォーマンスに大きく影響することがあり、さらなる調整が必要になる場合があります**。これがあてはまると思われる場合は、必要に応じて追加のガイダンスについてお問い合わせください。 +Gitalyの仕様は、正常に稼働する環境での利用パターンとリポジトリサイズの上位パーセンタイルに基づいています。ただし、(数ギガバイトを超える)[大規模なモノレポ](_index.md#large-monorepos)または[追加のワークロード](_index.md#additional-workloads)がある場合、これらは環境のパフォーマンスに大きく影響することがあり、さらなる調整が必要になる場合があります。これがあてはまると思われる場合は、必要に応じて追加のガイダンスについてお問い合わせください。 {{< /alert >}} @@ -1190,7 +1190,7 @@ Praefectノードを設定するには、各ノードで次の手順を実行し {{< alert type="warning" >}} -**Gitalyの仕様は、正常に稼働する環境での利用パターンとリポジトリサイズの上位パーセンタイルに基づいています。****ただし、(数ギガバイトを超える)[大規模なモノレポ](_index.md#large-monorepos)または[追加のワークロード](_index.md#additional-workloads)がある場合、これらは環境のパフォーマンスに大きく影響することがあり、さらなる調整が必要になる場合があります**。これがあてはまると思われる場合は、必要に応じて追加のガイダンスについてお問い合わせください。 +Gitalyの仕様は、正常に稼働する環境での利用パターンとリポジトリサイズの上位パーセンタイルに基づいています。ただし、(数ギガバイトを超える)[大規模なモノレポ](_index.md#large-monorepos)または[追加のワークロード](_index.md#additional-workloads)がある場合、これらは環境のパフォーマンスに大きく影響することがあり、さらなる調整が必要になる場合があります。これがあてはまると思われる場合は、必要に応じて追加のガイダンスについてお問い合わせください。 {{< /alert >}} diff --git a/doc-locale/ja-jp/install/aws/_index.md b/doc-locale/ja-jp/install/aws/_index.md index 501595b51907bbbb16d2dcb7cbf5df9a418a6ffd..da6bf426a236896135de11443a64ba6cb3c66ad7 100644 --- a/doc-locale/ja-jp/install/aws/_index.md +++ b/doc-locale/ja-jp/install/aws/_index.md @@ -489,7 +489,7 @@ EC2ダッシュボードから: 1. **VPC**: 先ほど作成したVPCである`gitlab-vpc`を選択します。 1. **Submet(サブネット)**: 先ほど作成したサブネットのリストから`gitlab-private-10.0.1.0`を選択します。 1. **Auto-assign Public IP(パブリックIPの自動割り当て)**: `Disable`を選択します。 - 1. **Firewall(ファイアウォール): ****Select existing security group(既存のセキュリティグループを選択)**を選択し、先ほど作成した`gitlab-loadbalancer-sec-group`を選択します。 + 1. **Firewall**: **Select existing security group**を選択し、先ほど作成した`gitlab-loadbalancer-sec-group`を選択します。 1. ストレージの場合、ルートボリュームはデフォルトで8 GiBであり、そこにデータを保存しないことを考えると十分なはずです。 1. すべての設定を確認し、問題なければ、**Launch Instance(インスタンスを起動)**を選択します。 @@ -750,7 +750,7 @@ EC2ダッシュボードから: 1. ルートボリュームはデフォルトで8 GiBで、データはそこに保存しないため十分です。**Configure Security Group(セキュリティグループの設定)**を選択します。 1. **Select existing security group(既存のセキュリティグループを選択)**にチェックマークを入れ、先ほど作成した`gitlab-loadbalancer-sec-group`を選択します。 1. **Network settings(ネットワーク設定)**セクションで: - 1. **Firewall(ファイアウォール): ****Select existing security group(既存のセキュリティグループを選択)**を選択し、先ほど作成した`gitlab-loadbalancer-sec-group`を選択します。 + 1. **Firewall(ファイアウォール):** Select existing security group(既存のセキュリティグループを選択)**を選択し、先ほど作成した`gitlab-loadbalancer-sec-group`を選択します。 1. **Advanced details(詳細設定)**セクションで: 1. **IAM instance profile(IAMインスタンスプロファイル):** [先ほど作成](#create-an-iam-role)した`GitLabS3Access`ロールを選択します。 1. すべての設定を確認し、問題がなければ**Create launch template(起動テンプレートを作成)**を選択します。