move other i18n scripts to ftl/
This commit is contained in:
parent
52617511b0
commit
1e8e4ee603
@ -27,6 +27,26 @@ py_test(
|
|||||||
deps = [requirement("fluent-syntax")],
|
deps = [requirement("fluent-syntax")],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
py_binary(
|
||||||
|
name = "sync",
|
||||||
|
srcs = ["sync.py"],
|
||||||
|
tags = ["manual"],
|
||||||
|
)
|
||||||
|
|
||||||
|
py_binary(
|
||||||
|
name = "extract-strings",
|
||||||
|
srcs = ["extract-strings.py"],
|
||||||
|
tags = ["manual"],
|
||||||
|
deps = [requirement("fluent-syntax")],
|
||||||
|
)
|
||||||
|
|
||||||
|
py_binary(
|
||||||
|
name = "transform-string",
|
||||||
|
srcs = ["transform-string.py"],
|
||||||
|
tags = ["manual"],
|
||||||
|
deps = [requirement("fluent-syntax")],
|
||||||
|
)
|
||||||
|
|
||||||
# export this file as a way of locating the top level folder in $(location ...)
|
# export this file as a way of locating the top level folder in $(location ...)
|
||||||
exports_files(
|
exports_files(
|
||||||
["BUILD.bazel"],
|
["BUILD.bazel"],
|
||||||
|
3
ftl/README.md
Normal file
3
ftl/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Files related to Anki's translations.
|
||||||
|
|
||||||
|
Please see https://translating.ankiweb.net/#/anki/developers
|
@ -10,11 +10,9 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from typing import Optional, Tuple
|
from typing import Optional, Tuple
|
||||||
|
|
||||||
repos_bzl = "repos.bzl"
|
root = os.environ["BUILD_WORKSPACE_DIRECTORY"]
|
||||||
working_folder = "../anki-i18n"
|
repos_bzl = os.path.join(root, "repos.bzl")
|
||||||
|
working_folder = os.path.join(root, "..", "anki-i18n")
|
||||||
if not os.path.exists(repos_bzl):
|
|
||||||
raise Exception("run from workspace root")
|
|
||||||
|
|
||||||
if not os.path.exists(working_folder):
|
if not os.path.exists(working_folder):
|
||||||
os.mkdir(working_folder)
|
os.mkdir(working_folder)
|
||||||
@ -35,12 +33,12 @@ modules = [
|
|||||||
Module(
|
Module(
|
||||||
name="core",
|
name="core",
|
||||||
repo="git@github.com:ankitects/anki-core-i18n",
|
repo="git@github.com:ankitects/anki-core-i18n",
|
||||||
ftl=("ftl/core", "core/templates"),
|
ftl=(os.path.join(root, "ftl", "core"), "core/templates"),
|
||||||
),
|
),
|
||||||
Module(
|
Module(
|
||||||
name="qtftl",
|
name="qtftl",
|
||||||
repo="git@github.com:ankitects/anki-desktop-ftl",
|
repo="git@github.com:ankitects/anki-desktop-ftl",
|
||||||
ftl=("ftl/qt", "desktop/templates"),
|
ftl=(os.path.join(root, "ftl", "qt"), "desktop/templates"),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -103,7 +101,7 @@ def update_repos_bzl():
|
|||||||
out.append(line)
|
out.append(line)
|
||||||
open(path, "w").writelines(out)
|
open(path, "w").writelines(out)
|
||||||
|
|
||||||
commit_if_changed(".")
|
commit_if_changed(root)
|
||||||
|
|
||||||
|
|
||||||
def commit_if_changed(folder: str):
|
def commit_if_changed(folder: str):
|
@ -7,15 +7,3 @@ py_binary(
|
|||||||
stamp = 1,
|
stamp = 1,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
py_binary(
|
|
||||||
name = "extract-strings",
|
|
||||||
srcs = ["extract-strings.py"],
|
|
||||||
deps = [requirement("fluent-syntax")],
|
|
||||||
)
|
|
||||||
|
|
||||||
py_binary(
|
|
||||||
name = "transform-string",
|
|
||||||
srcs = ["transform-string.py"],
|
|
||||||
deps = [requirement("fluent-syntax")],
|
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user