Skip to main content

Module translation_hub

Module translation_hub 

Source
Expand description

Submission of translations to the Translation Hub, and the GitHub sign-in it needs.

The GitHub token is kept in the OS keyring and never leaves the server: frontends only see the sign-in state and the account’s login.

Enums§

SubmitOutcome
Result of trying to submit a translation.

Constants§

HUB_OVERRIDE_VAR 🔒
Environment variable to submit to another repository (owner/name) instead of the real hub. Debug builds only.
KEYRING_GITHUB_TOKEN 🔒
Name of the keyring entry holding the GitHub token.
KEYRING_SERVICE 🔒
Service name of RPFM’s entries in the OS keyring.

Functions§

account
Login of the GitHub account the user is signed in as.
hub_repository 🔒
Owner and name of the repository translations are submitted to.
keyring_entry 🔒
Keyring entry holding the GitHub token.
keyring_error 🔒
Explain keyring errors, as they’re usually about the system’s keyring being unavailable.
sign_in_poll
Check a GitHub sign-in. Once approved, keeps the token in the OS keyring and the account’s login in the settings.
sign_in_start
Start a GitHub sign-in with the device flow.
sign_out
Sign out of GitHub, deleting the stored token and login.
submit
Submit a saved translation to the Translation Hub, or update its open pull request.
token 🔒
Stored GitHub token, if the user is signed in.