Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ WAMR_BUILD_PLATFORM = "XILA"
WAMR_SHARED_PLATFORM_CONFIG = { value = "executables/wasm/bindings/wamr/shared_platform.cmake", relative = true }
LLVM_LIB_CFG_PATH = "/usr/lib/llvm-19/cmake/"
LITTLEFS_CONFIG = { value = "modules/little_fs/include/little_fs_config.h", relative = true }
INTERNATIONALIZATION_LOCALE = "en"
INTERNATIONALIZATION_FALLBACK = "en"
EMBEDDED_I18N_LOCALE = "en"
EMBEDDED_I18N_FALLBACK = "en"

[target.wasm32-unknown-unknown]
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Build | WASM demonstration (en)
working-directory: ./examples/wasm
env:
INTERNATIONALIZATION_LOCALE: en
EMBEDDED_I18N_LOCALE: en
run: |
(cd ../../ && cargo make generate-fonts)
trunk build --release --public-url ./
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Build | WASM demonstration (fr)
working-directory: ./examples/wasm
env:
INTERNATIONALIZATION_LOCALE: fr
EMBEDDED_I18N_LOCALE: fr
run: |
(cd ../../ && cargo make generate-fonts)
trunk build --release --public-url ./
Expand Down
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lto = true

[dependencies]
# - Always included
internationalization = { workspace = true }
embedded-i18n = { workspace = true }


# - Host
Expand Down Expand Up @@ -88,7 +88,7 @@ target = { path = "modules/target" }
network = { path = "modules/network" }
peripherals = { path = "modules/peripherals" }
bootsplash = { path = "modules/bootsplash" }
internationalization = { path = "modules/internationalization" }
embedded-i18n = { git = "https://github.com/AlixANNERAUD/embedded-i18n.git" }
testing = { path = "modules/testing" }
device = { path = "modules/device" }

Expand Down Expand Up @@ -175,8 +175,7 @@ members = [
"drivers/shared",
"drivers/std",
"drivers/wasm",
"modules/internationalization",
"modules/internationalization/macros",

"modules/graphics/fonts_generator",
"modules/testing",
"modules/device",
Expand Down
2 changes: 1 addition & 1 deletion executables/calculator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024"

[dependencies]
internationalization = { workspace = true }
embedded-i18n = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm = { workspace = true, features = ["guest", "graphics"] }
Expand Down
2 changes: 1 addition & 1 deletion executables/calculator/src/evaluator.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::parser::{BinaryOperator, Expression, UnaryOperator};
use crate::token::FunctionToken;
use internationalization::translate;
use embedded_i18n::translate;

pub struct Evaluator;

Expand Down
2 changes: 1 addition & 1 deletion executables/calculator/src/interface.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{evaluator::Evaluator, parser::Parser};
use internationalization::translate;
use embedded_i18n::translate;
use std::{ptr::null_mut, thread::sleep};
use wasm::{
self, Color, EventCode, FlexFlow, Object, ObjectFlag, buttonmatrix_create,
Expand Down
4 changes: 1 addition & 3 deletions executables/calculator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ fn main() {
fn main() {
println!(
"{}",
internationalization::translate!(
"This executable is intended to be run in a WASM environment."
)
embedded_i18n::translate!("This executable is intended to be run in a WASM environment.")
);
}
2 changes: 1 addition & 1 deletion executables/calculator/src/parser.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::iter::Peekable;

use internationalization::translate;
use embedded_i18n::translate;

use crate::{
lexer::Lexer,
Expand Down
2 changes: 1 addition & 1 deletion executables/weather/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024"

[dependencies]
internationalization = { workspace = true }
embedded-i18n = { workspace = true }
miniserde = { workspace = true }
shared = { workspace = true }
task = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion modules/authentication/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ file_system = { workspace = true }
device = { workspace = true }

miniserde = { workspace = true }
internationalization = { workspace = true }
embedded-i18n = { workspace = true }
2 changes: 1 addition & 1 deletion modules/authentication/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! including user and group management, file I/O, and password validation.

use core::fmt::Display;
use internationalization::translate;
use embedded_i18n::translate;

/// Result type alias for authentication operations.
///
Expand Down
2 changes: 1 addition & 1 deletion modules/executable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task = { workspace = true }
users = { workspace = true }
shared = { workspace = true }
log = { workspace = true }
internationalization = { workspace = true }
embedded-i18n = { workspace = true }

[dev-dependencies]
drivers_native = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion modules/executable/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use core::fmt::Display;
use internationalization::translate;
use embedded_i18n::translate;

pub type Result<T> = core::result::Result<T, Error>;

Expand Down
2 changes: 1 addition & 1 deletion modules/file_system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ task = { workspace = true }
users = { workspace = true }
shared = { workspace = true }
synchronization = { workspace = true }
internationalization = { workspace = true }
embedded-i18n = { workspace = true }

embedded-io-async = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion modules/file_system/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! along with conversion traits and display implementations for comprehensive error reporting.

use core::{fmt::Display, num::NonZeroU32};
use internationalization::translate;
use embedded_i18n::translate;

/// Standard result type for file system operations.
///
Expand Down
2 changes: 1 addition & 1 deletion modules/graphics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ shared = { workspace = true }
synchronization = { workspace = true }
log = { workspace = true }
abi_declarations = { workspace = true }
internationalization = { workspace = true }
embedded-i18n = { workspace = true }

task = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion modules/graphics/fonts_generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version = "0.1.0"
edition = "2024"

[dependencies]
internationalization = { workspace = true, features = ["std"] }
embedded-i18n = { workspace = true, features = ["std"] }
13 changes: 6 additions & 7 deletions modules/graphics/fonts_generator/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{env, fs, ops::Range, path::Path, process::Command};

use internationalization::{format_ranges, merge_contiguous_ranges};
use embedded_i18n::{format_ranges, merge_contiguous_ranges};

pub const FONTS: &[(u8, &str, &str, bool)] = &[
(10, "Montserrat-Regular.ttf", "montserrat", true),
Expand Down Expand Up @@ -98,13 +98,12 @@ pub fn generate_font<'a>(
}

fn main() {
let locale = internationalization::get_locale_build();
let fallback_locale = internationalization::get_fallback_locale_build();
let locale = embedded_i18n::get_locale_build();
let fallback_locale = embedded_i18n::get_fallback_locale_build();

let locale_range =
internationalization::get_locale_ranges(&locale).expect("Unsupported locale");
let fallback_range = internationalization::get_locale_ranges(&fallback_locale)
.expect("Unsupported fallback locale");
let locale_range = embedded_i18n::get_locale_ranges(&locale).expect("Unsupported locale");
let fallback_range =
embedded_i18n::get_locale_ranges(&fallback_locale).expect("Unsupported fallback locale");

let ranges = locale_range
.iter()
Expand Down
2 changes: 1 addition & 1 deletion modules/graphics/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use core::fmt::Display;
use internationalization::translate;
use embedded_i18n::translate;

pub type Result<T> = core::result::Result<T, Error>;

Expand Down
12 changes: 0 additions & 12 deletions modules/internationalization/Cargo.toml

This file was deleted.

15 changes: 0 additions & 15 deletions modules/internationalization/macros/Cargo.toml

This file was deleted.

4 changes: 0 additions & 4 deletions modules/internationalization/macros/build.rs

This file was deleted.

116 changes: 0 additions & 116 deletions modules/internationalization/macros/src/lib.rs

This file was deleted.

Loading
Loading