Skip to content

Commit

Permalink
DartToCsv: fix project parsing error
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Ricchi <[email protected]>
  • Loading branch information
AndreaRicchi committed Nov 15, 2023
1 parent 556f00f commit fb556e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dart_to_csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn read_file(path: String) -> Vec<String> {
result.pop();
}

if translations.contains(&result) {
if !translations.contains(&result) {
println!("1.Translation found: {result}");
translations.push(result);
}
Expand Down Expand Up @@ -81,6 +81,10 @@ fn write_file(
}

pub fn dart_to_csv(path: &String, language: &String) {
if path.is_empty() || language.is_empty() {
return;
}

let mut all_translations = Vec::new();

let project_path = { path }.to_owned() + "/**/*.dart";
Expand Down

0 comments on commit fb556e1

Please sign in to comment.