aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Updater.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-05-09 18:12:15 +0200
committerArthurHoaro <arthur@hoa.ro>2017-10-22 12:55:03 +0200
commit12266213d098a53c5f005b9afcbbe62771fd580c (patch)
treec7adfb280272fee16a5e2011f55315f838a07395 /application/Updater.php
parent72cfe44436f4316112fc4aabfe8940aa7b4adcab (diff)
downloadShaarli-12266213d098a53c5f005b9afcbbe62771fd580c.tar.gz
Shaarli-12266213d098a53c5f005b9afcbbe62771fd580c.tar.zst
Shaarli-12266213d098a53c5f005b9afcbbe62771fd580c.zip
Shaarli's translation
* translation system and unit tests * Translations everywhere Dont use translation merge It is not available with PHP builtin gettext, so it would have lead to inconsistency.
Diffstat (limited to 'application/Updater.php')
-rw-r--r--application/Updater.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/application/Updater.php b/application/Updater.php
index 72b2def0..723a7a81 100644
--- a/application/Updater.php
+++ b/application/Updater.php
@@ -73,7 +73,7 @@ class Updater
73 } 73 }
74 74
75 if ($this->methods === null) { 75 if ($this->methods === null) {
76 throw new UpdaterException('Couldn\'t retrieve Updater class methods.'); 76 throw new UpdaterException(t('Couldn\'t retrieve Updater class methods.'));
77 } 77 }
78 78
79 foreach ($this->methods as $method) { 79 foreach ($this->methods as $method) {
@@ -482,7 +482,7 @@ class UpdaterException extends Exception
482 } 482 }
483 483
484 if (! empty($this->method)) { 484 if (! empty($this->method)) {
485 $out .= 'An error occurred while running the update '. $this->method . PHP_EOL; 485 $out .= t('An error occurred while running the update ') . $this->method . PHP_EOL;
486 } 486 }
487 487
488 if (! empty($this->previous)) { 488 if (! empty($this->previous)) {
@@ -522,11 +522,11 @@ function read_updates_file($updatesFilepath)
522function write_updates_file($updatesFilepath, $updates) 522function write_updates_file($updatesFilepath, $updates)
523{ 523{
524 if (empty($updatesFilepath)) { 524 if (empty($updatesFilepath)) {
525 throw new Exception('Updates file path is not set, can\'t write updates.'); 525 throw new Exception(t('Updates file path is not set, can\'t write updates.'));
526 } 526 }
527 527
528 $res = file_put_contents($updatesFilepath, implode(';', $updates)); 528 $res = file_put_contents($updatesFilepath, implode(';', $updates));
529 if ($res === false) { 529 if ($res === false) {
530 throw new Exception('Unable to write updates in '. $updatesFilepath . '.'); 530 throw new Exception(t('Unable to write updates in '. $updatesFilepath . '.'));
531 } 531 }
532} 532}