設定#

すべての設定は settings.py に保存されます(Django の通常の方法)。

注釈

After changing any of these settings, you need to restart Weblate — both WSGI and Celery processes.

mod_wsgi として実行する場合は、Apache を再起動して設定のリロードが必要です。

参考

Django 自体の設定パラメーターについては、Django's documentation も確認してください。

AKISMET_API_KEY#

Weblate は Akismet を使用して、匿名の提案がスパムであるかどうか検査できます。API キーを購入してサイトに関連付けるには、akismet.com にアクセスしてください。

ANONYMOUS_USER_NAME#

サインインしていないユーザーのユーザー名。

AUDITLOG_EXPIRY#

バージョン 3.6 で追加.

How many days Weblate should keep audit logs (which contain info about account activity).

デフォルトは 180 日です。

AUTH_LOCK_ATTEMPTS#

接続制限が適用されるまでに失敗した認証試行の最大回数。

現在、適用している場所:

  • サインイン。アカウント パスワードを削除し、ユーザーが新しいパスワードを要求しなければサインインできないようにしています。

  • Password reset. Prevents new e-mails from being sent, avoiding spamming users with too many password-reset attempts.

デフォルトは 10 回です。

参考

接続制限

AUTO_UPDATE#

バージョン 3.2 で追加.

バージョン 3.11 で変更: 元々の on/off オプションを変更し、どの文字列を受け付けるかを区別するために変更しました。

すべてのリポジトリを毎日更新。

ヒント

Weblate リポジトリを自動的に更新するために 通知フック を使用していない場合に便利です。

注釈

後方互換性のために、文字列選択の他に on/off のオプションがあります。

The options are:

"none"

毎日の更新はなし。

"remote" および False

リモートのみを更新。

"full" および True

リモートを更新し、作業コピーをマージする。

注釈

これには、Celery を使用するバックグラウンド タスク が動作していることが必要で、再起動後に有効になります。

AVATAR_URL_PREFIX#

アバター URL を作成するための接頭辞: ${AVATAR_URL_PREFIX}/avatar/${MAIL_HASH}?${PARAMS}。動作することが判明しているサービス:

Gravatar (デフォルト)、https://gravatar.com/ より

AVATAR_URL_PREFIX = 'https://www.gravatar.com/'

Libravatar、https://www.libravatar.org/ より

AVATAR_URL_PREFIX = 'https://www.libravatar.org/'

AUTH_TOKEN_VALID#

パスワード リセット メールを送信してからの認証トークンと仮パスワードの有効期間。秒数で設定し、デフォルトは 172800(2 日)。

AUTH_PASSWORD_DAYS#

How many days Weblate rejects reusing a previously used password for a user.

チェックは監査ログに基づいて実施されます。AUDITLOG_EXPIRY は使用使用日数以上に設定してください。

注釈

Weblate 2.15 以前に行われたパスワードの変更は、このポリシーには含まれません。

デフォルトは 180 日です。

AUTOFIX_LIST#

文字列を保存するときに適用する自動修正の一覧。

注釈

Provide a fully-qualified path to the Python class that implements the autofixer interface.

修正項目の設定方法:

weblate.trans.autofixes.whitespace.SameBookendingWhitespace

文字列の最初と最後の空白を原文と一致させる。

weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis

原文に省略記号(…)が付いている場合は、末尾のドット(...)を置き換える。

weblate.trans.autofixes.chars.RemoveZeroSpace

原文にゼロ幅のスペース文字が含まれていない場合、ゼロ幅のスペース文字を削除する。

weblate.trans.autofixes.chars.RemoveControlChars

原文に制御文字が含まれていない場合は、制御文字を削除する。

weblate.trans.autofixes.chars.RemoveZeroSpace

Replaces sentence full stop in Bangla by the devanagari danda character.

weblate.trans.autofixes.html.BleachHTML

safe-html のフラグが付いた文字列から安全でない HTML マークアップを削除する(参照: 安全でない HTML)。

使用する項目の選択方法:

AUTOFIX_LIST = (
    "weblate.trans.autofixes.whitespace.SameBookendingWhitespace",
    "weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis",
)

BACKGROUND_TASKS#

バージョン 4.5.2 で追加.

コンポーネントに対して時間のかかるメンテナンス タスクを起動させる頻度を定義します。

現在管理できるもの:

可能な選択肢:

  • ``monthly `` (これがデフォルト)

  • weekly

  • daily

  • never

注釈

Weblate に数千個のコンポーネントが含まれている場合、頻度を増やすことは推奨しません。

BASIC_LANGUAGES#

バージョン 4.4 で追加.

List of languages to offer users for starting a new translation. When not specified, a built-in list is used (which includes all commonly used languages, but without country specific variants).

This only limits non privileged users to add unwanted languages. Project admins are still presented with the full selection of languages defined in Weblate.

注釈

This does not define new languages for Weblate — it only filters existing ones in the database.

例:

BASIC_LANGUAGES = {"cs", "it", "ja", "en"}

BORG_EXTRA_ARGS#

バージョン 4.9 で追加.

内蔵のバックアップが起動されたときに、borg create に追加の引数を渡せます。

例:

BORG_EXTRA_ARGS = ["--exclude", "vcs/"]

CACHE_DIR#

バージョン 4.16 で追加.

Weblate がキャッシュ ファイルを保存するディレクトリ。デフォルトは DATA_DIR のサブフォルダ cache です。

DATA_DIR がネットワーク ファイルシステム上にある場合は、これをローカルまたは一時ファイルシステムに変更します。

Docker コンテナでは、静的ファイルは別のボリュームを使用します。参照: Docker コンテナのボリューム

CSP_SCRIPT_SRC、CSP_IMG_SRC、CSP_CONNECT_SRC、CSP_STYLE_SRC、CSP_FONT_SRC#

Weblate の Content-Security-Policy ヘッダーをカスタマイズします。ヘッダーは、サード パーティのサービス(Matomo、Google アナリティクス、Sentry、…)との連携が有効として自動的に生成されます。

これらのデフォルトはすべて空のリストになります。

例:

# Enable Cloudflare Javascript optimizations
CSP_SCRIPT_SRC = ["ajax.cloudflare.com"]

CHECK_LIST#

翻訳に対して実行する品質検査のリストです。

注釈

check インタフェースを実装する Python クラスへの完全修飾パスを指定します。

検査項目を選択して、関連する検査を含めます。

All built-in 品質検査 are turned on by default, from where you can change these settings. By default they are commented out in 設定例 so that default values are used. New checks are then carried out for each new Weblate version.

すべての検査項目を無効にする方法:

CHECK_LIST = ()

指定する項目のみを有効にする方法:

CHECK_LIST = (
    "weblate.checks.chars.BeginNewlineCheck",
    "weblate.checks.chars.EndNewlineCheck",
    "weblate.checks.chars.MaxLengthCheck",
)

注釈

Changing this setting only affects newly changed translations. Existing checks will still be stored in the database. To also apply changes to the stored translations, run weblate updatechecks.

COMMENT_CLEANUP_DAYS#

バージョン 3.6 で追加.

指定した日数の後にコメントを削除します。デフォルトは None で、削除は一切行いません。

COMMIT_PENDING_HOURS#

バックグラウンド タスクを使用して保留中の変更をコミットするまでの時間。

CONTACT_FORM#

バージョン 4.6 で追加.

Configures how e-mail from the contact form is being sent. Choose a configuration that matches the configuration of your mail server.

"reply-to"

送信者は Reply-To に使用します。デフォルトの動作。

"from"

送信者は From に使用します。メール サーバーは、このメール アドレスの送信の許可が必要です。

DATA_DIR#

Weblate フォルダには、すべてのデータが格納されます。このフォルダには、VCS リポジトリへのリンク、フル テキスト インデックス、外部ツール用の各種設定ファイルが含まれています。

通常存在する、サブディレクトリ一覧:

home

スクリプトを起動するためのホーム ディレクトリ。

ssh

SSH 鍵と設定。

static

STATIC_ROOT で指定する、静的 Django ファイルのデフォルトの場所。参照: 静的ファイルの提供

Docker コンテナでは、静的ファイルは別のボリュームを使用します。参照: Docker コンテナのボリューム

media

MEDIA_ROOT で指定する、Django メディア ファイルのデフォルトの場所。アップロードされたスクリーンショットが含まれています。参照: 文字列の視覚情報

vcs

Version-control repositories for translations.

backups

Daily backup data. Please check バックアップ用にダンプしたデータ for details.

fonts:

ユーザーがアップロードしたフォント。参照: フォントの管理

cache

Various caches. Can be placed elsewhere using CACHE_DIR.

Docker コンテナでは、静的ファイルは別のボリュームを使用します。参照: Docker コンテナのボリューム

注釈

このディレクトリは、Weblate の書き込み権限が必要です。uWSGI として実行するには、www-data ユーザーに書き込み権限が必要です。

これを実現する最も簡単な方法は、このユーザーをディレクトリの所有者にすることです。

sudo chown www-data:www-data -R $DATA_DIR

デフォルトは /home/weblate/data ですが、設定が必要です。

DATABASE_BACKUP#

バージョン 3.1 で追加.

データベースのバックアップをプレーン テキストとして保存するか、圧縮するか、何も実行しないかを指定します。設定できる値:

  • "plain"

  • "compressed"

  • "none"

DEFAULT_ACCESS_CONTROL#

バージョン 3.3 で追加.

The default access-control setting for new projects:

0

公開

1

保護

100

プライベート

200

カスタム

ACL を手動で管理する場合は、カスタム を使用します。これは、Weblate の内部管理に依存しないという意味です。

DEFAULT_AUTO_WATCH#

バージョン 4.5 で追加.

新規ユーザーに対して、貢献したプロジェクトを自動的に監視する を有効にするかどうかを設定します。デフォルトは True です。

参考

通知

DEFAULT_RESTRICTED_COMPONENT#

バージョン 4.1 で追加.

コンポーネント制限のデフォルト値。

DEFAULT_ADD_MESSAGE、DEFAULT_ADDON_MESSAGE、DEFAULT_COMMIT_MESSAGE、DEFAULT_DELETE_MESSAGE、DEFAULT_MERGE_MESSAGE#

違う操作のデフォルトのコミット メッセージです。詳細は コンポーネント構成 を確認してください。

DEFAULT_ADDONS#

Default add-ons to install for every created component.

注釈

この設定は、新しく作成したコンポーネントにのみ適用されます。

例:

DEFAULT_ADDONS = {
    # Add-on with no parameters
    "weblate.flags.target_edit": {},
    # Add-on with parameters
    "weblate.autotranslate.autotranslate": {
        "mode": "suggest",
        "filter_type": "todo",
        "auto_source": "mt",
        "component": "",
        "engines": ["weblate-translation-memory"],
        "threshold": "80",
    },
}

DEFAULT_COMMITER_EMAIL#

Committer e-mail address, defaulting to noreply@weblate.org.

DEFAULT_COMMITER_NAME#

Committer name, defaulting to Weblate.

DEFAULT_LANGUAGE#

バージョン 4.3.2 で追加.

原文の言語 for any new components.

デフォルトは en です。一致する言語オブジェクトがデータベースに存在していることが必要です。

DEFAULT_MERGE_STYLE#

バージョン 3.4 で追加.

マージ スタイル for any new components.

  • rebase - デフォルト

  • merge

DEFAULT_SHARED_TM#

バージョン 3.2 で追加.

Configures the default value of 共有翻訳メモリの使用 and 共有翻訳メモリに貢献する.

DEFAULT_TRANSLATION_PROPAGATION#

翻訳の反映のデフォルト設定は True です。

DEFAULT_PULL_MESSAGE#

プル リクエストのデフォルトのタイトルとメッセージの設定。

ENABLE_AVATARS#

Whether to turn on Gravatar-based avatars for users. On by default.

アバターはサーバー上で取得およびキャッシュされ、個人情報が漏洩するリスクが低くなり、ユーザー体験が高速化します。

ENABLE_HOOKS#

Whether to turn on anonymous remote hooks.

ENABLE_HTTPS#

Weblate へのリンクを HTTPS または HTTP として送信するかどうか。この設定は、送信したメールおよび生成した絶対 URL に影響します。

In the default configuration this is also used for several Django settings related to HTTPS — it enables secure cookies, toggles HSTS or enables redirection to a HTTPS URL.

The HTTPS redirection might be problematic in some cases and you might hit an issue with infinite redirection in case you are using a reverse proxy doing an SSL termination which does not correctly pass protocol headers to Django. Please tweak your reverse proxy configuration to emit X-Forwarded-Proto or Forwarded headers or configure SECURE_PROXY_SSL_HEADER to let Django correctly detect the SSL status.

ENABLE_SHARING#

ユーザーが翻訳の進捗状況をソーシャル ネットワーク上で共有できるように、共有 メニューの on/off を切り替えます。

EXTRA_HTML_HEAD#

バージョン 4.15 で追加.

Insert additional markup into the HTML header. Can be used for verification of site ownership, for example:

EXTRA_HTML_HEAD = '<link href="https://fosstodon.org/@weblate" rel="me">'

警告

No sanitization is performed on the string. It is inserted as-is into the HTML header.

GET_HELP_URL#

バージョン 4.5.2 で追加.

Weblate インスタンスのサポートを見つけられる URL。

GITEA_CREDENTIALS#

バージョン 4.12 で追加.

Gitea サーバーの資格情報の一覧。

GITEA_CREDENTIALS = {
    "try.gitea.io": {
        "username": "weblate",
        "token": "your-api-token",
    },
}

The configuration dictionary consists of credentials defined for each API host. The API host might be different from what you use in the web browser, for example GitHub API is accessed as api.github.com.

The following configuration is available for each host:

username

API user, required.

token

API token for the API user, required.

scheme

バージョン 4.18 で追加.

Scheme override. Weblate attempts to parse scheme from the repository URL and falls backs to https. If you are running the API server internally, you might want to use http instead, but consider security.

ヒント

In the Docker container, the credentials are configured in three variables and the credentials are built out of that. An example configuration for GitHub might look like:

WEBLATE_GITHUB_USERNAME=api-user
WEBLATE_GITHUB_TOKEN=api-token
WEBLATE_GITHUB_HOST=api.github.com

Will be used as:

GITHUB_CREDENTIALS = {
    "api.github.com": {
        "username": "api-user",
        "token": "api-token",
    }
}

GITLAB_CREDENTIALS#

バージョン 4.3 で追加.

GitLab サーバーの資格情報の一覧。

GITLAB_CREDENTIALS = {
    "gitlab.com": {
        "username": "weblate",
        "token": "your-api-token",
    },
}

The configuration dictionary consists of credentials defined for each API host. The API host might be different from what you use in the web browser, for example GitHub API is accessed as api.github.com.

The following configuration is available for each host:

username

API user, required.

token

API token for the API user, required.

scheme

バージョン 4.18 で追加.

Scheme override. Weblate attempts to parse scheme from the repository URL and falls backs to https. If you are running the API server internally, you might want to use http instead, but consider security.

ヒント

In the Docker container, the credentials are configured in three variables and the credentials are built out of that. An example configuration for GitHub might look like:

WEBLATE_GITHUB_USERNAME=api-user
WEBLATE_GITHUB_TOKEN=api-token
WEBLATE_GITHUB_HOST=api.github.com

Will be used as:

GITHUB_CREDENTIALS = {
    "api.github.com": {
        "username": "api-user",
        "token": "api-token",
    }
}

GITHUB_CREDENTIALS#

バージョン 4.3 で追加.

GitHub サーバーの資格情報の一覧。

GITHUB_CREDENTIALS = {
    "api.github.com": {
        "username": "weblate",
        "token": "your-api-token",
    },
}

The configuration dictionary consists of credentials defined for each API host. The API host might be different from what you use in the web browser, for example GitHub API is accessed as api.github.com.

The following configuration is available for each host:

username

API user, required.

token

API token for the API user, required.

scheme

バージョン 4.18 で追加.

Scheme override. Weblate attempts to parse scheme from the repository URL and falls backs to https. If you are running the API server internally, you might want to use http instead, but consider security.

ヒント

In the Docker container, the credentials are configured in three variables and the credentials are built out of that. An example configuration for GitHub might look like:

WEBLATE_GITHUB_USERNAME=api-user
WEBLATE_GITHUB_TOKEN=api-token
WEBLATE_GITHUB_HOST=api.github.com

Will be used as:

GITHUB_CREDENTIALS = {
    "api.github.com": {
        "username": "api-user",
        "token": "api-token",
    }
}

BITBUCKETSERVER_CREDENTIALS#

バージョン 4.16 で追加.

Bitbucket サーバーの資格情報の一覧。

BITBUCKETSERVER_CREDENTIALS = {
    "git.self-hosted.com": {
        "username": "weblate",
        "token": "http-access-token",
    },
}

The configuration dictionary consists of credentials defined for each API host. The API host might be different from what you use in the web browser, for example GitHub API is accessed as api.github.com.

The following configuration is available for each host:

username

API user, required.

token

API token for the API user, required.

scheme

バージョン 4.18 で追加.

Scheme override. Weblate attempts to parse scheme from the repository URL and falls backs to https. If you are running the API server internally, you might want to use http instead, but consider security.

ヒント

In the Docker container, the credentials are configured in three variables and the credentials are built out of that. An example configuration for GitHub might look like:

WEBLATE_GITHUB_USERNAME=api-user
WEBLATE_GITHUB_TOKEN=api-token
WEBLATE_GITHUB_HOST=api.github.com

Will be used as:

GITHUB_CREDENTIALS = {
    "api.github.com": {
        "username": "api-user",
        "token": "api-token",
    }
}

GOOGLE_ANALYTICS_ID#

Google アナリティクス ID を使用して Weblate の監視を有効にします。

HIDE_REPO_CREDENTIALS#

Web インターフェイスのリポジトリの認証情報を非表示にします。リポジトリの URL にユーザーとパスワードが設定されている場合、関連情報をユーザーに表示するときには、Weblate がその URL を非表示にします。

例えば https://user:password@git.example.com/repo.git の代わりに https://git.example.com/repo.git` を表示します。VCS のエラーメッセージも同様の方法で消去を試します。

注釈

On by default.

HIDE_VERSION#

バージョン 4.3.1 で追加.

Hides version info from unauthenticated users. This also makes all documentation links point to the latest version instead of the documentation matching the currently installed version.

Hiding the version is a recommended security practice in some corporations, does not prevent an attacker from figuring out version by probing behavior.

注釈

デフォルトで無効です。

INTERLEDGER_PAYMENT_POINTERS#

バージョン 4.12.1 で追加.

Web 収益化のための元帳支払ポインタ(ILP)のリスト。

複数を指定した場合、1 つをランダムに選択して確率的な収益分配を実現します。

詳細は、<https://webmonetization.org/> を確認してください。

ヒント

デフォルトでは、ユーザーは Weblate 自体に資金を提供します。

IP_BEHIND_REVERSE_PROXY#

Weblate がリバース プロキシの背後で動作しているかどうかを示します。

True に設定されている場合、Weblate は IP_PROXY_HEADER で定義したヘッダーから IP アドレスを取得します。

警告

リバース プロキシを実際に使用していること、およびリバース プロキシがこのヘッダーを設定していることを確認します。リバース プロキシを使用していない場合、ユーザーは IP アドレスを偽装できます。

注釈

これはデフォルトで無効です。

IP_PROXY_HEADER#

IP_BEHIND_REVERSE_PROXY が有効の場合、Weblate がどのヘッダーから IP アドレスを取得するかを示します。

デフォルトは HTTP_X_FORWARDED_FOR です。

IP_PROXY_OFFSET#

クライアントの IP アドレスとして IP_PROXY_HEADER のどの部分が使用されているかを示します。

設定により、このヘッダーが複数の IP アドレス(例: X-Forwarded-For: a, b, client-ip)で構成されることがあります。ここで、ヘッダーのどのアドレスをクライアント IP アドレスとして使用するかどうかを設定できます。

警告

Setting this affects the security of your installation. You should only configure it to use trusted proxies for determining the IP address.

デフォルトは 0 です。

LICENSE_EXTRA#

ライセンスの選択肢に含める追加ライセンス。

注釈

各ライセンス定義は、短い名前、長い名前、および URL のタプルであることが必要です。

例:

LICENSE_EXTRA = [
    (
        "AGPL-3.0",
        "GNU Affero General Public License v3.0",
        "https://www.gnu.org/licenses/agpl-3.0-standalone.html",
    ),
]

LICENSE_FILTER#

バージョン 4.3 で変更: これを空の値に設定すると、ライセンス警告が無効になります。

ライセンス表示用のフィルターの一覧。空に設定した場合でもライセンス警告は無効になります。

注釈

このフィルターは、短いライセンス名を使用します。

例:

LICENSE_FILTER = {"AGPL-3.0", "GPL-3.0-or-later"}

ライセンス警告を無効にする方法:

LICENSE_FILTER = set()

LICENSE_REQUIRED#

コンポーネント構成 のライセンス属性が必要かどうかを定義します。

注釈

デフォルトで無効です。

LIMIT_TRANSLATION_LENGTH_BY_SOURCE_LENGTH#

与えられた翻訳の長さを制限するかどうか。制限は、原文の文字列の長さ × 10 文字です。

ヒント

これを False に設定すると、原文の長さに関係なく、より長い翻訳(10,000 文字まで)が可能になります。

注釈

デフォルトは True です。

LOCALIZE_CDN_URL および LOCALIZE_CDN_PATH#

これらの設定では JavaScript 現地語化 CDN アドオンを設定します。 LOCALIZE_CDN_URL は現地語化 CDN が利用可能なルート URL を定義し、LOCALIZE_CDN_PATHLOCALIZE_CDN_URL で提供される生成ファイルを Weblate が保存するパスを定義します。

ヒント

Hosted Weblate では、https://weblate-cdn.com/ を使用します。

LOGIN_REQUIRED_URLS#

サインインが必要な URL の一覧。(Weblate に標準設定済み以外の規則)。

ヒント

これにより、以下方法でインストール全体をパスワードで保護:

LOGIN_REQUIRED_URLS = (r"/(.*)$",)
REST_FRAMEWORK["DEFAULT_PERMISSION_CLASSES"] = [
    "rest_framework.permissions.IsAuthenticated"
]

ヒント

上記の例に示すように、API 接続も隔離することが望ましいです。

参考

REQUIRE_LOGIN

LOGIN_REQUIRED_URLS_EXCEPTIONS#

List of exceptions for LOGIN_REQUIRED_URLS. If not specified, users are allowed to access the sign-in page.

含めたい例外の設定方法:

LOGIN_REQUIRED_URLS_EXCEPTIONS = (
    r"/accounts/(.*)$",  # Required for sign-in
    r"/static/(.*)$",  # Required for development mode
    r"/widgets/(.*)$",  # Allowing public access to widgets
    r"/data/(.*)$",  # Allowing public access to data exports
    r"/hooks/(.*)$",  # Allowing public access to notification hooks
    r"/api/(.*)$",  # Allowing access to API
    r"/js/i18n/$",  # JavaScript localization
)

MATOMO_SITE_ID#

ID of the site in Matomo (formerly Piwik) you want to use for tracking Weblate.

注釈

この連携は、Matomo タグ マネージャーに対応していません。

参考

MATOMO_URL

MATOMO_URL#

Weblate の使用を追跡するために使用する Matomo(以前の Piwik)インストールの完全な URL(末尾のスラッシュを含む)。詳細は <https://matomo.org/> を確認してください。

ヒント

この連携は、Matomo タグ マネージャーに対応していません。

例:

MATOMO_SITE_ID = 1
MATOMO_URL = "https://example.matomo.cloud/"

NEARBY_MESSAGES#

翻訳中に表示する「前後の文字列」の数。単なるデフォルト値であり、ユーザーは ユーザー情報 で数を変更できます。

DEFAULT_PAGE_LIMIT#

バージョン 4.7 で追加.

ページネーション(ページ分割)が有効化されている場合の、デフォルトの表示数。

PAGURE_CREDENTIALS#

バージョン 4.3.2 で追加.

Pagure サーバーの資格情報の一覧です。

PAGURE_CREDENTIALS = {
    "pagure.io": {
        "username": "weblate",
        "token": "your-api-token",
    },
}

The configuration dictionary consists of credentials defined for each API host. The API host might be different from what you use in the web browser, for example GitHub API is accessed as api.github.com.

The following configuration is available for each host:

username

API user, required.

token

API token for the API user, required.

scheme

バージョン 4.18 で追加.

Scheme override. Weblate attempts to parse scheme from the repository URL and falls backs to https. If you are running the API server internally, you might want to use http instead, but consider security.

ヒント

In the Docker container, the credentials are configured in three variables and the credentials are built out of that. An example configuration for GitHub might look like:

WEBLATE_GITHUB_USERNAME=api-user
WEBLATE_GITHUB_TOKEN=api-token
WEBLATE_GITHUB_HOST=api.github.com

Will be used as:

GITHUB_CREDENTIALS = {
    "api.github.com": {
        "username": "api-user",
        "token": "api-token",
    }
}

PRIVACY_URL#

バージョン 4.8.1 で追加.

Weblate インスタンスのプライバシー ポリシーを表示する URL。

ヒント

Weblate の外部で法的な文書をホスティングしている場合、Weblate の内部に埋め込むのに便利です。詳細は 法的文書 を確認してください。

例:

PRIVACY_URL = "https://weblate.org/terms/"

参考

LEGAL_URL

PRIVATE_COMMIT_EMAIL_OPT_IN#

バージョン 4.15 で追加.

Configures whether the private commit e-mail is opt-in or opt-out (by default it is opt-in).

PRIVATE_COMMIT_EMAIL_TEMPLATE#

バージョン 4.15 で追加.

ユーザーごとのコミット用の匿名メールアドレスを生成するためのテンプレート。デフォルトは、"{username}@users.noreply.{site_domain}"

無効にするには、空の文字列に設定します。

注釈

Using different commit e-mail is opt-in for users unless configured by PRIVATE_COMMIT_EMAIL_OPT_IN. Users can configure commit e-mail in the ユーザー情報.

PROJECT_BACKUP_KEEP_COUNT#

バージョン 4.14 で追加.

Defines how many backups per project are kept on the server. Defaults to 3.

PROJECT_BACKUP_KEEP_DAYS#

バージョン 4.14 で追加.

プロジェクトのバックアップがサーバーに保存される期間を定義します。デフォルトは 30 日です。

PROJECT_NAME_RESTRICT_RE#

バージョン 4.15 で追加.

プロジェクトの命名を制限する正規表現を設定します。一致する名前はすべて拒否されます。

PROJECT_WEB_RESTRICT_HOST#

バージョン 4.16.2 で追加.

プロジェクトの Web サイトを、指定したホストで使用禁止にします。すべてのサブドメインを照合するので、example.com が含まれていれば test.example.com も使用禁止となります。ドメインは、照合する前に小文字に変換されて照合されるので、リストは小文字の文字列でのみ記述してください。

デフォルト設定:

PROJECT_WEB_RESTRICT_HOST = {"localhost"}

PROJECT_WEB_RESTRICT_NUMERIC#

バージョン 4.16.2 で追加.

Reject using numeric IP address in project website. On by default.

PROJECT_WEB_RESTRICT_RE#

バージョン 4.15 で追加.

プロジェクトの Web サイトを制限する正規表現を設定します。一致する URL はすべて拒否されます。

RATELIMIT_ATTEMPTS#

バージョン 3.2 で追加.

接続制限が適用されるまでの認証試行の最大回数。

デフォルトは 5 回です。

RATELIMIT_WINDOW#

バージョン 3.2 で追加.

接続制限が適用された後に認証を受け入れる秒数。

An amount of seconds, defaulting to 300 (5 minutes).

RATELIMIT_LOCKOUT#

バージョン 3.2 で追加.

接続制限が適用された後に認証が遮断される秒数。

デフォルトは 600 秒(10 分)です。

REGISTRATION_ALLOW_BACKENDS#

バージョン 4.1 で追加.

登録を許可する認証バックエンドの一覧。これは新しい登録のみを制限し、ユーザーは設定済みのすべての認証バックエンドを使用して認証を行い、認証を追加できます。

It is recommended to keep REGISTRATION_OPEN on while limiting registration backends, otherwise users will be able to register, but Weblate will not show links to register in the user interface.

例:

REGISTRATION_ALLOW_BACKENDS = ["azuread-oauth2", "azuread-tenant-oauth2"]

ヒント

The backend names match names used in the URL for authentication.

REGISTRATION_CAPTCHA#

Whether registration of new accounts is protected by a CAPTCHA. Defaults to enabled.

有効にすると、ユーザーがメール アドレスを入力して CAPTCHA が追加されるすべてのページ:

  • 新規アカウント登録。

  • パスワードの回復。

  • アカウントへのメールアドレスの追加。

  • サイン インしていないユーザーへの問い合わせフォーム。

REGISTRATION_EMAIL_MATCH#

登録できるメール アドレスをフィルター処理できます。

デフォルトは .*、どのようなメールアドレスでも登録できます。

登録を単一のメール アドレスドメインに制限する方法:

REGISTRATION_EMAIL_MATCH = r"^.*@weblate\.org$"

REGISTRATION_OPEN#

Whether registration of new accounts is currently permitted. Defaults to enabled.

この設定はメールアドレスによる組み込みの認証や Python Social Auth による認証に影響します(:setting:`REGISTRATION_ALLOW_BACKENDS`で特定のバックエンドをホワイトリストに登録できます)。

注釈

LDAP 認証 などのサード パーティ認証方法を使用している場合、登録フォームは非表示になりますが、新しいユーザーがサイン インしてアカウントを作成できることがあります。

REGISTRATION_REBIND#

バージョン 4.16 で追加.

既存のユーザの認証バックエンドの再バインドを許可します。認証プロバイダー間の移行時は有効にしてください。

注釈

Off by default to not allow adding other authentication backends to an existing account. Rebinding can lead to account compromise when using more third-party authentication backends.

REPOSITORY_ALERT_THRESHOLD#

バージョン 4.0.2 で追加.

古くなったリポジトリや、変更が多すぎるリポジトリに対して警告を出すためのしきい値。デフォルトは 25 です。

REQUIRE_LOGIN#

バージョン 4.1 で追加.

これにより LOGIN_REQUIRED_URLS が有効になり、REST フレームワークがすべての API エンドポイントに対して認証を要求するように設定されます。

注釈

これは 設定例 に実装されています。Docker の場合は WEBLATE_REQUIRE_LOGIN を使用します。

SENTRY_DSN#

バージョン 3.9 で追加.

エラー レポートの収集 に使用する Sentry DSN。

SIMPLIFY_LANGUAGES#

デフォルトの「言語_国名」の組み合わせには単純な言語コードを使用します。例えば fr_FR の翻訳には fr の言語コードを使用します。通常は、デフォルトの組み合わせの言語の一覧を簡素化するための理想的な方法です。

国や地域ごとに異なる翻訳を行う場合は、この機能を無効にします。

SITE_DOMAIN#

Configures site domain. Necessary to produce correct absolute links in many scopes (for example activation e-mails, notifications or RSS feeds).

If Weblate is running on a non-standard port, include it here as well.

例:

# Production site with domain name
SITE_DOMAIN = "weblate.example.com"

# Local development with IP address and port
SITE_DOMAIN = "127.0.0.1:8000"

注釈

This setting should only contain the domain name. For configuring protocol, (turning on and enforcing HTTPS) use ENABLE_HTTPS and for changing the URL, use URL_PREFIX.

ヒント

Docker コンテナ上では、サイト ドメインは WEBLATE_ALLOWED_HOSTS で設定します。

SITE_TITLE#

Web サイトおよびメール送信に使用するサイト名。

SPECIAL_CHARS#

ビジュアル キーボードに含める追加の文字、ビジュアル キーボード

デフォルト値:

SPECIAL_CHARS = ("\t", "\n", "\u00a0", "…")

SINGLE_PROJECT#

バージョン 3.8 で追加.

Redirects users directly to a project or component instead of showing the dashboard. You can either set it to True so it only works if there is actually only single project in Weblate. Alternatively, set the project slug, and it will redirect unconditionally to this project.

バージョン 3.11 で変更: この設定では、単一のプロジェクトを強制的に表示するために、プロジェクトのスラッグも受け付けるように変更されました。

例:

SINGLE_PROJECT = "test"

SSH_EXTRA_ARGS#

バージョン 4.9 で追加.

Allows adding custom parameters when Weblate is invoking SSH. Useful when connecting to servers using legacy encryption or other non-standard features.

For example when SSH connection in Weblate fails with Unable to negotiate with legacyhost: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1, you can turn that on using:

SSH_EXTRA_ARGS = "-oKexAlgorithms=+diffie-hellman-group1-sha1"

ヒント

The string is evaluated by the shell, so ensure any whitespace and special characters is quoted.

STATUS_URL#

Weblate インスタンスが状況を報告する URL。

SUGGESTION_CLEANUP_DAYS#

バージョン 3.2.1 で追加.

指定された日数が経過すると、提案が自動的に削除されます。デフォルトは None で、削除しないことを意味します。

UNUSED_ALERT_DAYS#

バージョン 4.17 で追加.

Configures when the Component seems unused alert is triggered.

Defaults to 365 days, set to 0 to turn it off.

UPDATE_LANGUAGES#

バージョン 4.3.2 で追加.

Controls whether languages database should be updated when running database migration and is on by default. This setting has no effect on invocation of weblate setuplang.

警告

The languages display might become inconsistent with this. Weblate language definitions expand over time and it will not display language code for the defined languages.

URL_PREFIX#

この設定では、Weblate を指定したパスで実行できます(そうでない場合は、Weblate サーバーのルートからの実行に依存します)。

注釈

この設定を使用するには、この接頭辞を削除してサーバーを設定することが必要です。例えば WSGI では、WSGIScriptAlias を設定して実行できます。

ヒント

接頭辞は / で開始してください。

例:

URL_PREFIX = "/translations"

注釈

この設定は Django の内蔵サーバーでは動作しません。urls.py を設定して接頭辞を含めることが必要です。

VCS_API_DELAY#

バージョン 4.15.1 で追加.

GitHub プルリクエストGitLab マージリクエストGitea プルリクエストPagure マージリクエスト で、サードパーティ API 呼び出し間の最小遅延を秒単位で設定します。

これにより、Weblate からサービスへの API コールが過負荷にならないようにレート制限します。

If you are being limited by secondary rate-limiter at GitHub, increasing this might help.

デフォルト値は 10 です。

VCS_BACKENDS#

使用可能な VCS バックエンドの設定。

注釈

Weblate は、対応しているすべてのバックエンドの使用を試します。

ヒント

これを使用して、選択を制限したり、カスタム VCS バックエンドを追加できます。

VCS_BACKENDS = ("weblate.vcs.git.GitRepository",)

VCS_CLONE_DEPTH#

バージョン 3.10.2 で追加.

Weblate がリポジトリをディープ クローンする深さを設定します。

注釈

現在のところ、これは Git でのみ対応しています。デフォルトでは、Weblate はリポジトリの浅いクローンを作成します。使い方によっては(例: カスタムの アドオン を使用している場合など)、この値を 0 に設定して浅いクローンを完全に無効にしたり、深さを増やすこともできます。

ヒント

Weblate からプッシュするときに fatal: protocol error: expected old/new/ref, got 'shallow <commit hash>' エラーが発生した場合は、以下を設定して浅いクローンを完全に無効にします。

VCS_CLONE_DEPTH = 0

WEBLATE_ADDONS#

使用可能なアドオンの一覧。これらを使用するには、特定の翻訳コンポーネントを有効にすることが必要です。デフォルトでは、付属のアドオンはすべて含みますが、一覧を増やす場合は、デフォルトのアドオンを有効することが必要です。

WEBLATE_ADDONS = (
    # Built-in add-ons
    "weblate.addons.gettext.GenerateMoAddon",
    "weblate.addons.gettext.UpdateLinguasAddon",
    "weblate.addons.gettext.UpdateConfigureAddon",
    "weblate.addons.gettext.MsgmergeAddon",
    "weblate.addons.gettext.GettextCustomizeAddon",
    "weblate.addons.gettext.GettextAuthorComments",
    "weblate.addons.cleanup.CleanupAddon",
    "weblate.addons.consistency.LangaugeConsistencyAddon",
    "weblate.addons.discovery.DiscoveryAddon",
    "weblate.addons.flags.SourceEditAddon",
    "weblate.addons.flags.TargetEditAddon",
    "weblate.addons.flags.SameEditAddon",
    "weblate.addons.flags.BulkEditAddon",
    "weblate.addons.generate.GenerateFileAddon",
    "weblate.addons.json.JSONCustomizeAddon",
    "weblate.addons.xml.XMLCustomizeAddon",
    "weblate.addons.properties.PropertiesSortAddon",
    "weblate.addons.git.GitSquashAddon",
    "weblate.addons.removal.RemoveComments",
    "weblate.addons.removal.RemoveSuggestions",
    "weblate.addons.resx.ResxUpdateAddon",
    "weblate.addons.autotranslate.AutoTranslateAddon",
    "weblate.addons.yaml.YAMLCustomizeAddon",
    "weblate.addons.cdn.CDNJSAddon",
    # Add-on you want to include
    "weblate.addons.example.ExampleAddon",
)

注釈

Removing the add-on from the list does not uninstall it from the components. Weblate will crash in that case. Please uninstall the add-on from all components prior to removing it from this list.

WEBLATE_EXPORTERS#

バージョン 4.2 で追加.

翻訳や用語集をさまざまなファイル形式でダウンロードできるエクスポートの一覧です。

WEBLATE_FORMATS#

バージョン 3.0 で追加.

使用可能なファイル形式の一覧。

注釈

デフォルトの一覧には、すでに一般的な形式があります。

WEBLATE_MACHINERY#

バージョン 4.13 で追加.

使用可能な機械翻訳サービスの一覧。

WEBLATE_GPG_IDENTITY#

バージョン 3.1 で追加.

Weblate が Git コミットに署名するために使用する ID。設定例:

WEBLATE_GPG_IDENTITY = "Weblate <weblate@example.com>"

Weblate GPG キーリングは、一致するキーを探します(DATA_DIR の下で home/.gnupg)。見つからない場合は鍵が生成されます、詳細は GnuPG を使用した Git コミットの署名 を確認してください。

WEBSITE_REQUIRED#

Defines whether プロジェクトの Web サイト has to be specified when creating a project. On by default, as that suits public server setups.