diff options
| author | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-16 17:31:20 +0200 |
|---|---|---|
| committer | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-16 17:31:20 +0200 |
| commit | 7f5030ac208c30a7dc576a57cd9e665022ccbde5 (patch) | |
| tree | 6b23e78aa8cc2dd363def46e083217e3c9b52f1b /modules/gallery/helpers/l10n_client.php | |
| parent | 923732ca4dca6db218f6252a7133cd72f98fa086 (diff) | |
| parent | 85b0f580291e375a2c5ec21b8210e59023ee24c2 (diff) | |
Merge commit 'upstream/master'
Diffstat (limited to 'modules/gallery/helpers/l10n_client.php')
| -rw-r--r-- | modules/gallery/helpers/l10n_client.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/gallery/helpers/l10n_client.php b/modules/gallery/helpers/l10n_client.php index 20f81ecc..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,7 +114,8 @@ class l10n_client_Core { // {key:<key_2>, ...} // ] $count = count($response); - log::info("translations", "Installed $count new / updated translation messages"); + $message[] = t2("Installed 1 new / updated translation message", + "Installed %count new / updated translation messages", $count); foreach ($response as $message_data) { // @todo Better input validation @@ -150,6 +153,7 @@ class l10n_client_Core { $entry->translation = $translation; $entry->save(); } + return $message; } static function submit_translations() { |
