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")],
|
||||
)
|
||||
|
||||
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 ...)
|
||||
exports_files(
|
||||
["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
|
||||
from typing import Optional, Tuple
|
||||
|
||||
repos_bzl = "repos.bzl"
|
||||
working_folder = "../anki-i18n"
|
||||
|
||||
if not os.path.exists(repos_bzl):
|
||||
raise Exception("run from workspace root")
|
||||
root = os.environ["BUILD_WORKSPACE_DIRECTORY"]
|
||||
repos_bzl = os.path.join(root, "repos.bzl")
|
||||
working_folder = os.path.join(root, "..", "anki-i18n")
|
||||
|
||||
if not os.path.exists(working_folder):
|
||||
os.mkdir(working_folder)
|
||||
@ -35,12 +33,12 @@ modules = [
|
||||
Module(
|
||||
name="core",
|
||||
repo="git@github.com:ankitects/anki-core-i18n",
|
||||
ftl=("ftl/core", "core/templates"),
|
||||
ftl=(os.path.join(root, "ftl", "core"), "core/templates"),
|
||||
),
|
||||
Module(
|
||||
name="qtftl",
|
||||
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)
|
||||
open(path, "w").writelines(out)
|
||||
|
||||
commit_if_changed(".")
|
||||
commit_if_changed(root)
|
||||
|
||||
|
||||
def commit_if_changed(folder: str):
|
@ -7,15 +7,3 @@ py_binary(
|
||||
stamp = 1,
|
||||
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