New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
janitor: Fix license issues #2954
Conversation
hunger
commented
Jun 21, 2023
- Fix license of .clang-format file where the file itself contradicted the dep5
- Make reuse not detect bogus SPDX identifier in .clang-format
- Add copyright headers to translation files where possible
- Fix dep5 getting ignored by matching files more exactly
@@ -74,6 +74,16 @@ impl<'a> SourceFileWithTags<'a> { | |||
None => None, | |||
}; | |||
|
|||
// Find default gettext copyright statements | |||
let location = location.or_else(|| { | |||
let Some(start) = source.find("# SOME DESCRIPTIVE TITLE").or_else(|| source.find("# Copyright (C) ")) else { return None; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternative would be to change slint-tr-extractor to not generate this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this is actually not generated by slint-tr-extractor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slint-tr-extractor
does not add anything into the .pot
file. The license fix adds that there, so that would actually work with the .dep5 file declaring the license.
The .po
files generated from that .pot
file get the junk header injected by the gettext tools because the .pot
file has nothing.
Making slint-tr-injector
add the expected license header into the .pot
file would indeed be better. But I could not find any way to do that with the polibs crate (short of adding it in after the file was written. It also requires some template or something to insert... and I have a suspicion that that is what the .pot
file is supposed to be ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the gettext manual says to create a .pot file and create the .po files from that. It then says to fix up the copyright headers in the .po files after creating it.
Using the xtask does fit that suggested workflow.