Rasbian の rc_gui の日本語訳をしてみる

https://www.flickr.com/photos/119142834@N05/22961495820/in/dateposted-public/
https://www.flickr.com/photos/119142834@N05/23257335535/in/dateposted-public/
https://www.flickr.com/photos/119142834@N05/23231207776/in/dateposted-public/
https://www.flickr.com/photos/119142834@N05/22630222323/in/dateposted-public/

Raspberry Pi の OS の一つの Rasbian に jessie から Raspberry Pi 設定ツールの GUI 版が登場しました.パッケージ名は rc-gui で,実行ファイルは /usr/bin/rc_gui です.
( ちょうど先日の鹿児島Linux 勉強会向けに作ったスライドに説明が少しあるので興味のある方はどうぞ.-> 勉強会向けサーバを作ってみる2 / Rasbian jessieを試す/ Google Authenticatorのパスコードを作る 🏛️ )

Raspberry Pi 固有の設定を行うのにほぼ必須のツールなので日本語化されると嬉しい人が多そうな気がしたので翻訳して本家?に投げてみました.(文章量少なかったし)すると取り込まれたようなので記録を残しておきます.

翻訳の手順は,@okano_tさんの以下の文章などが解りやすいと思います.今回は主に poEdit 上で翻訳を行いました.

動作確認が楽なので作業は Rasbian jessie 上で行いました.翻訳に必要なパッケージを導入し,source を入手,poEdit で翻訳して動作確認,GitHub に push して pull request を投げるという感じです.

  • パッケージの導入
$ sudo apt update && sudo apt upgrade
$ sudo apt install gettext git
  • source の入手
$ git clone https://github.com/raspberrypi/rc_gui.git
  • poEdit で翻訳
    poEdit を開き,「翻訳プロジェクトを新規作成する」から clone した中の rc_gyui/po/en_GB.po を開きます.翻訳の言語に「日本語 (日本)」を選び翻訳していきます.
    保存を行うと ja_JP.po として保存され,同時に ja_JP.mo が作成されます.

  • 動作確認
    ja_JP.mo をシステムにコピーして rc_gui を実行して動作確認します.

$ sudo cp ja_JP.mo /usr/share/locale/ja/LC_MESSAGES/rc_gui.mo
$ LANG=ja_JP.UTF8 rc_gui

一通り訳したら GitHub で pull request を投げました.

とりあえず試してみる1

リリースサイクルなどがわからないのでいつこの翻訳が取り込まれるかわからないのですが,以下のような手順で翻訳を反映させることが可能です.
必要なパッケージの導入,po ファイルを mo ファイルに変換,システムに反映.

$ sudo apt install gettext git
$ git clone --depth 1 https://github.com/raspberrypi/rc_gui.git
$ cd rc_gui/po
$ msgfmt ja_JP.po -o ja_JP.mo
$ sudo cp ja_JP.mo /usr/share/locale/ja/LC_MESSAGES/rc_gui.mo

とりあえず試してみる2

以下に今の時点での ja_JP.mo を GitHub に置いたのでとりあえず以下のような感じで試せると思います.(こちらは更新するつもりはないのでどんどん古くなるはずです)

$ sudo sh -c 'wget https://raw.githubusercontent.com/matoken/matoken.github.com/master/blog/20151124-rc_gui-translation/ja_JP.mo -O /usr/share/locale/ja/LC_MESSAGES/rc_gui.mo'

追記)
パッケージ情報を確認すると,違うURL が出てきました.もしかしたら違うところで作業をしてしまった?

$ apt show rc-gui|grep Homepage
 
Homepage: https://github.com/RPi-Distro/rc_gui

One thought to “Rasbian の rc_gui の日本語訳をしてみる”

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)