anki/cargo/remote/BUILD.phf_macros-0.8.0.bazel
Damien Elmes 9aece2a7b8 rework translation handling
Instead of generating a fluent.proto file with a giant enum, create
a .json file representing the translations that downstream consumers
can use for code generation.

This enables the generation of a separate method for each translation,
with a docstring that shows the actual text, and any required arguments
listed in the function signature.

The codebase is still using the old enum for now; updating it will need
to come in future commits, and the old enum will need to be kept
around, as add-ons are referencing it.

Other changes:

- move translation code into a separate crate
- store the translations on a per-file/module basis, which will allow
us to avoid sending 1000+ strings on each JS page load in the future
- drop the undocumented support for external .ftl files, that we weren't
using
- duplicate strings in translation files are now checked for at build
time
- fix i18n test failing when run outside Bazel
- drop slog dependency in i18n module
2021-03-26 09:41:32 +10:00

68 lines
1.5 KiB
Plaintext
Vendored

"""
@generated
cargo-raze crate build file.
DO NOT EDIT! Replaced on runs of cargo-raze
"""
# buildifier: disable=load
load(
"@io_bazel_rules_rust//rust:rust.bzl",
"rust_binary",
"rust_library",
"rust_test",
)
# buildifier: disable=load
load("@bazel_skylib//lib:selects.bzl", "selects")
package(default_visibility = [
# Public for visibility by "@raze__crate__version//" targets.
#
# Prefer access through "//cargo", which limits external
# visibility to explicit Cargo.toml dependencies.
"//visibility:public",
])
licenses([
"notice", # MIT from expression "MIT"
])
# Generated Targets
# Unsupported target "bench" with type "bench" omitted
rust_library(
name = "phf_macros",
srcs = glob(["**/*.rs"]),
crate_features = [
],
crate_root = "src/lib.rs",
crate_type = "proc-macro",
data = [],
edition = "2018",
proc_macro_deps = [
"@raze__proc_macro_hack__0_5_19//:proc_macro_hack",
],
rustc_flags = [
"--cap-lints=allow",
],
tags = [
"cargo-raze",
"manual",
],
version = "0.8.0",
# buildifier: leave-alone
deps = [
"@raze__phf_generator__0_8_0//:phf_generator",
"@raze__phf_shared__0_8_0//:phf_shared",
"@raze__proc_macro2__1_0_24//:proc_macro2",
"@raze__quote__1_0_9//:quote",
"@raze__syn__1_0_63//:syn",
],
)
# Unsupported target "compiletest" with type "test" omitted
# Unsupported target "test" with type "test" omitted