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
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_fluent"
version = "0.13.0"
version = "0.14.0"
authors = ["g <kgv@users.noreply.github.com>"]
edition = "2021"
description = "Bevy plugin for localization using Fluent"
Expand All @@ -18,7 +18,7 @@ categories = [
exclude = [".github/**/*"]

[dependencies]
bevy = { version = "0.17", default-features = false, features = [
bevy = { version = "0.18", default-features = false, features = [
"bevy_asset",
"bevy_log",
] }
Expand All @@ -28,7 +28,7 @@ fluent_content = "0.0.5"
futures-lite = "2.2.0"
indexmap = { version = "2.2.5", features = ["serde"] }
intl-memoizer = "0.5.1"
ron = "0.8.1"
ron = "0.12"
serde = { version = "1.0.197", features = ["derive"] }
serde_yaml = "0.9.32"
thiserror = "1.0.58"
Expand All @@ -37,5 +37,5 @@ unic-langid = { version = "0.9.4", features = ["serde"] }
uuid = { version = "1.7.0", features = ["serde", "v4", "v5"] }

[dev-dependencies]
bevy = "0.17"
bevy = "0.18"
unic-langid = { version = "0.9.4", features = ["macros"] }
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

| bevy | bevy_fluent |
| ---- | ----------- |
| 0.18 | 0.14 |
| 0.17 | 0.13 |
| 0.16 | 0.12 |
| 0.15 | 0.11 |
Expand Down
8 changes: 4 additions & 4 deletions src/assets/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl Deref for BundleAsset {
}

/// [`AssetLoader`](bevy::asset::AssetLoader) implementation for [`BundleAsset`]
#[derive(Default)]
#[derive(Default, TypePath)]
pub struct BundleAssetLoader;

impl AssetLoader for BundleAssetLoader {
Expand All @@ -43,7 +43,7 @@ impl AssetLoader for BundleAssetLoader {
_: &Self::Settings,
load_context: &mut LoadContext<'_>,
) -> Result<Self::Asset, Self::Error> {
let path = load_context.path();
let path = load_context.path().path();
let mut content = String::new();
reader.read_to_string(&mut content).await?;
match path.extension() {
Expand All @@ -70,12 +70,12 @@ struct Data {
resources: Vec<PathBuf>,
}

#[instrument(fields(path = %load_context.path().display()), skip_all)]
#[instrument(fields(path = %load_context.path().path().display()), skip_all)]
async fn load(data: Data, load_context: &mut LoadContext<'_>) -> Result<BundleAsset> {
let mut bundle = FluentBundle::new_concurrent(vec![data.locale.clone()]);
for mut path in data.resources {
if path.is_relative() {
if let Some(parent) = load_context.path().parent() {
if let Some(parent) = load_context.path().path().parent() {
path = parent.join(path);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/assets/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl Deref for ResourceAsset {

/// [`AssetLoader`](bevy::asset::AssetLoader) implementation for
/// [`ResourceAsset`]
#[derive(Default)]
#[derive(Default, TypePath)]
pub struct ResourceAssetLoader;

impl AssetLoader for ResourceAssetLoader {
Expand Down