Weblate のソースコード

Weblateは GitHub 上で開発しています。コードをフォークしてプルリクエストを開くことができます。他の形式のパッチも歓迎します。

参考

Weblate の内部構造 を確認して、Weblate の内部構造がどうなっているか調べてください。

コーディングのガイドライン

Weblate のコードはすべて、 セキュリティ設計原則 を念頭に記述しなければなりません。

Any code should come with documentation explaining the behavior. Don't forget documenting methods, complex code blocks, or user visible features.

Any new code should utilize PEP 484 type hints. We're not checking this in our CI yet as existing code does not yet include them.

Coding standard and linting the code

コードは PEP-8 コーディング ガイドラインに従い、black コード整形ツールを使用して書式設定することが必要です。

コードの品質を検査するには flake 8 を使用します。推奨プラグインの一覧は .pre-commit-config.yaml にあり、設定は:file:`setup.cfg`にあります。

これを実行する最も簡単な方法は、pre-commit をインストールすることです。リポジトリには、コミットされたファイルが正常であることを確認するための設定が含まれています。インストール後(すでに requirements-lint.txt に含まれています)、Weblate のチェックアウトで pre-commit install を実行して有効にします。これにより、すべての変更が自動的に検査されます。

手動で検査を実行し、すべてのファイルの実行を検査する方法:

pre-commit run --all