diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-08-27 16:11:47 -0700 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-08-27 16:11:47 -0700 |
| commit | 74363ced870d4114e7570729636875e0258917b3 (patch) | |
| tree | 61bc27831a362994fc96ea90172d50e25d5c76cb /modules/gallery/helpers/l10n_client.php | |
| parent | 98e9a96ba4d2419e02717369be8c0d886bc35ef7 (diff) | |
| parent | 4828db003f3ee505eb9e6d056cdb142da34b78ff (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3 into HEAD
Conflicts:
modules/slideshow/helpers/slideshow_event.php
Diffstat (limited to 'modules/gallery/helpers/l10n_client.php')
| -rw-r--r-- | modules/gallery/helpers/l10n_client.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/gallery/helpers/l10n_client.php b/modules/gallery/helpers/l10n_client.php index e153532c..3460cc65 100644 --- a/modules/gallery/helpers/l10n_client.php +++ b/modules/gallery/helpers/l10n_client.php @@ -67,11 +67,14 @@ 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(); - $locales = locale::installed(); + $locales = locales::installed(); foreach ($locales as $locale => $locale_data) { $request->locales[] = $locale; } @@ -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); @@ -111,11 +113,6 @@ class l10n_client_Core { // [{key:<key_1>, translation: <JSON encoded translation>, rev:<rev>, locale:<locale>}, // {key:<key_2>, ...} // ] - $count = count($response); - log::info("translations", - t2("Installed 1 new / updated translation message", - "Installed %count new / updated translation messages", $count)); - foreach ($response as $message_data) { // @todo Better input validation if (empty($message_data->key) || empty($message_data->translation) || |
