Closed Bug 793469 Opened 12 years ago Closed 12 years ago

Some files on en-US local (central) are missing MPL2 license headers

Categories

(mozilla.org :: Licensing, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: flod, Assigned: gerv)

References

Details

These files are currently missing the MPL2 header license

/browser/locales/en-US/chrome/browser/devtools/responsiveUI.properties
/browser/locales/en-US/pdfviewer/chrome.properties
/browser/locales/en-US/pdfviewer/viewer.properties
/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
/toolkit/locales/en-US/chrome/mozapps/help/help-toc.rdf
/toolkit/locales/en-US/chrome/mozapps/help/welcome.xhtml

As a consequence some tools don't add the correct license header to the localized file.
I think that help-toc.rdf and welcome.xhtml have a correct MPL notice after the XML declaration, but there are other files that don't have it. Not sure about the inc files, but there should be no problem adding it to dtd and properties files.

browser/locales/en-US/defines.inc
browser/locales/en-US/profile/bookmarks.inc
mobile/android/locales/en-US/defines.inc
mobile/android/locales/en-US/chrome/about.dtd
mobile/locales/en-US/profile/bookmarks.inc
mobile/xul/locales/en-US/defines.inc
mobile/xul/locales/en-US/chrome/about.dtd
toolkit/locales/en-US/chrome/global/about.dtd
toolkit/locales/en-US/chrome/global/aboutRights.dtd
toolkit/locales/en-US/chrome/mozapps/plugins/plugins.dtd
toolkit/locales/en-US/chrome/mozapps/plugins/plugins.properties
toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
toolkit/locales/en-US/chrome/mozapps/update/updates.properties
(In reply to Hasse from comment #1)
> I think that help-toc.rdf and welcome.xhtml have a correct MPL notice after
> the XML declaration

You're absolutely right, I missed those in my first check.

> but there are other files that don't have it

Good catch. If those files need a license header, this means that Gerv's script is not getting all files (e.g. I didn't have bookmark.inc in patch for bug 792748 but the license header is missing like en-US.
The script has a number of limitations, and tries to be "safe". So, for example, if it thinks that a file already has a license but one it doesn't recognise, it won't relicense it. That could be triggered by e.g. the file having the word "Copyright" in it somewhere. 

Also, if the script cannot automatically work out the correct comment character from the file extension, it won't add a license to it. This is the case for ".inc" files, as that extension is used for several filetypes.

I can certainly do all these manually. Are we certain the list of ones you guys care about is complete, or might there be more?

Gerv
(In reply to Gervase Markham [:gerv] from comment #3)
> I can certainly do all these manually. Are we certain the list of ones you
> guys care about is complete, or might there be more?

Not really sure, if someone could check it would be great (I'll try to do it this evening).
Does this bug apply to comm-central?
There is the list of files for Thunderbird and Seamonkey, which don't have MPL2 license headers:

mail/chrome/messenger/aboutRights.dtd
mail/chrome/messenger/accountCreation.properties
other-licenses/branding/thunderbird/brand.dtd
other-licenses/branding/thunderbird/brand.properties
suite/chrome/branding/aboutRights.dtd
suite/chrome/common/pref/pref-offlineapps.dtd
l10n-central (I don't work on comm-central, so someone else should check)

/browser/locales/en-US/chrome/browser/devtools/responsiveUI.properties
/browser/locales/en-US/pdfviewer/chrome.properties
/browser/locales/en-US/pdfviewer/viewer.properties
/browser/locales/en-US/profile/bookmarks.inc
/mobile/android/locales/en-US/chrome/about.dtd
/mobile/xul/locales/en-US/chrome/about.dtd
/toolkit/locales/en-US/chrome/global/about.dtd
/toolkit/locales/en-US/chrome/global/aboutRights.dtd
/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
/toolkit/locales/en-US/chrome/mozapps/plugins/plugins.dtd
/toolkit/locales/en-US/chrome/mozapps/plugins/plugins.properties
/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
/toolkit/locales/en-US/chrome/mozapps/update/updates.properties

Still not sure about .inc files, since I don't think tools manage those files directly.
.inc files are used by the preprocessor.

I'm not sure how the comments and the #filter emptyLines interact, though, so you may need to add the licensing comment after the #filter.
The files from comments 0 and 1:
https://hg.mozilla.org/integration/mozilla-inbound/rev/74a06c56da4e

(In reply to Alexander L. Slovesnik from comment #5)
> Does this bug apply to comm-central?
> There is the list of files for Thunderbird and Seamonkey, which don't have
> MPL2 license headers:
> 
> mail/chrome/messenger/aboutRights.dtd
> mail/chrome/messenger/accountCreation.properties
> other-licenses/branding/thunderbird/brand.dtd
> other-licenses/branding/thunderbird/brand.properties
> suite/chrome/branding/aboutRights.dtd
> suite/chrome/common/pref/pref-offlineapps.dtd

None of these files appear in a current pull of comm-central...

flod: I don't know how l10n-central fits into all this. Are those copies of files from mozilla-central?

Gerv
(In reply to Gervase Markham [:gerv] from comment #8)
> (In reply to Alexander L. Slovesnik from comment #5)
> > Does this bug apply to comm-central?
> > There is the list of files for Thunderbird and Seamonkey, which don't have
> > MPL2 license headers:
> > 
> > mail/chrome/messenger/aboutRights.dtd
> > mail/chrome/messenger/accountCreation.properties
> > other-licenses/branding/thunderbird/brand.dtd
> > other-licenses/branding/thunderbird/brand.properties
> > suite/chrome/branding/aboutRights.dtd
> > suite/chrome/common/pref/pref-offlineapps.dtd
> 
> None of these files appear in a current pull of comm-central...

Looks like I've missed locales/en-US part. Correct list is: 

/mail/locales/en-US/chrome/messenger/aboutRights.dtd
/mail/locales/en-US/chrome/messenger/accountCreation.properties
/other-licenses/branding/thunderbird/locales/en-US/brand.dtd
/other-licenses/branding/thunderbird/locales/en-US/brand.properties
/suite/locales/en-US/chrome/branding/aboutRights.dtd
/suite/locales/en-US/chrome/common/pref/pref-offlineapps.dtd
comm-central changes from comment 9:
https://hg.mozilla.org/comm-central/rev/1402d044319b

Gerv
https://hg.mozilla.org/mozilla-central/rev/74a06c56da4e
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.