From 84f56281ea414767d4beca6ca35b9653658ee6ea Mon Sep 17 00:00:00 2001 From: Gautam Gupta Date: Fri, 18 May 2012 01:58:55 +0530 Subject: [PATCH] Don't export untranslated strings in mo files. --- php-mo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php-mo.php b/php-mo.php index 7e7eb59..8e4fc84 100644 --- a/php-mo.php +++ b/php-mo.php @@ -15,7 +15,7 @@ * More info: * https://github.com/josscrowcroft/php.mo * - * Based on php-msgfmt by Matthias Bauer (Copyright © 2007), a command-line PHP tool + * Based on php-msgfmt by Matthias Bauer (Copyright � 2007), a command-line PHP tool * for converting .po files to .mo. * (http://wordpress-soc-2007.googlecode.com/svn/trunk/moeffju/php-msgfmt/msgfmt.php) * @@ -150,6 +150,7 @@ function phpmo_parse_po_file($in) { return FALSE; } } + if (empty($entry['msgstr'][0])) continue; $hash[$entry['msgid']] = $entry; }