Skip to content

Commit 239f5a2

Browse files
committed
Really fix the example paths
1 parent 4c608e6 commit 239f5a2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fluent-bundle/examples/simple-app.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ fn get_available_locales() -> Result<Vec<LanguageIdentifier>, io::Error> {
5151
let mut locales = vec![];
5252

5353
let mut dir = env::current_dir()?;
54+
if dir.to_string_lossy().ends_with("fluent-rs") {
55+
dir.push("fluent-bundle");
56+
}
5457
dir.push("examples");
5558
dir.push("resources");
5659
let res_dir = fs::read_dir(dir)?;
@@ -105,6 +108,9 @@ fn main() {
105108
// 6. Load the localization resource
106109
for path in L10N_RESOURCES {
107110
let mut full_path = env::current_dir().expect("Failed to retireve current dir.");
111+
if full_path.to_string_lossy().ends_with("fluent-rs") {
112+
full_path.push("fluent-bundle");
113+
}
108114
full_path.push("examples");
109115
full_path.push("resources");
110116
full_path.push(current_locale.to_string());

0 commit comments

Comments
 (0)