summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/l10n_client.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-07-07 21:20:37 -0700
committerBharat Mediratta <bharat@menalto.com>2009-07-07 21:20:37 -0700
commit74d4a4c0fd0d1aa2e93e62397b0b0a10d55b986d (patch)
tree70d5a48fc8bfcf0a7db0ceb94d284d6df38c92f0 /modules/gallery/helpers/l10n_client.php
parentfaabae5dae712ebff656abe8ebc493d8e031d4a3 (diff)
parent6ac5238b83d58824eb9327406a2ee50b7e603214 (diff)
Merge branch 'master' of git@github.com:/gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/l10n_client.php')
-rw-r--r--modules/gallery/helpers/l10n_client.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/gallery/helpers/l10n_client.php b/modules/gallery/helpers/l10n_client.php
index e153532c..6d4da0eb 100644
--- a/modules/gallery/helpers/l10n_client.php
+++ b/modules/gallery/helpers/l10n_client.php
@@ -67,6 +67,9 @@ class l10n_client_Core {
return true;
}
+ /**
+ * @return an array of messages that will be written to the task log
+ */
static function fetch_updates() {
$request->locales = array();
$request->messages = new stdClass();
@@ -101,8 +104,7 @@ class l10n_client_Core {
throw new Exception("@todo TRANSLATIONS_FETCH_REQUEST_FAILED " . $response_status);
}
if (empty($response_data)) {
- log::info("translations", "Translations fetch request resulted in an empty response");
- return;
+ return array(t("Translations fetch request resulted in an empty response"));
}
$response = json_decode($response_data);
@@ -112,9 +114,8 @@ class l10n_client_Core {
// {key:<key_2>, ...}
// ]
$count = count($response);
- log::info("translations",
- t2("Installed 1 new / updated translation message",
- "Installed %count new / updated translation messages", $count));
+ $message[] = t2("Installed 1 new / updated translation message",
+ "Installed %count new / updated translation messages", $count);
foreach ($response as $message_data) {
// @todo Better input validation
@@ -152,6 +153,7 @@ class l10n_client_Core {
$entry->translation = $translation;
$entry->save();
}
+ return $message;
}
static function submit_translations() {