Index: src/wp-includes/pomo/po.php
===================================================================
--- src/wp-includes/pomo/po.php	(revision 29533)
+++ src/wp-includes/pomo/po.php	(working copy)
@@ -97,7 +97,7 @@
 	 * @param string $string the string to format
 	 * @return string the poified string
 	 */
-	function poify($string) {
+	static function poify($string) {
 		$quote = '"';
 		$slash = '\\';
 		$newline = "\n";
@@ -160,7 +160,7 @@
 	 * @param string $string prepend lines in this string
 	 * @param string $with prepend lines with this string
 	 */
-	function prepend_each_line($string, $with) {
+	static function prepend_each_line($string, $with) {
 		$php_with = var_export($with, true);
 		$lines = explode("\n", $string);
 		// do not prepend the string on the last empty line, artefact by explode
@@ -180,7 +180,7 @@
 	 * @param string $char character to denote a special PO comment,
 	 * 	like :, default is a space
 	 */
-	function comment_block($text, $char=' ') {
+	static function comment_block($text, $char=' ') {
 		$text = wordwrap($text, PO_MAX_LINE_LEN - 3);
 		return PO::prepend_each_line($text, "#$char ");
 	}
@@ -193,7 +193,7 @@
 	 * @return string|bool PO-style formatted string for the entry or
 	 * 	false if the entry is empty
 	 */
-	function export_entry(&$entry) {
+	public static function export_entry(&$entry) {
 		if (is_null($entry->singular)) return false;
 		$po = array();
 		if (!empty($entry->translator_comments)) $po[] = PO::comment_block($entry->translator_comments);
Index: tools/i18n/extract.php
===================================================================
--- tools/i18n/extract.php	(revision 29533)
+++ tools/i18n/extract.php	(working copy)
@@ -28,11 +28,14 @@
 		foreach ( $file_names as $file_name ) {
 			if ( '.' == $file_name || '..' == $file_name ) continue;
 			if ( preg_match( '/\.php$/', $file_name ) && $this->does_file_name_match( $prefix . $file_name, $excludes, $includes ) ) {
-				$translations->merge_originals_with( $this->extract_from_file( $file_name, $prefix ) );
+				$extracted = $this->extract_from_file( $file_name, $prefix );
+			} elseif ( is_dir( $file_name ) ) {
+				$extracted = $this->extract_from_directory( $file_name, $excludes, $includes, $prefix . $file_name . '/' );
+			} else {
+				continue;
 			}
-			if ( is_dir( $file_name ) ) {
-				$translations->merge_originals_with( $this->extract_from_directory( $file_name, $excludes, $includes, $prefix . $file_name . '/' ) );
-			}
+
+			$translations->merge_originals_with( $extracted );
 		}
 		chdir( $old_cwd );
 		return $translations;
Index: tools/i18n/makepot.php
===================================================================
--- tools/i18n/makepot.php	(revision 29533)
+++ tools/i18n/makepot.php	(working copy)
@@ -388,7 +388,7 @@

 	}

-	function get_first_lines($filename, $lines = 30) {
+	public static function get_first_lines($filename, $lines = 30) {
 		$extf = fopen($filename, 'r');
 		if (!$extf) return false;
 		$first_lines = '';
@@ -404,7 +404,7 @@
 	}


-	function get_addon_header($header, &$source) {
+	public static function get_addon_header($header, &$source) {
 		if (preg_match('|'.$header.':(.*)$|mi', $source, $matches))
 			return trim($matches[1]);
 		else
