[gnome-web-wppo] properly added ITS rules when updating translations
- From: Vinicius Scopel Depizzol <vdepizzol src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-web-wppo] properly added ITS rules when updating translations
- Date: Thu, 15 Mar 2012 22:38:00 +0000 (UTC)
commit 4d2260efab4f4672c992553f406c7f8fb7005102
Author: Vinicius Depizzol <vdepizzol gmail com>
Date: Thu Mar 15 19:37:50 2012 -0300
properly added ITS rules when updating translations
admin.php | 4 ++--
backend.php | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/admin.php b/admin.php
index 86d2bb9..112acf1 100644
--- a/admin.php
+++ b/admin.php
@@ -280,8 +280,8 @@ add_action('admin_menu', function() {
echo '<p>There were some problems on compiling the following MO file:</p>';
echo '<ul>';
- foreach ($value as $coverage => $output) {
- echo '<li>'.$coverage.'.pot<br /><pre><code style="display: block;">'.htmlspecialchars($output).'</code></pre></li>';
+ foreach ($value as $lang => $output) {
+ echo '<li>'.$lang.'<br /><pre><code style="display: block;">'.htmlspecialchars($output).'</code></pre></li>';
}
echo '</ul>';
}
diff --git a/backend.php b/backend.php
index ab28929..54807bc 100644
--- a/backend.php
+++ b/backend.php
@@ -218,15 +218,17 @@ function wppo_check_for_po_changes($force = false, $coverage = array('dynamic',
$translated_xml_file = WPPO_DIR.$post_type.'/xml/'.$lang.'.xml';
$mo_file = WPPO_DIR.$post_type.'/mo/'.$lang.'.mo';
- $compile_command = WPPO_MSGFMT_COMMAND." ".escapeshellarg($po_file)." -o ".escapeshellarg($mo_file)." -i ".escapeshellarg($its_rules_file)." 2>&1";
+ $compile_command = WPPO_MSGFMT_COMMAND." ".escapeshellarg($po_file)." -o ".escapeshellarg($mo_file)." 2>&1";
$msgfmt_output = shell_exec($compile_command);
if (trim($msgfmt_output) != '') {
- $wppo_error['msgfmt'][$post_type][$lang] = $msgfmt_output;
+ $wppo_error['msgfmt'][$lang] = $msgfmt_output;
} else {
+ $its_rules_file = WPPO_PLUGIN_DIR.'wppo.its';
+
$command = WPPO_ITSTOOL_COMMAND." -m ".escapeshellarg($mo_file)." -o ".escapeshellarg($translated_xml_file)." ".escapeshellarg($original_xml_file)." -i ".escapeshellarg($its_rules_file)." 2>&1";
$output = shell_exec($command);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]