Skip to content
Shimada Takayuki edited this page Feb 25, 2024 · 15 revisions

リポジトリをチェックアウトする

WAICのaria-practicesリポジトリをチェックアウトする

git clone [email protected]:waic/aria-practices.git

リポジトリに移動し、本家のリポジトリをリモートw3cとして登録する。

cd aria-practices
git remote add w3c [email protected]:w3c/aria-practices.git

以上で、originがWAICのリポジトリ、w3cが本家のリポジトリとしてチェックアウトされます。

現在公開中のAPGのバージョンを特定する

w3c/wai-aria-practicesリポジトリのpublicationブランチから参照されているaria-practicesリポジトリのバージョンを確認する。

_external ディレクトリを開いたときの画面キャプチャ

aria-practices @ に続く7桁の16進数の表記がコミットハッシュの冒頭7桁。フル長のハッシュを確認するにはリンク先をたどる。URL末尾の40文字の16進数表記がそれ。

特定のページを翻訳する手順

例として、Button Patternページを翻訳する手順を記載する。

前提条件:この文書冒頭の「リポジトリをチェックアウトする」は済ませてあること。

1. リポジトリを最新状態にする

git fetch --all

2. 作業用ブランチを作成する

git checkout -b button-ja origin/waic-main

3. 以下のURLから翻訳元のリビジョンを特定する

https://github.com/w3c/wai-aria-practices/tree/publication/_external

aria-practices @ {ハッシュ値}

リンクをたどり、URL末尾のコミットハッシュを控えておく。

4. 翻訳するファイルを特定する

Button Patternの場合:content/patterns/button/button-pattern.html

5. 翻訳するファイルを翻訳元のリビジョンに合わせる

git checkout {ハッシュ値} content/patterns/button/button-pattern.html

{ハッシュ値}には3番目の手順で取得したコミットハッシュを指定する。

6. 翻訳する。

<h1>の直下くらいに翻訳元リビジョンを記載しておく。

<h1>Button Pattern</h1>
<!-- 翻訳元リビジョン: https://github.com/w3c/aria-practices/tree/d6cf9d8db772603a456e7d7ef52e409d39124301 -->

参考

7. 変更をコミットする

git commit -m "○○○を日本語化する"

8. リモートリポジトリへpushする

git push -u origin button-ja

9. プルリクエストを作成し、誰かにレビュー依頼する。