Malformed install.rdf for Catalan xpi in Firefox 18

RESOLVED FIXED

Status

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: chrisccoulson, Assigned: egamonal)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

736 bytes, application/rdf+xml
Details
Posted file Catalan install.rdf
The Catalan language pack xpi for Firefox 18 has a malformed install.rdf. There are 2 lines of whitespace at the start of the file (attached), which results in the addon manager not loading it.

It's caused by this change: http://hg.mozilla.org/releases/l10n/mozilla-release/ca/diff/3b0b37ceb8b0/browser/defines.inc
Mmm, this was caused by applying patch from bug 792717 I suppose.

We can try to add it back to all defines.inc in different branches.

Ccing Gerv as well.
None of the 3 patches attached to bug 792717 patch a file called defines.inc. And the changes in those patches are not missing newlines, which it seems this change was. Perhaps it was done by hand by someone?

Gerv
A quick grep shows up some more affected locales too:

chr1s@farnsworth:~/src/firefox/build-area/firefox-18.0+build1$ grep '^.\+#filter emptyLines' l10n/*/browser/defines.inc
l10n/ar/browser/defines.inc:# This Source Code Form is subject to the terms of the Mozilla Public# License, v. 2.0. If a copy of the MPL was not distributed with this# file, You can obtain one at http://mozilla.org/MPL/2.0/.#filter emptyLines
l10n/bn-BD/browser/defines.inc:# This Source Code Form is subject to the terms of the Mozilla Public# License, v. 2.0. If a copy of the MPL was not distributed with this# file, You can obtain one at http://mozilla.org/MPL/2.0/.#filter emptyLines
l10n/ca/browser/defines.inc:# This Source Code Form is subject to the terms of the Mozilla Public# License, v. 2.0. If a copy of the MPL was not distributed with this# file, You can obtain one at http://mozilla.org/MPL/2.0/.#filter emptyLines
l10n/fa/browser/defines.inc:# This Source Code Form is subject to the terms of the Mozilla Public# License, v. 2.0. If a copy of the MPL was not distributed with this# file, You can obtain one at http://mozilla.org/MPL/2.0/.#filter emptyLines
l10n/ff/browser/defines.inc:# This Source Code Form is subject to the terms of the Mozilla Public# License, v. 2.0. If a copy of the MPL was not distributed with this# file, You can obtain one at http://mozilla.org/MPL/2.0/.#filter emptyLines
l10n/gd/browser/defines.inc:# This Source Code Form is subject to the terms of the Mozilla Public# License, v. 2.0. If a copy of the MPL was not distributed with this# file, You can obtain one at http://mozilla.org/MPL/2.0/.#filter emptyLines
l10n/nso/browser/defines.inc:# This Source Code Form is subject to the terms of the Mozilla Public# License, v. 2.0. If a copy of the MPL was not distributed with this# file, You can obtain one at http://mozilla.org/MPL/2.0/.#filter emptyLines
Dwayne, can this be a bug in the translate toolkit handling of .inc files?
@Axel, almost definitely the bug fixed by https://github.com/translate/translate/commit/e0d8001989dcf891976df8bb4e17cf9c68f85a9e

@Toni using Toolkit from master or the 1.10.0.RC1 release from http://translate.sourceforge.net/snapshots/ will solve this for you.

I only spotted the bug after struggling to get Samoan language packs to build from, I think, earlier then 18. Since most people don't/can't install the language pack I was hoping the issue would just filter its way out as the release train got rid of those broken language packs.  So unfortunately I didn't audit the .inc files that had gone before the discovery.

The fix is quite obvious so could be easy to role out.  Would be nice to know if there are any remaining in Beta. Not sure what happens on release though i.e. if it is needed/easy to deploy such a fix.
Thanks Dwaine! I've upgraded translate-toolkit in the server where we host our translations.

Eduard will fix defines.inc in aurora, beta and release branches.
Sorry, but these patches don't do what's expected.

browser/defines.inc should look like this, with no leading whitespace:

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#filter emptyLines

#define MOZ_LANGPACK_CREATOR Mozilla.org / Softcatalà

# If non-English locales wish to credit multiple contributors, uncomment this
# variable definition and use the format specified.
#define MOZ_LANGPACK_CONTRIBUTORS <em:contributor>Softcatalà</em:contributor>

#unfilter emptyLines

Does that make sense or would you rather have someone else provide a patch?
Hi Axel,
I took en_GB and fr as an example and it didn't work. Maybe it's faster and safer if somebody more experienced provides a patch.
Thanks
I've signed off in Dashboard. I assume that builds were not taking last Edu's changes. We're affecting too much users here! :(
Please, accept anyway, Axel. It's not working anyway right now (and we need to test it's not happening in beta). We can sign off more later.

Edu, you have missed .'#filter emptyLines' attached to the license string. Moreover, Axel is suggesting that the order of license info and filter should be the reverse. Overall situation now is not cute, but I think it should not be affecting the outcome and I'd dare to say that XPI should be valid with this patch applied.
We've missed 19.0b4. It's not working yet.
Duplicate of this bug: 828151
19.0b5 seems to work fine :)
I guess it's unlikely there will be a 18.0.3:
http://hg.mozilla.org/releases/l10n/mozilla-release/ca
Status: NEW → ASSIGNED
I change it as fixed. Reopen if something may still be done with 18 branch.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.