[gnomeweb-wp] use xhtml mode for xml2po
- From: Vinicius Scopel Depizzol <vdepizzol src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnomeweb-wp] use xhtml mode for xml2po
- Date: Fri, 11 Feb 2011 01:19:54 +0000 (UTC)
commit f38cf864d3005af9469b5816ab7224b5e21b845e
Author: Vinicius Depizzol <vdepizzol gmail com>
Date: Thu Feb 10 22:41:20 2011 -0200
use xhtml mode for xml2po
while "xhtml" sounds the obvious choice, I couldn't agree with the lack of
specs[1] there. For instance, all the "href" and "src" addresses aren't ignored.
[1] http://git.gnome.org/browse/gnome-doc-utils/tree/xml2po/xml2po/modes/xhtml.py
wp-content/plugins/wppo/wppo.php | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/wp-content/plugins/wppo/wppo.php b/wp-content/plugins/wppo/wppo.php
index e061ef9..c7f26e3 100644
--- a/wp-content/plugins/wppo/wppo.php
+++ b/wp-content/plugins/wppo/wppo.php
@@ -74,7 +74,7 @@ register_activation_hook (__FILE__, 'wppo_install');
function wppo_update_pot_file ($post) {
$xml_file = PO_DIR . "gnomesite.xml";
file_put_contents ($xml_file, wppo_generate_po_xml ());
- exec ("/usr/bin/xml2po -o " . POT_FILE . " $xml_file");
+ exec ("/usr/bin/xml2po -m xhtml -o " . POT_FILE . " $xml_file");
/* Update all the existing po files to handle the modifications in the
* content using xml2po -u
@@ -84,7 +84,7 @@ function wppo_update_pot_file ($post) {
/* Gets all the .po files from PO_DIR. */
if (strpos ($po_file, '.po', 1) !== false && strpos ($po_file, '.pot', 1) === false) {
- exec ("/usr/bin/xml2po -u $po_file $xml_file");
+ exec ("/usr/bin/xml2po -m xhtml -u $po_file $xml_file");
}
}
}
@@ -122,7 +122,7 @@ function wppo_receive_po_file () {
$lang = $po_file_array[1];
$translated_xml_file = PO_DIR . 'gnomesite.' . $lang . '.xml';
- exec ("/usr/bin/xml2po -p " . PO_DIR . "$po_file -o $translated_xml_file " . PO_DIR . "gnomesite.xml");
+ exec ("/usr/bin/xml2po -m xhtml -p " . PO_DIR . "$po_file -o $translated_xml_file " . PO_DIR . "gnomesite.xml");
$translated_xml = file_get_contents ($translated_xml_file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]