From ce9ccc4df8b28514f295a274388ff7f542db9769 Mon Sep 17 00:00:00 2001 From: JustOff Date: Sat, 30 Sep 2017 15:02:59 +0300 Subject: [PATCH] Cleanup --- ChangeLog | 404 ---------------------------- Makefile | 57 ---- buildInstallRdf | 197 -------------- chrome/locale/LICENSE | 5 - chrome/locale/LICENSE.in | 6 - chrome/locale/en-US/meta.properties | 9 - install.manifest | 21 -- locales | 206 -------------- release | 84 ------ 9 files changed, 989 deletions(-) delete mode 100644 ChangeLog delete mode 100644 Makefile delete mode 100755 buildInstallRdf delete mode 100644 chrome/locale/LICENSE delete mode 100644 chrome/locale/LICENSE.in delete mode 100644 chrome/locale/en-US/meta.properties delete mode 100644 install.manifest delete mode 100755 locales delete mode 100755 release diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index a2bcfad..0000000 --- a/ChangeLog +++ /dev/null @@ -1,404 +0,0 @@ -Version next - -Version 2014.07.06.05 -* Fix location bar status interactions with domain highlighting. -* Fix origin link shift in Firefox 32 location bar. - -Version 2014.06.29.16b -* Fix gripper styling on OS X (Australis) -* Fix Windows download button attention icon (Australis). -* Add throbber toolbar item (Australis). -* Updated translations for: bg-BG, da, de, dsb, el, eo, es-ES, fr, he, hsb, ja-JP, nb-NO, nl, pl, ro, sr, sv-SE, tr, zh-CN, zh-TW - -Version 2014.06.01.03b -* Fix download status implementation to be compatible with Firefox 29. -* Fix localization issues. (Australis) -* Improved customization event handling. (Australis) -* Support opening download manager with in-tab UI. -* Support 3rd Party download managers by exposing "status4evar.download.button.action.command" which defines a command name to execute. -* Minimize location bar progress when the location bar is focused. -* Updated translations for: da, de, dsb, el, eo, es-ES, fr, hsb, ja-JP, nl, pl, ro, sr, sv-SE, tr, zh-CN, zh-TW - -Version 2014.05.03.06 -* Fix download button icon styles. (Australis) -* Fix Windows and Linux status bar styles. OS X Still needs work. (Australis) -* Support legacy status bar panel. (Australis) - -Version 2014.04.27.21 -* Fix toolbars overlapping download finished animation. -* Australis style fixes. -* Australis first-run widget migration. -* Updated translations for: zh-CN - -Version 2014.02.18.00b -* Improve fullscreen HTML5 video detection (fix on YouTube). -* Update license to MPL 2.0. -* Update locales for new strings. -* Updated translations for: sr - -Version 2014.01.29.16b -* Add advanced option to hide status popup on fullscreen HTML5 video. -* Fix JS Download API integration. -* Fix status/add-on bar item placement regression from Australis support. -* Updated translations for: ro - -Version 2014.01.25.23b -* Initial Australis support. -* Drop support for Firefox 23.0 and older. -* Classic download manager is not available in Firefox 26.0 and newer. - -Version 2013.10.31.22 -* Updated translations for: es-ES, he - -Version 2013.09.14.22b -* Don't use Firefox 22 JavaScript syntax in new Downloads implementation. - -Version 2013.09.14.15b -* Support new Downloads.jsm API in Firefox 26+. -* Support UI changes in Firefox 26. -* Update locales for new strings. -* Updated translations for: en-US, pl, sr - -Version 2013.05.14.21b -* Fix sticky extension status messages. Instead of simply hiding the status text, actually clear the saved status messages. -* Fix download button panel when the S4E download button is not present on a toolbar. -* Update locales for new strings. -* Updated translations for: el, es-ES, he, ja-JP, tr, zh-TW - -Version 2013.05.12.17b -* Add option to control the download button action (Firefox default / panel / library / classic window). -* Add an option to disable the download complete animation. -* Add an option to automatically clear the download complete button highlight. -* Do not highlight the download button if the panel/library/window is already open. - -Version 2013.02.16.23 -* Fix potential incorrect formatting of the location bar status display after clicking on a link. -* Fix RTL locale support. -* Updated translations for: de, nb-NO, sr, sv-SE, zh-TW - -Version 2013.01.16.00b -* Drop support for Firefox 16.0 and older. -* Fix protocol hiding in the toolbar and pop-up. -* Update location bar progress styling. -* Integrate with the new downloads panel. -* Integrate with the new per-window private browsing. -* Updated translations for: bg-BG, cs, da, de, dsb, el, eo, es-ES, fr, he, hsb, it-IT, ja-JP, nb-NO, nl, pt-BR, ro, zh-CN, zh-TW - -Version 2012.11.11.16b -* Make compatible with Firefox 19 CSS parser changes. - -Version 2012.10.13.20b -* Drop support for Firefox 9.0 and older. -* Drop preference migration from S4E 2011.03.21.22 and older. -* Detect full-screen mode and display the status/link messages in the content pop-up when appropriate. - -Version 2012.07.08.17 -* Updated translations for: de, hu, tr - -Version 2012.05.05.00b -* Fix alignment issues with the new identity box in Firefox 14+. -* Fix content pop-up fade in/out effects when displaying links. - -Version 2012.04.21.13 -* Updated translations for: fr - -Version 2012.02.28.00b -* Re-write status pop-up binding to support Firefox 12+. -* Tear down S4E bindings on window destruction (some users have reported performance issues when opening and closing many windows). -* Un-highlight the domain when showing a link or status text in the location bar. -* Properly reset the download button when entering and exiting private browsing mode. - -Version 2012.01.14.17 -* Fix the mock location bar in the preference window. -* Updated translations for: de, sr, tr - -Version 2011.12.29.14b -* Fix location bar margins on Windows in Firefox 9. -* Add an icon to the "Add-on bar" preference tab. -* Add advanced pref to try an override the location bar binding. Defaults to off. -* Added translations for: tr (partial) -* Updated translations for: el, eo, es-ES, he, ja-JP, ro, sr, sv-SE -* Rename dsb-DE to dsb -* Rename hsb-DE to hsb - -Version 2011.11.13.22 -* [Firefox <= 10] When customizing the toolbar, use the Status Bar styling from Firefox 11 (see Bug 616016 (https://bugzilla.mozilla.org/show_bug.cgi?id=616016)). - -Version 2011.11.13.17 -* Bump max version to 11.0a1 -* Update locales for new strings. -* Updated translations for: nb-NO, nl - -Version 2011.10.16.16b -* Fix status pop-up in Firefox 10. -* Add option to set the default side of the status pop-up. -* Fix-up licensing issues. -* Split up the overlay.xml so that proper license headers can be used. -* Added translations for: dsb-DE -* Updated translations for: hsb-DE, zh-TW - -Version 2011.07.20.21 -* Fix to prevent PluralForm utility from going AWOL. - -Version 2011.07.20.20 -* Prevent XPCOM interface (nsIDOMWindow) ID changes from breaking S4E. -* Fix bug when showing min download progress. -* Update locales for new strings. -* Updated translations for: da, he - -Version 2011.07.13.20b -* Add option to show average/max/min download progress. -* Fix download progress margins. -* Fix download progress on text-only toolbars. -* Update locales for new strings. -* Updated translations for: bg-BG, el, es-ES, it-IT, ja-JP, nb-NO, pl, ro, ru - -Version 2011.07.03.16b -* Integrate with Firefox's URL trimming. -* Separate built-in preferences into their own block. -* Add a progress line to the download button. -* Update locales for new strings. - -Version 2011.06.28.22 -* Hide preferences that aren't supported by a particular version of Firefox. - -Version 2011.06.22.19b -* Firefox 7.0a1 changed the nsIDOMWindow interface ID. Make S4E compatible. -* Fix progress bar when opening a link in a new window. -* Update locales for new strings. -* Updated translations for: cs, da, es-ES, he, hsb-DE, hu, it-IT, nb-NO, ro, sr, sv-SE - -Version 2011.06.13.19b -* Tweak some preference UI strings. -* Rewrite the CSS background editor using XBL. -* Add background-repeat support to the simple editor. -* Add background-position support to the simple editor. -* Add preview progress bar to the editor. -* Add a preference to control Firefox's domain highlighting in the location bar. -* Add a preference to control statusbar-display mirroring on mouse-over. -* Add a preference to control statusbar-display mirroring on find bar open. -* Updated translations for: sr - -Version 2011.05.07.18b -* Firefox 6.0a1 changed the nsIDOMWindow interface ID. Make S4E compatible. -* Fix unchecked usage of the urlbar element (causes errors when it's not on a toolbar). -* Minimize contact with the XULBrowserWindow object, and make binding to it dynamic and [hopefully] more robust. -* Refactor some repetitive code, and use array based generation/execution for repetitive tasks. -* Added translations for: el, es-ES, he, nb-NO -* Updated translations for: ro - -Version 2011.04.06.18 -* Make sure the urlbar placeholder text is hidden when showing link/status. -* Add new strings for all translations. -* Added translations for: cs, ru - -Version 2011.04.02.18b -* Add strings that were removed from Firefox 4.2a1pre. -* Centralize stringbundle DOM calls. -* Added translations for: eo -* Updated translations for: bg-BG, hsb-DE - -Version 2011.04.01.00 -* Localize the install manifest. -* Add new strings for all translations. -* Added translations for: bg-BG, hsb-DE -* Updated translations for: da, fr, hu, it-IT, ro, zh-CN - -Version 2011.03.27.22b -* Put S4E style borders (for the Add-on Bar and other bottom toolbars) behind a preference. Disable by default. -* Set urlbar compatibility function shims on the prototype instead of the instance. Fixes compatibility with dynamic bindings (i.e. Smart Text). -* If there are only paused downloads, show the paused count in the button and tooltip ('unknown time remaining' is useless). -* Fix assertion in Firefox 4.2a1pre. -* Add status text getters (better extension integration support). -* Remove delay before showing link/status in the urlbar. -* Add options to control the delay before showing/hiding hovered links. -* Add meta.properties locale file for generating install.rdf l10n blocks. -* Added translations for: sr -* Updated translations for: de, zh-CN - -Version 2011.03.21.22 -* Make S4E more robust when dealing with incompatible extensions and missing UI elements. -* Properly handle location bar deconstruction when it is removed from the UI. -* Update copyright dates. -* Updated translations for: ro - -Version 2011.03.16.22 -Summary of changes: -* Rewrote preferences backed and UI. -* Implemented link/status in the location bar, with controls to change its appearance. -* Added support for the chrome-style status pop-up. -* Advanced controls for changing the styles of the progress bars. -* Updated translations for: da, fr, hu, it-IT, ja-JP, nl, pl, pt-BR, sv-SE, zh-CN, zh-TW (de still needs updates) -* Added translations for: ro - -Version 2011.01.17.02.4 -* Added locales fr, pl, pt-BR and updated various others - -Version 2011.03.10.18b -* Fix some compatibility issues with 3rd party themes. -* Keep urlbar suggestion dropdown arrow visible. -* Add option to hide background/async/XHR network status. -* Implement a simple style editor for selecting progress colors and images. -* Fix toolbar progress settings. -* Add annotations to the status elements. #status4evar-status-text, #statusbar-display, and .urlbar-over-link-box will have a "type" attribute set to one of the following: link, network, network_xhr, status_chrome, status_content, status_content_default, or status_chrome_default. - -Version 2011.03.06.15b -* Don't use min-width on location bar link/status text. -* Better integration with the status pop-up. -* Simplify link/status handling in pup-up. -* Fix default status disappearing when switching tabs. -* Add setting to control urlbar status color. -* Don't clear the urlbar status when loading a new page (on urlbar location change). -* Add settings for controlling the position of the urlbar status. When the status alignment is set to "Right", the slider controls the max length of the status text. When the alignment is set to "Fixed", the slider controls the fixed start position. - -Version 2011.02.20.23b -* Remove the ordinal from the status-bar (allow it to be arbitrarily positioned again). -* Restore the ability to show the default status text. -* Simplify the location bar overlay. -* Fix borders/padding/margins on the location bar. -* Tweak progress bar border styles. -* Allow the Mac OS X toolbar progress item to have custom styles. Rough implementation. - -Version 2011.02.07.01b -* Rewrite preference service and preference dialog. Rename a number of preferences. -* Allow location bar and toolbar progress meters to be independently styled. -* Add support for the status pop-up. -* Implement link-over/status text in the location bar. - -* The advanced progress meter style editor isn't ready yet. Instead, there is a text box where you can manually edit the CSS background property. See the W3C CSS background property for details. -* The location bar styling still need a little work. The borders/margins might be a little off. - -Version 2011.01.17.02.3 -* The location bar link-over/status text implementation was removed in a recent Firefox nightly. S4E should gracefully handle this until it provides its own implementation. - -Version 2011.01.17.02.2 -* Use a period instead of a hyphen in the version number. AMO doesn't like it. -* Properly persist the S4E toolbar items after adding them on first run after installing. They should now stay there after restarting. -* Consolidate and simplify toolbar styling. -* Add locale zh-CN and update nl - -Version 2011.01.17.02-1 -* Don't change the bottom borders on Mac. -* Bottom border shouldn't be visible when all toolbars are hidden. -* Hide the old statusbar resize gripper on platforms that still have it. -* status4evar.firstRun really should default to true. -* Disable native progress styles on the URL bar. Right now, they only look good on Linux. -* Added locales da, de, hu, it-IT, ja-JP, nl, sv-SE, zh-TW - -Version 2011.01.17.02 -* Fix window gripper resize action; dir needs to be set to bottomend. -* First pass at fixing the top border of the addon bar. -* Remove line at the bottom of the addon-bar. - -Version 2011.01.17.00 -* Add a compatibility shim for extensions that directly modified the old status bar text. This will be removed when the statusbar element is removed. -* Resize gripper should not be visible in fullscreen mode. - -Version 2011.01.16.03 -* Rename "Also apply style to the toolbar item" to "Override native progress styles", and make it also affect the urlbar progress line. By default, use the native style. -* Preference status4evar.firstRun should default to false, not true. -* Add an option to make the Download Status button always visible. -* [Mac] Really fix Add-on Bar preference tab. -* [Mac] Hide the S4E window resize gripper. There's already one. -* [Mac] Move the gripper overlap prevention padding from the status-bar to the addon-bar. Silly Mozilla. - -Version 2010.12.26.22 -* Add the status, progress and download items to the Add-on Bar default set to handle when the toolbars get reset. -* Don't allow the status text or progress items to be hidden in popup windows (assuming they're on a toolbar that's still visible). -* Add a empty image to the Add-on Bar tab of the preferences window, so the title is aligned correctly. -* On first install, after adding the items to the Add-on Bar, make it visible. -* Work around some preference window bugs by specifying a minimum height for each tab panel. - -Version 2010.12.19.22 -* Add an optional window re-size gripper to the Add-on Bar. -* Add an option to hide the Add-on Bar close button. -* Add the status, progress and download items to the Add-on Bar on first run/install. - -Version 2010.11.20.19 -* Fix typo in preference migration. - -Version 2010.11.20.16 -* Add options to control the contents of the download status button label and tooltip. -* Fix status text resize gripper styling on Windows (and probably Mac). -* Tweak margins of toolbar items to better fit the default platform themes. -* Show status text widget name in the widget when customizing the toolbar. - -Version 2010.11.17.21 -* Add setting to hide default status text (i.e. "Done"). -* Make "Clear the status after X seconds" also clear the status widget. -* Use a proper XPCOM interface, rather than wrappedJSObject. -* Rename and migrate a few preferences, in preparation for tab progress changes. -* When the status text widget is placed next to another flexible item (url bar, search bar, tab bar, etc.), allow them to be resized using a gripper. -* Improve download status button appearance and labels - show download count as label and time remaining as tooltip. -* Update download status tooltip even when it's visible. - -Version 2010.10.20.02 -* Fix location bar progress bar margins on Windows (7) and probably Mac. - -Version 2010.10.19.22 -* Do not hard code 'fill' progress bar height. -* Remove identity box styling. Now available as http://userstyles.org/styles/38308 -* Refactor preference management service. -* Refactor preference dialog. -* Add option to include progress line styling on the Progress Meter toolbar item. -* Add toolbar button to open preference dialog. -* Disable tab progress setting, as it doesn't do any thing at the moment. -* Properly update progress bars when switching tabs. - -Version 2010.10.12.19 -* Adjust the style of the location bar identity box (remove the margin). -* Add option to control the location bar progress bar style (bottom line, top line, fill). -* Do not show the default status text (i.e. Done) when showing status in the location bar. - -Version 2010.10.12.12 -* Fixed extra progress bar appearing. -* Remove unneeded handling of the legacy statusbar element. If you want it on the far right, drag a flexible spacer in front of it. - -Version 2010.10.11.23 -* Add option to keep progress bar item always visible. -* Add items to the Addon-Bar after install (see Bug 599029 (https://bugzilla.mozilla.org/show_bug.cgi?id=599029) about resetting toolbars). -* Implement our own progress listener (preempt Bug 602964 (https://bugzilla.mozilla.org/show_bug.cgi?id=602964)). -* Use our own location bar progress line (preempt Bug 602964 (https://bugzilla.mozilla.org/show_bug.cgi?id=602964)). -* Add option to control the color of the location bar progress line. - -Version 2010.10.08.16 -* Fix typo in 'status in location bar' preference handling. -* Keep the "legacy" status icons over on the far right of the Addon-Bar - TAKE 3 (see bug 602971 (https://bugzilla.mozilla.org/show_bug.cgi?id=602971) for potential caveat). - -Version 2010.10.07.16 -* Keep the "legacy" status icons over on the far right of the Addon-Bar - TAKE 2 PART 2 (handle some corner cases). -* Add an option to show status messages in the location bar (like how hovered links are shown). - -Version 2010.10.05.23 -* Keep the "legacy" status icons over on the far right of the Addon-Bar - TAKE 2. - -Version 2010.10.03.23 -* Keep the "legacy" status icons over on the far right of the Addon-Bar. -* Fix handling of "Status Text" max-width when first added to the toolbar. -* Simplify code that handles when toolbar items are added to a toolbar. Should help prevent issues in the future. -* Improve widget styling when customizing toolbars. - -Version 2010.10.03.05 -* Fixed handling "Download Status" item during the session it added to a toolbar. - -Version 2010.10.03.03 -* Add an option to limit the length of the Status Text widget (in pixels). -* Add Download Status widget. -* Make Add-on Bar behave more like a normal toolbar (align widgets left, center & stretch widgets, no margin on status-bar placeholder). - -Version 2010.09.29.00 -* Added progress bar widget. -* Added option to control the progress bar on the location bar. -* Added option to control the progress bars on tabs. -* Improved visual style of widgets while customizing the toolbar. -* Fixed adding widgets to the toolbar. You no longer need to restart Firefox after adding one of the widgets to a toolbar. -* The "Status Text" widget changed slightly. You will need to re-add it to your toolbar. - -Version 2010.09.28.05 -* Added option to show hovered links in the status bar, location bar, both, or neither. -* Added option to hide network status messages. -* Added option to control if web pages are allowed to change the status text. - -Version 2010.09.28.02 -* Initial release. - diff --git a/Makefile b/Makefile deleted file mode 100644 index 7ad76b6..0000000 --- a/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# 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/. - -GREP = grep -CUT = cut -LS = ls -SORT = sort -TAIL = tail -EXPR = expr -RM = rm -MKDIR = mkdir -ZIP = zip -ECHO = echo -PY = env python2 - -XRSDK = $(shell $(LS) -d /opt/mozilla/xulrunner-sdk-* | $(SORT) -V | $(TAIL) -1) -XRSDK_VERS = $(shell $(GREP) "^Milestone=" $(XRSDK)/bin/platform.ini | $(CUT) -d"=" -f2 | $(CUT) -d"." -f1) -TLIB_CACHE = components/cache - -NAME = $(shell $(GREP) "^name=" install.manifest | $(CUT) -d"=" -f2) -VERSION = $(shell $(GREP) "^version=" install.manifest | $(CUT) -d"=" -f2) -FILES = $(shell $(GREP) "^files=" install.manifest | $(CUT) -d"=" -f2) -XPT_FILES = $(patsubst %.idl,%.xpt,$(wildcard components/*.idl)) - -all: clean xpi - -debug: - @$(ECHO) "SDK Path: $(XRSDK)" - @$(ECHO) "SDK Version: $(XRSDK_VERS)" - @$(ECHO) "S4E Version: $(VERSION)" - @$(ECHO) "S4E XPT files: $(XPT_FILES)" - -clean: - $(RM) -f *.xpi - $(RM) -f install.rdf - $(RM) -f components/*.xpt - $(RM) -rf components/cache - $(RM) -f xpidl_debug - -$(TLIB_CACHE): - $(MKDIR) $@ - -%.xpt: %.idl $(TLIB_CACHE) - $(PY) $(XRSDK)/sdk/bin/typelib.py --cachedir=$(TLIB_CACHE) \ - -I $(XRSDK)/idl -o $*.xpt $*.idl - -xpt: $(XPT_FILES) - -install.rdf: install.manifest - ./buildInstallRdf - -rdf: install.rdf - -xpi: xpt rdf - $(ZIP) -r $(NAME)-$(VERSION).xpi $(FILES) $(XPT_FILES) - diff --git a/buildInstallRdf b/buildInstallRdf deleted file mode 100755 index 2b234e1..0000000 --- a/buildInstallRdf +++ /dev/null @@ -1,197 +0,0 @@ -#!/usr/bin/env python2 - -# 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/. - -import re -import os -import codecs -from datetime import datetime -from xml.sax.saxutils import escape - -propRE = re.compile(r"^\s*([a-zA-Z.]+)\s*=\s*(.+?)\s*(#.*)?$", re.U) - -targetIds = { - "Palemoon": "{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}" -} - -rdfProps = [ - "name", - "description", - "id", - "version", - "creator", - "developer", - "translator", - "contributor", - "type", - "bootstrap", - "unpack", - "strictCompatibility" - "aboutURL", - "homepageURL", - "icon64URL", - "iconURL", - "optionsType", - "optionsURL", - "updateKey", - "updateURL" -] - -rdfPropsMulti = [ - "developer", - "translator", - "contributor" -] - -def parsePropFile(filename): - props = {} - - with codecs.open(filename, mode="r", encoding="utf-8") as f: - for line in f: - result = propRE.search(line) - if result: - props[result.group(1)] = result.group(2) - - return props - -def parseL10N(l10nDir): - langs = {} - - for l10n in os.listdir(l10nDir): - l10nMeta = os.path.join(l10nDir, l10n, "meta.properties") - if os.path.isfile(l10nMeta): - langs[l10n] = parsePropFile(l10nMeta) - else: - print "WARNING: could not find %s" % l10nMeta - - return langs - -def getConfig(): - props = parsePropFile("install.manifest") - langs = parseL10N("chrome/locale/") - - defaultLocale = langs[props["defaultLocale"]] - del langs[props["defaultLocale"]] - del props["defaultLocale"] - - info = {} - targets = {} - - for prop in props: - val = props[prop] - if prop in targetIds: - val = val.split('|') - target = { - "id": targetIds[prop], - "min": val[0], - "max": val[1] - } - targets[prop] = target - continue; - - if prop in rdfPropsMulti: - val = val.split('|') - - if prop in rdfProps: - info[prop] = val - - info["name"] = defaultLocale["name"] - info["description"] = defaultLocale["description"] - - return (info, targets, langs) - -def buildManafest(): - (info, targets, locales) = getConfig() - f = codecs.open("install.rdf", mode="w", encoding="utf-8") - - # - # Print the header - # - f.write(u""" - - - - - \n""" % (datetime.now().year)) - - # - # Print extension info blocks - # - - f.write(u""" - \n""") - - keys = info.keys() - keys.sort() - for prop in rdfProps: - if prop in info: - if prop in rdfPropsMulti: - for val in info[prop]: - f.write(u""" - %s""" % (prop, escape(val), prop)) - else: - f.write(u""" - %s""" % (prop, escape(info[prop]), prop)) - f.write(u"""\n""") - - # - # Print the locale blocks - # - - f.write(u""" - \n""") - - keys = locales.keys() - keys.sort() - for locale in keys: - l10n = locales[locale] - translators = "" - for t in l10n["translator"].split(","): - translators += u"""%s [%s]""" % (escape(t.strip()), locale) - f.write(u""" - - - %s - %s - %s - %s - %s - %s - - \n""" % (locale, locale, escape(l10n["name"]), escape(l10n["description"]), escape(info["creator"]), escape(info["homepageURL"]), translators)) - - # - # Print target blocks - # - - f.write(u""" - \n""") - - keys = targets.keys() - keys.sort() - for t in keys: - target = targets[t] - f.write(u""" - - - %s - %s - %s - - \n""" % (t, target["id"], target["min"], target["max"])) - - # - # Print the footer - # - - f.write(""" - -\n""") - -if __name__ == "__main__": - buildManafest() - diff --git a/chrome/locale/LICENSE b/chrome/locale/LICENSE deleted file mode 100644 index fe6fde3..0000000 --- a/chrome/locale/LICENSE +++ /dev/null @@ -1,5 +0,0 @@ -All locale files are covered under the following license: - -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/. diff --git a/chrome/locale/LICENSE.in b/chrome/locale/LICENSE.in deleted file mode 100644 index a650e16..0000000 --- a/chrome/locale/LICENSE.in +++ /dev/null @@ -1,6 +0,0 @@ -All locale files are covered under the following license: - -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/. - diff --git a/chrome/locale/en-US/meta.properties b/chrome/locale/en-US/meta.properties deleted file mode 100644 index 471bbdb..0000000 --- a/chrome/locale/en-US/meta.properties +++ /dev/null @@ -1,9 +0,0 @@ -# Translator names. If there is more than one, separate with commas. Only include your name, not the locale you're translating. -translator=Sparky Bluefang - -# Extension title. This usually should not be translated. -name=Location-4-Evar - -# Extension description. This is displayed in the add-on manager. -description=Show status and progress indicators in location bar - diff --git a/install.manifest b/install.manifest deleted file mode 100644 index 80d6dcc..0000000 --- a/install.manifest +++ /dev/null @@ -1,21 +0,0 @@ -# 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/. - -# RDF metadata -id=location4evar@Off.JustOff -version=1.0.1 -type=2 -creator=Off JustOff <Off.Just.Off@gmail.com> -contributor=Sparky Bluefang -homepageURL=https://github.com/JustOff/L4E -optionsURL=chrome://location4evar/content/prefs.xul - -# App data -defaultLocale=en-US -Palemoon=27.5.0|27.* - -# Build data -name=location4evar -files=chrome defaults chrome.manifest install.rdf components/*.js modules LICENSE - diff --git a/locales b/locales deleted file mode 100755 index c499b86..0000000 --- a/locales +++ /dev/null @@ -1,206 +0,0 @@ -#!/usr/bin/env python2 - -# 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/. - -import sys -import re -import os -import codecs -import magic -import subprocess - -mdetect = magic.open(magic.MIME_ENCODING) -mdetect.load() - -excludeLocals = ["en-US"] - -# -# Read and decode a file. Use the magic module to determin the character encoding. -# -def readFile(filename): - ftype = mdetect.file(filename) - print "Reading %s as %s" % (filename, ftype) - with codecs.open(filename, mode="r", encoding=ftype) as f: - return f.read(); - -# -# Write a file as UTF-8. -# -def writeFile(filename, contents): - print "Writing %s as UTF-8" % (filename) - with codecs.open(filename, mode="w", encoding="utf-8") as f: - f.write(contents) - -# -# Clean a file. Read it, strip blank lines and comments, then write it. -# -reNewLine = re.compile(r'''[\r\n]+''', re.U) - -rePROPComment = re.compile(r'''^\s*#.*?\s*\n''', re.U | re.M) -rePROPEscapes = re.compile(r'''\\(\\n|'|")''', re.U) -rePROPNewLine = re.compile(r'''\\\\\n''', re.U | re.M) - -reDTDComment = re.compile(r'''^\s*\s*\n''', re.U | re.M | re.S) -reDTDEscapes = re.compile(r'''\\(\\n|'|"|&)''', re.U) -reDTDNewLine = re.compile(r'''\s*(\\\n|\\n)\s*''', re.U | re.M) - -def cleanFile(filename): - contents = readFile(filename) - - contents = reNewLine.sub("\n", contents) - - if filename.endswith(".dtd"): - contents = reDTDComment.sub("", contents) - contents = reDTDEscapes.sub("\\1", contents) - contents = reDTDNewLine.sub("\n", contents) - elif filename.endswith(".properties"): - contents = rePROPComment.sub("", contents) - contents = rePROPEscapes.sub("\\1", contents) - contents = rePROPNewLine.sub("\\\n", contents) - - writeFile(filename, contents) - -# -# Remove a translation from a file -# -rePROPStringStr = "^\s*%s=.*?\s*\n" -reDTDStringStr = "^\s*\s*\n" -def removeString(filename, tString): - reStr = None - if filename.endswith(".dtd"): - reStr = reDTDStringStr % tString - elif filename.endswith(".properties"): - reStr = rePROPStringStr % tString - - if reStr: - contents = readFile(filename) - reString = re.compile(reStr, re.U | re.M) - contents = reString.sub("", contents) - writeFile(filename, contents) - -# -# Walk though the local directory, processing DTD and property files. -# -def processL10N(mode, tFile=None, tString=None): - for root, dirs, files in os.walk("chrome/locale"): - if os.path.basename(root) == "locale": - for exclusion in excludeLocals: - dirs.remove(exclusion) - dirs.sort() - continue; - - print "Locale %s" % os.path.basename(root) - - files.sort() - - if mode == "clean": - for filename in files: - cleanFile(os.path.join(root, filename)) - elif mode == "remove": - for filename in files: - if filename == tFile: - removeString(os.path.join(root, filename), tString) - -# -# Build and format a locale copyright string -# -def buildAuthLicenseStr(locale, auths, years): - years = list(set(years)) - years.sort() - years.append(None) - - yearStr = "" - yearPrev = None - yearSeq = False - for year in years: - if yearPrev is None: - yearStr = "%s" % (year) - elif (yearPrev + 1) != year: - if yearSeq: - if year is not None: - yearStr = "%s-%s, %s" % (yearStr, yearPrev, year) - else: - yearStr = "%s-%s" % (yearStr, yearPrev) - elif year is not None: - yearStr = "%s, %s" % (yearStr, year) - - yearSeq = False - else: - yearSeq = True - - yearPrev = year - - return "%s copyright (C) %s %s. All Rights Reserved." % (locale, yearStr, ", ".join(auths)) - -# -# Update the locale LICENSE file -# -reSplitProp = re.compile(r"=", re.U) -reSplitAuths = re.compile(r"\s*,\s*", re.U) - -def processL10NLicense(): - contributors = [] - - locales = os.listdir("chrome/locale") - locales.sort() - - for locale in locales: - localePath = "chrome/locale/%s/" % locale - - if locale == "en-US" or not os.path.isdir(localePath): - continue - - args = ["git", "log", "-p", "--pretty=format:COMMIT %H %ad", "--reverse", "--date=short", "--", localePath] - proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - (stdout, stderr) = proc.communicate() - - if proc.returncode != 0: - print "Error getting license history for locale: %s" % locale - print stderr - continue - - auths = None - years = [] - year = None - - stdout = stdout.decode('utf-8') - for line in stdout.splitlines(): - if line.startswith("COMMIT"): - if year is not None: - years.append(year) - - year = int(line.split(" ")[2].split("-")[0]) - - elif line.startswith("+translator="): - if auths is not None: - contributors.append(buildAuthLicenseStr(locale, auths, years)) - years = [] - - authsTmp = reSplitAuths.split(reSplitProp.split(line)[1].strip()) - authsTmp = [x for x in authsTmp if x != "Sparky Bluefang"] - if len(authsTmp) == 0: - continue - - auths = authsTmp - auths.sort() - - years.append(year) - contributors.append(buildAuthLicenseStr(locale, auths, years)) - - license = readFile("chrome/locale/LICENSE.in") - license = license.replace("%contributors%", "\n".join(contributors)) - writeFile("chrome/locale/LICENSE", license) - -if __name__ == "__main__": - mode = sys.argv[1] - if mode == "clean": - processL10N("clean") - elif mode == "license": - processL10NLicense() - elif mode == "remove": - processL10N("remove", sys.argv[2], sys.argv[3].replace(".", "\\.")) - else: - print "Unknown option '%s'" % mode - diff --git a/release b/release deleted file mode 100755 index 4eac133..0000000 --- a/release +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -# 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/. - -TS=`date +%Y.%m.%d.%H` -VERSION="" -RELEASE="" -FORCE="" - -usage() { - echo "Options:" - echo " -a --alpha Alpha version bump" - echo " -b --beta Beta release" - echo " -p --pre Pre version bump" - echo " -r --release Final release" - echo " -f --force Continue even with uncommitted changes (alpha/pre only)" - echo " -h --help Print this help message" - echo "" - echo "Version bumps will just modify the install.manifest and commit the changes. Releases will also modify the ChangeLog and tag the commit." - exit $1 -} - -while [ -n "$1" ]; do - case "$1" in - -a|--alpha) - VERSION="${TS}a" - ;; - -b|--beta) - VERSION="${TS}b" - RELEASE="1" - ;; - -p|--pre) - VERSION="${TS}pre" - ;; - -r|--release) - VERSION="${TS}" - RELEASE="1" - ;; - -f|--force) - FORCE="1" - ;; - -h|--help) - usage 0 - ;; - default) - echo "Invalid action: '$1'" - usage 1 - ;; - esac - - shift -done - -if [ -z "$VERSION" ]; then - usage 1 -fi - -# Check for uncommitted changes -CHANGES=`git diff HEAD --exit-code --name-only` -if [ $? -ne 0 ] && ( [ -n "$RELEASE" ] || [ -z "$FORCE" ] ); then - echo "There are uncommitted changes:" - echo "${CHANGES}" - exit 1 -fi - -# Up the version -sed -i "/^version=/s/=.*$/=${VERSION}/g" install.manifest -git add install.manifest - -if [ -n "${RELEASE}" ]; then - # Update the ChangeLog - sed -i "/^Version /s/ next$/ next\n\nVersion ${VERSION}/g" ChangeLog - git add ChangeLog - - # Commit and tag the release - git commit -m "Release ${VERSION}" - git tag "${VERSION}" -else - # Commit - git commit -m "Version bump ${VERSION}" -fi -