Commits

mathematicalcoffee committed f113324 Merge

merged translation + misc fixes to gnome3.2

Comments (0)

Files changed (9)

+syntax: glob
+*.mo
 #=============================================================================
 UUID=xpenguins@mathematical.coffee.gmail.com
 FILES=metadata.json *.js stylesheet.css penguin.png themes
+DOMAIN=xpenguins
+PO=$(wildcard $(UUID)/po/*.po)
 #=============================================================================
 default_target: all
 .PHONY: clean all zip
 
 clean:
 	rm -f $(UUID).zip $(UUID)/schemas/gschemas.compiled
+	rm -rf $(UUID)/locale
 
-# compile the schemas
 all:
+	# compile the schemas
 	@if [ -d $(UUID)/schemas ]; then \
 		glib-compile-schemas $(UUID)/schemas; \
 	fi
+	# make translations
+	@if [ "$(PO)" ]; then \
+		if ! [ -d $(UUID)/locale ]; then \
+			mkdir $(UUID)/locale; \
+		fi; \
+		for f in $(PO); do \
+		    lf=`basename $$f .po`; \
+			mkdir -p $(UUID)/locale/$$lf/LC_MESSAGES; \
+			msgfmt $$f -o $(UUID)/locale/$$lf/LC_MESSAGES/$(DOMAIN).mo; \
+		done; \
+	fi
 
 zip: all
 	zip -rq $(UUID).zip $(FILES:%=$(UUID)/%)
 dev-zip: all
 	(cd $(UUID); \
 		zip -rq ../$(UUID).zip $(FILES))
+
+# From https://github.com/micheleg/dash-to-dock and
+# https://live.gnome.org/GnomeShell/Extensions/FAQ/CreatingExtensions
+potfile:
+	xgettext -k_ -kN_ -c -o $(UUID)/po/$(DOMAIN).pot --package-name "XPenguins" $(UUID)/*.js
 
 # Installation
 
-The easy way (recommended):
+**Recommended:** One-click install from [extensions.gnome.org](https://extensions.gnome.org/extension/405/xpenguins/).
+
+Otherwise:
 
 1. Download the .zip file on the [Downloads page](https://bitbucket.org/mathematicalcoffee/xpenguins-gnome-shell-extension/downloads).
 2. Open `gnome-tweak-tool`, go to "Shell Extensions", "Install Extension" and select the .zip file.
 Alternatively (developers?):
 
 1. Checkout the repository: `hg clone https://bitbucket.org/mathematicalcoffee/xpenguins-gnome-shell-extension`
-2. Update to the `gnome3.2` or `gnome3.4` branch (the `default` branch is **NOT** guaranteed to work!).
-3. Copy the folder `xpenguins@mathematical.coffee.gmail.com` to `.local/share/gnome-shell/extensions`.
-4. If on GNOME 3.2, use `dconf-editor` and modify the key `/org/gnome/shell/enabled-extensions` to include `'xpenguins@mathematical.coffee.gmail.com'`. 
-If on GNOME 3.4, then just do `gnome-shell-extension-tool -e xpenguins@mathematical.coffee.gmail.com`.
+2. Update to the appropriate branch.
+3. Run `make`.
+4. Copy the folder `xpenguins@mathematical.coffee.gmail.com` to `.local/share/gnome-shell/extensions`.
+5. If on GNOME 3.2, use `dconf-editor` and modify the key `/org/gnome/shell/enabled-extensions` to include `'xpenguins@mathematical.coffee.gmail.com'`. 
+If on GNOME 3.4+, then just do `gnome-shell-extension-tool -e xpenguins@mathematical.coffee.gmail.com`.
 
 All together now:
 
     hg clone https://bitbucket.org/mathematicalcoffee/xpenguins-gnome-shell-extension
     cd xpenguins-gnome-shell-extension
     # Use 'hg branches' to see what branches are available. They are GNOME versions it is compatible with.
-    hg up 3.2 
+    hg up gnome3.6 
+    make
     cp -r xpenguins@mathematical.coffee.gmail.com ~/.local/share/gnome-shell/extensions
-    # if you have GNOME 3.4:
+    # if you have GNOME 3.4+:
     gnome-shell-extension-tool -e xpenguins@mathematical.coffee.gmail.com
     # if you have GNOME 3.2:
     dconf read '/org/gnome/shell/enabled-extensions' | sed -r -e 's#\[(.+)\]#dconf write "/org/gnome/shell/enabled-extensions" "[\1, '\'xpenguins@mathematical.coffee.gmail.com\'']"#' | /bin/sh
 ---
 
 # FAQ
+### I want to help translate
+
+First off, thank you very much!
+I *think* I have translations set up. Use the [`po/xpenguins.pot`](https://bitbucket.org/mathematicalcoffee/xpenguins-gnome-shell-extension/src/default/xpenguins%40mathematical.coffee.gmail.com/po/xpenguins.pot) file to create a `.po` file with the translation.
+
+Skip the error/warning message translations if you like; the important ones are from `ui.js` and `extension.js` (these appear in the XPenguins menu).
+
+Then either email it to me, or submit a pull request with it.
+
 ### I want more themes (MOAR THEMES)!
 By default this comes with the Penguins, Big Penguins, Classic Penguins, Turtles, and Bill themes.
 Normal XPenguins themes will work - put them in `~/.xpenguins/themes` or in the folder `themes` in the extension directory and they will be detected.

xpenguins@mathematical.coffee.gmail.com/extension.js

 
 function init(metadata) {
     extensionPath = metadata.path;
+    imports.gettext.bindtextdomain('xpenguins', GLib.build_filenamev([extensionPath, 'locale']));
 }
 
 function enable() {
 
         /* choice of window */
         if (!blacklist.onDesktop) {
-            this._items.onDesktop = new PopupMenu.PopupMenuItem(_("Running in: ") 
-                + _("Desktop"));
+            this._items.onDesktop = new PopupMenu.PopupMenuItem(_("Running in: %s").format(_("Desktop")));
             this._items.onDesktop.connect('activate', Lang.bind(this,
                 this._onChooseWindow));
             this.menu.addMenuItem(this._items.onDesktop);
         dialog.disconnect(dialog._windowSelectedID);
         /* if meta window is null or has been destroyed in the meantime, use
          * the desktop. */
-        let string = _("Running in: ") + (metaWindow ? metaWindow.get_title() :
+        /* Translators: This means XPenguins is running in the window with title '%s' */
+        let string = _("Running in: %s").format(metaWindow ? metaWindow.get_title() :
             _("Desktop"));
         if (string.length > this._THEME_STRING_LENGTH_MAX) {
             string = string.substr(0, this._THEME_STRING_LENGTH_MAX - 3) + '...';

xpenguins@mathematical.coffee.gmail.com/po/en_AU.po

+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XPenguins\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-05-24 14:30+1000\n"
+"PO-Revision-Date: 2013-05-24 14:44+1000\n"
+"Last-Translator: Amy Chan <mathematical.coffee@gmail.com>\n"
+"Language-Team: \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: English\n"
+"X-Poedit-Country: AUSTRALIA\n"
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:76
+msgid "Ignore popups"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:77
+msgid "Ignore maximised windows"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:78
+msgid "Always on visible workspace"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:79
+msgid "Show blood"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:80
+msgid "Show angels"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:81
+msgid "God Mode"
+msgstr ""
+
+#. toggle to start xpenguins
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:117
+msgid "Start"
+msgstr ""
+
+#. if meta window is null or has been destroyed in the meantime, use
+#. * the desktop.
+#. Translators: This means XPenguins is running in the window with title '%s'
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:125
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:329
+#, c-format
+msgid "Running in: %s"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:125
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:330
+msgid "Desktop"
+msgstr ""
+
+#. theme submenu
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:133
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:272
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:306
+msgid "Theme"
+msgstr ""
+
+#. options submenu
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:137
+msgid "Options"
+msgstr ""
+
+#. animation speed
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:153
+msgid "Time between frames (ms)"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:162
+msgid "Load average reduce threshold"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:248
+msgid "No themes found, click to reload!"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:109
+#, c-format
+msgid "Theme '%s' not found or config file not present"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:113
+#, c-format
+msgid "Warning: theme %s already exists, not re-parsing"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:171
+#, c-format
+msgid "Warning: unknown type '%s': ignoring"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:198
+msgid "Warning: theme config file may not specify a default pixmap, ignoring"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:212
+#, c-format
+msgid "Warning: resetting pixmap to %s"
+msgstr ""
+
+#. unknown word
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:250
+#, c-format
+msgid "Warning: Unrecognised word %s, ignoring"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:256
+#, c-format
+msgid "Error reading config file: config file ended unexpectedly: Line %d: %s"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:270
+msgid "Theme must contain at least walkers and fallers"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:279
+msgid "Width of xpm image too small for even a single frame"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:281
+#, c-format
+msgid "Warning: width of %s is too small to display all frames"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:287
+msgid "Height of xpm image too small for even a single frame"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:289
+#, c-format
+msgid "Warning: height of %s is too small to display all frames"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/toon.js:388
+#, c-format
+msgid "Error: illegal direction %d"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/ui.js:48
+msgid "Select which window to run XPenguins in, or 'Cancel' to use the Desktop:"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/ui.js:82
+msgid "Cancel"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/ui.js:174
+msgid "OK"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/xpenguins.js:323
+msgid "Cannot use the 'on all workspaces' option if running in a window"
+msgstr ""
+

xpenguins@mathematical.coffee.gmail.com/po/en_US.po

+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XPenguins\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-05-24 14:30+1000\n"
+"PO-Revision-Date: 2013-05-24 14:46+1000\n"
+"Last-Translator: Amy Chan <mathematical.coffee@gmail.com>\n"
+"Language-Team: \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: English\n"
+"X-Poedit-Country: UNITED STATES\n"
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:76
+msgid "Ignore popups"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:77
+msgid "Ignore maximised windows"
+msgstr "Ignore maximized windows"
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:78
+msgid "Always on visible workspace"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:79
+msgid "Show blood"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:80
+msgid "Show angels"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:81
+msgid "God Mode"
+msgstr ""
+
+#. toggle to start xpenguins
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:117
+msgid "Start"
+msgstr ""
+
+#. if meta window is null or has been destroyed in the meantime, use
+#. * the desktop.
+#. Translators: This means XPenguins is running in the window with title '%s'
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:125
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:329
+#, c-format
+msgid "Running in: %s"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:125
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:330
+msgid "Desktop"
+msgstr ""
+
+#. theme submenu
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:133
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:272
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:306
+msgid "Theme"
+msgstr ""
+
+#. options submenu
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:137
+msgid "Options"
+msgstr ""
+
+#. animation speed
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:153
+msgid "Time between frames (ms)"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:162
+msgid "Load average reduce threshold"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:248
+msgid "No themes found, click to reload!"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:109
+#, c-format
+msgid "Theme '%s' not found or config file not present"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:113
+#, c-format
+msgid "Warning: theme %s already exists, not re-parsing"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:171
+#, c-format
+msgid "Warning: unknown type '%s': ignoring"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:198
+msgid "Warning: theme config file may not specify a default pixmap, ignoring"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:212
+#, c-format
+msgid "Warning: resetting pixmap to %s"
+msgstr ""
+
+#. unknown word
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:250
+#, c-format
+msgid "Warning: Unrecognised word %s, ignoring"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:256
+#, c-format
+msgid "Error reading config file: config file ended unexpectedly: Line %d: %s"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:270
+msgid "Theme must contain at least walkers and fallers"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:279
+msgid "Width of xpm image too small for even a single frame"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:281
+#, c-format
+msgid "Warning: width of %s is too small to display all frames"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:287
+msgid "Height of xpm image too small for even a single frame"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:289
+#, c-format
+msgid "Warning: height of %s is too small to display all frames"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/toon.js:388
+#, c-format
+msgid "Error: illegal direction %d"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/ui.js:48
+msgid "Select which window to run XPenguins in, or 'Cancel' to use the Desktop:"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/ui.js:82
+msgid "Cancel"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/ui.js:174
+msgid "OK"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/xpenguins.js:323
+msgid "Cannot use the 'on all workspaces' option if running in a window"
+msgstr ""
+

xpenguins@mathematical.coffee.gmail.com/po/xpenguins.pot

+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: XPenguins\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-05-24 14:30+1000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:76
+msgid "Ignore popups"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:77
+msgid "Ignore maximised windows"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:78
+msgid "Always on visible workspace"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:79
+msgid "Show blood"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:80
+msgid "Show angels"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:81
+msgid "God Mode"
+msgstr ""
+
+#. toggle to start xpenguins
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:117
+msgid "Start"
+msgstr ""
+
+#. if meta window is null or has been destroyed in the meantime, use
+#. * the desktop.
+#. Translators: This means XPenguins is running in the window with title '%s'
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:125
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:329
+#, c-format
+msgid "Running in: %s"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:125
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:330
+msgid "Desktop"
+msgstr ""
+
+#. theme submenu
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:133
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:272
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:306
+msgid "Theme"
+msgstr ""
+
+#. options submenu
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:137
+msgid "Options"
+msgstr ""
+
+#. animation speed
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:153
+msgid "Time between frames (ms)"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:162
+msgid "Load average reduce threshold"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/extension.js:248
+msgid "No themes found, click to reload!"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:109
+#, c-format
+msgid "Theme '%s' not found or config file not present"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:113
+#, c-format
+msgid "Warning: theme %s already exists, not re-parsing"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:171
+#, c-format
+msgid "Warning: unknown type '%s': ignoring"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:198
+msgid "Warning: theme config file may not specify a default pixmap, ignoring"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:212
+#, c-format
+msgid "Warning: resetting pixmap to %s"
+msgstr ""
+
+#. unknown word
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:250
+#, c-format
+msgid "Warning: Unrecognised word %s, ignoring"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:256
+#, c-format
+msgid "Error reading config file: config file ended unexpectedly: Line %d: %s"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:270
+msgid "Theme must contain at least walkers and fallers"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:279
+msgid "Width of xpm image too small for even a single frame"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:281
+#, c-format
+msgid "Warning: width of %s is too small to display all frames"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:287
+msgid "Height of xpm image too small for even a single frame"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/theme.js:289
+#, c-format
+msgid "Warning: height of %s is too small to display all frames"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/toon.js:388
+#, c-format
+msgid "Error: illegal direction %d"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/ui.js:48
+msgid ""
+"Select which window to run XPenguins in, or 'Cancel' to use the Desktop:"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/ui.js:82
+msgid "Cancel"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/ui.js:174
+msgid "OK"
+msgstr ""
+
+#: xpenguins@mathematical.coffee.gmail.com/xpenguins.js:323
+msgid "Cannot use the 'on all workspaces' option if running in a window"
+msgstr ""

xpenguins@mathematical.coffee.gmail.com/theme.js

         let name = ThemeManager.sanitiseThemeName(iname),
             file_name = ThemeManager.getThemePath(name);
         if (!file_name) {
-            throw new Error("Theme " + name + " not found or config file not present");
+            throw new Error(_("Theme '%s' not found or config file not present").format(name));
         }
         /* if theme has already been parsed, do not re-parse */
         if (this._themeGenusMap[name]) {
-            XPUtil.warn("Warning: theme %s already exists, not re-parsing",
+            XPUtil.warn(_("Warning: theme %s already exists, not re-parsing"),
                 iname);
             return;
         }

xpenguins@mathematical.coffee.gmail.com/xpenguins.js

         this._playing = 0;
         this._numbers = {};
         this._relaunch = false;
+        this._toons = [];
     },
 
     /***************************************
 
     /* Have to override get_workspace to incorporate a movable window :/ */
     get_workspace: function () {
-        XPUtil.DEBUG('[XP] get_workspace: %d', this._XPenguinsWindow.get_workspace().index());
-        return this._XPenguinsWindow.get_workspace();
+        if (!this._XPenguinsWindow) {
+            return global.screen.get_active_workspace();
+        } else {
+            XPUtil.DEBUG('[XP] get_workspace: %d', this._XPenguinsWindow.get_workspace().index());
+            return this._XPenguinsWindow.get_workspace();
+        }
     },
 
     /* Initialise all variables & load themes & initialise toons.
         this._exiting = false;
 
         this._dirty = true;
-        
+
         /* Laziness */
         let opt = this.options;
         /* If they set onAllWorkspaces but are running in a window,
         if (opt.load1 >= 0) {
             let load = XPUtil.loadAverage();
             if (load < 0) {
-                this.LOG(_("Warning: cannot detect load averages on this system"));
+                this.LOG("Warning: cannot detect load averages on this system");
                 opt.load1 = -1;
                 opt.load2 = -1;
             }
         if (this._sleepID) {
             Mainloop.source_remove(this._sleepID);
         }
-        if (this._XPenguinsWindowDestroyedID && this._XPenguinsWindow.actor) {
+        if (this._XPenguinsWindowDestroyedID && this._XPenguinsWindow && this._XPenguinsWindow.actor) {
             this._XPenguinsWindow.actor.disconnect(this._XPenguinsWindowDestroyedID);
             this._XPenguinsWindowDestroyedID = null;
         }
                     for (let type in gdata) {
                         if (gdata.hasOwnProperty(type) &&
                                 !this._theme.toonData[i][type].master) {
-                            Main.uiGroup.remove_actor(gdata[type].texture);
+                            gdata[type].texture.unparent();
                         }
                     }
                 }
 
         /* Note: we *don't* destroy the window clone so that it may be
          * re-used for the next run without having to re-assign the window
-         * we want to run in. 
+         * we want to run in.
          */
         //this._XPenguinsWindow.destroy();
 
     changeOption: function (propName, propVal, emit) {
         /* disallowed options changes */
         if (propName === 'onAllWorkspaces' && propVal && !this._onDesktop) {
-            XPUtil.warn(_("Cannot use the on all workspaces option if running in a window"));
+            XPUtil.warn(_("Cannot use the 'on all workspaces' option if running in a window"));
             return;
         }
 
         WindowListener.WindowListener.prototype.destroy.call(this);
         this.exit();
     },
-    
+
     /* connects up events required to maintain toonWindows as an accurate
      * snapshot of what the windows on the workspace look like
      * We override it to add windows for the xpenguins window.
         /* pause on overview show, if we're on the desktop */
         this.connectAndTrack(this, Main.overview, 'showing',
             Lang.bind(this, function () {
-                this.pause(true, Main.overview, 'hiding');
+                this.pause(true, Main.overview, 'hidden');
             })
         );
         WindowListener.WindowListener.prototype._connectSignals.apply(this, arguments);
         if (this.options.stackingOrder) {
             winList = global.display.sort_windows_by_stacking(winList);
             /* sort by monitor ... ? */
-            winList.sort(function (a, b) { 
+            winList.sort(function (a, b) {
                 return a.get_monitor() - b.get_monitor();
             });
         }
             if (!this._onDesktop && win === this._XPenguinsWindow.meta_window) {
                 break;
             }
-            if (this._onDesktop && this.options.ignoreMaximised && 
+            if (this._onDesktop && this.options.ignoreMaximised &&
                     win.get_maximized() ===
                     (Meta.MaximizeFlags.HORIZONTAL | Meta.MaximizeFlags.VERTICAL)) {
                 /* look for the next monitor */
         this._dirty = false;
     },
 
-
     /****************
      * Initialising *
      ****************/
         };
     },
 
-
     /* returns array of themes with non-zero toons */
     getThemes: function () {
         return this.themeList.filter(Lang.bind(this, function (name) {
 
         this._onDesktop = !(winActor instanceof Meta.WindowActor);
         if (this.options.onAllWorkspaces && !this._onDesktop) {
-            XPUtil.warn(_("Warning: onAllWorkspaces is TRUE but running in a window, setting onAllWorkspaces to FALSE"));
+            XPUtil.LOG("Warning: onAllWorkspaces is TRUE but running in a window, setting onAllWorkspaces to FALSE");
             this.changeOption('onAllWorkspaces', false, true);
         }
         this.options.stackingOrder = (!this._onDesktop || this.options.ignoreMaximised);
             Lang.bind(this, this._onXPenguinsWindowDestroyed)
         );
 
-
         /* Note: we can't just call stop then start instantaneously, because
          * the current instance of _frame will return true (since _playing
          * is now the new instance) and the new instance of _frame will also
         }
     },
 
-
     /*******************
      * PRIVATE METHODS *
      *******************/
 
     /* stop xpenguins, but play the exit sequence */
     _onInterrupt: function (justExit) {
-        this.LOG(_("Interrupt received: Exiting."));
+        this.LOG('Interrupt received: Exiting.');
         /* If we're sleeping then quit immediately */
         if (this._sleepID) {
             Mainloop.source_remove(this._sleepID);
         }
     },
 
-
     /* _frame is called every frame of the iteration.
      * It consists of two parts:
      *
         // it's this._toons.length - this._deadToons.length
         /************* END xpenguins_frame() ************/
 
-
         /************* START main loop ************/
         /* If there are no toons left & 'exiting' has been signalled,
          * then we've just finished killing all the penguins.
          */
         let numActive = this._toons.length - this._deadToons.length;
         if (!numActive && this._exiting) {
-            this.LOG(_("Done."));
+            this.LOG('Done.');
             this.exit();
             return false;
         }
                 signal = 'load-averaging-kill';
             }
             if (this._toons.length - this._deadToons.length !== newp) {
-                this.LOG(_("Adjusting number according to load: %d -> %d"),
-                        this._toons.length - this._deadToons.length, newp);
+                this.LOG("Adjusting number according to load: %d -> %d".format(
+                        this._toons.length - this._deadToons.length, newp));
                 this._setTotalNumber(newp);
                 this.emit(signal);
             }