kalima-push and kalima-pull
These actions live in this repo:
.github/actions/kalima-push.github/actions/kalima-pull
kalima-push
Inputs:
project-key(required)sync-secret(required)api-url(optional, defaulthttps://api.kalima.digital/api/v1)
Behavior (high level):
- Discovers translation files under common folders (
locales/,i18n/,translations/, andsrc/*variants) - If
.locale/config.jsonexists, it can explicitly map locales to file paths - Signs the request with HMAC-SHA256 and sends files to
POST /api/sync/pushon your Kalima API
kalima-pull
Inputs:
project-key(required)sync-secret(required)api-url(optional, defaulthttps://api.kalima.digital/api/v1)format(optional, defaultjson)locales(optional, comma-separated)structure(optional, defaultflat)status(optional, defaultapproved)
Behavior (high level):
- Signs the request with HMAC-SHA256 and fetches files from
GET /api/sync/pullon your Kalima API - Writes files into
locales/by default (or.locale/config.jsonoutputDir) - If
.locale/config.jsonhaspaths, it writes each locale to the configured path
Request signing
Both actions send these headers:
x-project-keyx-sync-tsx-sync-noncex-sync-signature
The signature payload is:
METHOD
PATH
PROJECT_KEY
TIMESTAMP
NONCE
PATH is the request path without query parameters, for example /api/sync/pull.
.locale/config.json (example)
{
"outputDir": "locales",
"paths": {
"en": "locales/en.json",
"fr": "locales/fr.json"
}
}