Migrate translations upload to use Lokalise CLI 2 (#36247)
parent
ff9de687c0
commit
35c00fed6d
|
@ -3,7 +3,6 @@ import pathlib
|
|||
|
||||
CORE_PROJECT_ID = "130246255a974bd3b5e8a1.51616605"
|
||||
FRONTEND_PROJECT_ID = "3420425759f6d6d241f598.13594006"
|
||||
CLI_1_DOCKER_IMAGE = "b8329d20280263cad04f65b843e54b9e8e6909a348a678eac959550b5ef5c75f"
|
||||
CLI_2_DOCKER_IMAGE = "v2.3.0"
|
||||
INTEGRATIONS_DIR = pathlib.Path("homeassistant/components")
|
||||
FRONTEND_DIR = pathlib.Path("../frontend")
|
||||
|
|
|
@ -6,7 +6,7 @@ import pathlib
|
|||
import re
|
||||
import subprocess
|
||||
|
||||
from .const import CLI_1_DOCKER_IMAGE, CORE_PROJECT_ID, INTEGRATIONS_DIR
|
||||
from .const import CLI_2_DOCKER_IMAGE, CORE_PROJECT_ID, INTEGRATIONS_DIR
|
||||
from .error import ExitApp
|
||||
from .util import get_current_branch, get_lokalise_token
|
||||
|
||||
|
@ -26,21 +26,21 @@ def run_upload_docker():
|
|||
"-v",
|
||||
f"{LOCAL_FILE}:{CONTAINER_FILE}",
|
||||
"--rm",
|
||||
f"lokalise/lokalise-cli@sha256:{CLI_1_DOCKER_IMAGE}",
|
||||
f"lokalise/lokalise-cli-2:{CLI_2_DOCKER_IMAGE}",
|
||||
# Lokalise command
|
||||
"lokalise",
|
||||
"lokalise2",
|
||||
"--token",
|
||||
get_lokalise_token(),
|
||||
"import",
|
||||
"--project-id",
|
||||
CORE_PROJECT_ID,
|
||||
"file",
|
||||
"upload",
|
||||
"--file",
|
||||
CONTAINER_FILE,
|
||||
"--lang_iso",
|
||||
"--lang-iso",
|
||||
LANG_ISO,
|
||||
"--convert_placeholders",
|
||||
"0",
|
||||
"--replace",
|
||||
"1",
|
||||
"--convert-placeholders=false",
|
||||
"--replace-modified",
|
||||
],
|
||||
)
|
||||
print()
|
||||
|
|
Loading…
Reference in New Issue