translation: upload placeholder Fluent files to test Weblate

This commit is contained in:
Mikolaj Wielgus 2024-08-07 20:53:55 +02:00
parent deb2fffbf1
commit a04caeae9c
5 changed files with 21 additions and 0 deletions

View File

@ -35,6 +35,7 @@ contracts = "0.6.3"
bimap = "0.6.3"
log = "0.4"
utf8-chars = "3.0.2"
fluent-templates = "0.9.4"
[dependencies.specctra_derive]
path = "macro/specctra_derive"

1
locales/core.ftl Normal file
View File

@ -0,0 +1 @@
-something = foo

1
locales/en-US/main.ftl Normal file
View File

@ -0,0 +1 @@
reference = simple text with a reference: { -something }

View File

@ -11,6 +11,15 @@ mod painter;
mod top;
mod viewport;
use app::App;
use fluent_templates::static_loader;
static_loader! {
static LOCALES = {
locales: "./locales",
fallback_language: "en-US",
core_locales: "./locales/core.ftl",
};
}
// Build to native.
#[cfg(not(target_arch = "wasm32"))]

View File

@ -1,4 +1,5 @@
use clap::{Error, Parser};
use fluent_templates::static_loader;
use std::fs::File;
use std::io::prelude::*;
use std::io::BufReader;
@ -10,6 +11,14 @@ use topola::autorouter::selection::Selection;
use topola::autorouter::Autorouter;
use topola::specctra::design::SpecctraDesign;
static_loader! {
static LOCALES = {
locales: "./locales",
fallback_language: "en-US",
core_locales: "./locales/core.ftl",
};
}
#[derive(Parser, Debug, Default)]
#[command(about, version)]
struct Cli {