Bug 1630001 - Remove repack directory and "Lightning" strings from lightning.properties. r=darktrojan
authorPaul Morris <paul@thunderbird.net>
Tue, 21 Apr 2020 14:52:02 +0000
changeset 38901 5b27d2fdc334db650be99f6bffaae00d0fd8a548
parent 38900 1f6cbbf41d0911236e2fac0094090184569fc119
child 38902 d1d2fd7031fd2ed7d687f35ecf3a4c1954a60ec9
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
reviewersdarktrojan
bugs1630001
Bug 1630001 - Remove repack directory and "Lightning" strings from lightning.properties. r=darktrojan Differential Revision: https://phabricator.services.mozilla.com/D71128
calendar/lightning/content/lightning.js
calendar/lightning/repack/all-locale-repack.sh
calendar/lightning/repack/modify-manifest.py
calendar/lightning/repack/webextify.py
calendar/locales/en-US/chrome/lightning/lightning.properties
--- a/calendar/lightning/content/lightning.js
+++ b/calendar/lightning/content/lightning.js
@@ -4,24 +4,16 @@
 
 // This file contains all of the default preference values for Lightning
 
 // Turns on basic calendar logging.
 pref("calendar.debug.log", false);
 // Turns on verbose calendar logging.
 pref("calendar.debug.log.verbose", false);
 
-// addon description
-pref("extensions.{e2fda1a4-762b-4020-b5ad-a41df1933103}.description",
-     "chrome://lightning/locale/lightning.properties");
-pref("extensions.{e2fda1a4-762b-4020-b5ad-a41df1933103}.name",
-     "chrome://lightning/locale/lightning.properties");
-pref("extensions.{e2fda1a4-762b-4020-b5ad-a41df1933103}.creator",
-     "chrome://lightning/locale/lightning.properties");
-
 // general settings
 pref("calendar.date.format", 0);
 pref("calendar.event.defaultlength", 60);
 pref("calendar.task.defaultstart", "none");
 pref("calendar.task.defaultstartoffset", 0);
 pref("calendar.task.defaultstartoffsetunits", "minutes");
 pref("calendar.task.defaultdue", "none");
 pref("calendar.task.defaultdueoffset", 60);
deleted file mode 100755
--- a/calendar/lightning/repack/all-locale-repack.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/bash
-# 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/.
-
-if test -z "$GECKO_PATH"
-then
-  echo "GECKO_PATH is not set"
-  exit 1
-fi
-if test -z "$MOZ_FETCHES_DIR"
-then
-  echo "MOZ_FETCHES_DIR is not set"
-  exit 1
-fi
-
-if [[ $GECKO_HEAD_REPOSITORY =~ beta|esr ]]
-then
-  path='distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}.xpi'
-else
-  path='extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}.xpi'
-fi
-
-cd "$MOZ_FETCHES_DIR" || exit 1
-unzip lightning.xpi chrome.manifest
-
-for l in *
-do
-  if [[ $l == ja-JP-mac ]]
-  then
-    pushd "$l" || exit 1
-    "$MOZ_FETCHES_DIR/dmg/dmg" extract target.dmg target.hfs
-    "$MOZ_FETCHES_DIR/dmg/hfsplus" target.hfs extractall
-    prepath='Thunderbird.app/Contents/Resources'
-    if test ! -f "$prepath/$path"
-    then
-      prepath='Thunderbird Daily.app/Contents/Resources'
-    fi
-    popd || exit 1
-  else
-    prepath='thunderbird'
-  fi
-
-  if test -f "$l/$prepath/$path"
-  then
-    pushd "$l" || exit 1
-
-    unzip "$prepath/$path" "chrome/calendar-$l/*" "chrome/lightning-$l/*"
-    find chrome -type f | sort | zip -@ ../lightning.xpi
-
-    mkdir -p "_locales/$l"
-    if [[ $GECKO_HEAD_REPOSITORY =~ esr68 ]]
-    then
-      echo "locale calendar $l chrome/calendar-$l/locale/$l/calendar/" >> ../chrome.manifest
-      echo "locale lightning $l chrome/lightning-$l/locale/$l/lightning/" >> ../chrome.manifest
-      python3 "$GECKO_PATH/comm/calendar/lightning/repack/webextify.py" "chrome/lightning-$l/locale/$l/lightning/lightning.properties" "_locales/$l/messages.json"
-    else
-      echo "locale calendar $l chrome/calendar-$l/" >> ../chrome.manifest
-      echo "locale lightning $l chrome/lightning-$l/" >> ../chrome.manifest
-      python3 "$GECKO_PATH/comm/calendar/lightning/repack/webextify.py" "chrome/lightning-$l/lightning.properties" "_locales/$l/messages.json"
-    fi
-    touch -d 20100101 "_locales/$l/messages.json"
-    zip ../lightning.xpi "_locales/$l/messages.json"
-
-    popd || exit 1
-  elif test -d "$l"
-  then
-    echo "$prepath/$path not found in $l"
-  fi
-done
-
-touch -d 20100101 chrome.manifest
-zip lightning.xpi chrome.manifest
-
-mkdir -p "_locales/en-US"
-if [[ $GECKO_HEAD_REPOSITORY =~ esr68 ]]
-then
-  unzip lightning.xpi chrome/lightning-en-US/locale/en-US/lightning/lightning.properties
-  python3 "$GECKO_PATH/comm/calendar/lightning/repack/webextify.py" "chrome/lightning-en-US/locale/en-US/lightning/lightning.properties" "_locales/en-US/messages.json"
-else
-  unzip lightning.xpi chrome/lightning-en-US/lightning.properties
-  python3 "$GECKO_PATH/comm/calendar/lightning/repack/webextify.py" "chrome/lightning-en-US/lightning.properties" "_locales/en-US/messages.json"
-fi
-touch -d 20100101 "_locales/en-US/messages.json"
-zip lightning.xpi "_locales/en-US/messages.json"
-
-unzip lightning.xpi manifest.json
-python3 "$GECKO_PATH/comm/calendar/lightning/repack/modify-manifest.py"
-touch -d 20100101 manifest.json
-zip lightning.xpi manifest.json
-
-if test -n "$UPLOAD_DIR"
-then
-  mkdir "$UPLOAD_DIR"
-  cp lightning.xpi "$UPLOAD_DIR"
-fi
deleted file mode 100644
--- a/calendar/lightning/repack/modify-manifest.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/python3
-# 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/.
-
-from __future__ import print_function, unicode_literals, absolute_import
-
-import json
-
-with open("manifest.json", encoding="utf-8") as fp:
-    data = json.load(fp)
-
-data["name"] = "__MSG_extensionName__"
-data["description"] = "__MSG_extensionDescription__"
-data["author"] = "__MSG_extensionAuthor__"
-data["default_locale"] = "en-US"
-
-with open("manifest.json", "w", encoding="utf-8") as fp:
-    json.dump(data, fp, ensure_ascii=False, indent=2, sort_keys=True)
-    fp.write("\n")
deleted file mode 100644
--- a/calendar/lightning/repack/webextify.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python3
-# 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/.
-
-from __future__ import print_function, unicode_literals, absolute_import
-
-import json
-import sys
-
-keys = {
-    "extensions.{e2fda1a4-762b-4020-b5ad-a41df1933103}.name": "extensionName",
-    "extensions.{e2fda1a4-762b-4020-b5ad-a41df1933103}.description": "extensionDescription",
-    "extensions.{e2fda1a4-762b-4020-b5ad-a41df1933103}.creator": "extensionAuthor",
-}
-data = {}
-
-with open(sys.argv[1], encoding="utf-8") as fp:
-    for line in fp.readlines():
-        for key, new_key in keys.items():
-            if line.startswith(key):
-                data[new_key] = {
-                    "message": line[line.index("=") + 1:].strip(),
-                }
-
-with open(sys.argv[2], "w", encoding="utf-8") as fp:
-    json.dump(data, fp, ensure_ascii=False, indent=2, sort_keys=True)
-    fp.write("\n")
--- a/calendar/locales/en-US/chrome/lightning/lightning.properties
+++ b/calendar/locales/en-US/chrome/lightning/lightning.properties
@@ -1,20 +1,12 @@
 # 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/.
 
-# addon description:
-extensions.{e2fda1a4-762b-4020-b5ad-a41df1933103}.name=Lightning
-extensions.{e2fda1a4-762b-4020-b5ad-a41df1933103}.description=Integrated Calendaring & Scheduling for your Email client
-extensions.{e2fda1a4-762b-4020-b5ad-a41df1933103}.creator=Mozilla Calendar Project
-
-# Lightning branding
-brandShortName=Lightning
-
 # Task mode title
 taskModeApplicationTitle=Tasks
 
 # Tab titles
 tabTitleCalendar=Calendar
 tabTitleTasks=Tasks
 
 # Html event display in message