Skip to content

Commit

Permalink
Fix rust-embed errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
futursolo committed Sep 9, 2023
1 parent ff1bc70 commit e5d703a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions crates/fl-www/src/i18n.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
use i18n_embed::fluent::{fluent_language_loader, FluentLanguageLoader};
use i18n_embed::{LanguageLoader, WebLanguageRequester};
use once_cell::sync::Lazy;
use rust_embed::RustEmbed;
use unic_langid::LanguageIdentifier;
use yew_router::prelude::Routable;

use crate::prelude::*;

#[derive(Debug, RustEmbed)]
#[folder = "../../i18n"] // path to the compiled localization resources
struct Localizations;
mod l10n_embed {
// We only want to suppress this limit for Localization.
#![allow(non_upper_case_globals)]

use rust_embed::RustEmbed;

#[derive(Debug, RustEmbed)]
#[folder = "../../i18n"] // path to the compiled localization resources
pub(super) struct Localizations;
}

use l10n_embed::Localizations;

pub(crate) trait LanguageExt {
fn detect() -> Self;
Expand Down

0 comments on commit e5d703a

Please sign in to comment.