diff --git a/Cargo.toml b/Cargo.toml index ff3c71052..524821295 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,6 +86,7 @@ exclude = [ "kernel", "loader", "utralib", # Exclude UTRA, since it is machine-generated. + "locales", # exclude because it is machine-generated ] [profile.release] diff --git a/locales/src/.gitignore b/locales/src/.gitignore index 515873a54..c3cfc5df3 100644 --- a/locales/src/.gitignore +++ b/locales/src/.gitignore @@ -1 +1 @@ -lib.rs +generated.rs diff --git a/xtask/src/generate_locales.rs b/xtask/src/generate_locales.rs index ef1e14523..f60c6cb6e 100755 --- a/xtask/src/generate_locales.rs +++ b/xtask/src/generate_locales.rs @@ -119,7 +119,6 @@ fn generate_code(translations: Translations) -> proc_macro2::TokenStream { } quote! { - #![cfg_attr(target_os = "none", no_std)] #[macro_export] macro_rules! t { #(#branches)* @@ -134,7 +133,7 @@ fn write_code(code: TokenStream) { let mut dest = project_root(); dest.push("locales"); dest.push("src"); - let mut output = File::create(&std::path::Path::new(&dest).join("lib.rs")).unwrap(); + let mut output = File::create(&std::path::Path::new(&dest).join("generated.rs")).unwrap(); output .write(code.to_string().as_bytes()) .expect("Cannot write generated i18n code");