Skip to content
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

Merged
merged 2 commits into from Jun 22, 2023
Merged

janitor: Fix license issues #2954

merged 2 commits into from Jun 22, 2023

Conversation

hunger
Copy link
Member

@hunger 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; };
Copy link
Member

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.

Copy link
Member

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

Copy link
Member Author

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 ;-)

Copy link
Member Author

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.

@hunger hunger merged commit 57325cd into slint-ui:master Jun 22, 2023
26 checks passed
@hunger hunger deleted the fix-reuse branch June 22, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants