2014年8月19日火曜日

githubでリポジトリを編集できるユーザーを追加する

githubを使ってグループで共同開発がしたい

他人のリポジトリにあるプロジェクトを編集する際には,フォークして自分の変更を加えてコミットした後,元の人にプルリクエストをおくります.しかし,複数人で一つのリポジトリを共有したいとき,すなわち共に開発する友人らに対してリポジトリにプッシュ出来るように設定します.

githubのWebから設定

リポジトリの作成者アカウントで,該当リポジトリに移動します.
Settings→Collaboratorsへと移動します.

追加したいユーザー名を入力して"Add collaborator"で完了です.

かんたん(^^)v

以上です.


2014年8月9日土曜日

djangoのmakemessagesでのエラーメッセージにハマりかけたのでメモ

Djagnoの翻訳テキストファイルの作成コマンド

django-admin.pyもしくはmanager.pyのmakemessagesに翻訳に必要なファイルを自動生成させることが出来ます.
$./manager.py makemessages -l ja_JP

ところで,私がこれを行ったところ以下のようなメッセージが出力されました.


This script should be run from the Django Git tree or your project or app tree. If you did indeed run it from the Git checkout or your project or application, maybe you are just missing the conf/locale (in the django tree) or locale (for project and application) directory? It is not created automatically, you have to create it by hand if you want to enable i18n for your project or application.

えっとGitがどうとか言われていますが,結局のところプロジェクトに./localeディレクトリがないことが原因みたいでした.

というわけでプロジェクトディレクトリのルートで
$mkdir locale
$./manager.py makemessages -l ja_JP

として無事に翻訳用のテキストファイルが作成できました.
ふぅ〜.