From ab6773da7de5576dccff04a54233ebe7c330ae06 Mon Sep 17 00:00:00 2001 From: gloas <gloas@afi-sa.fr> Date: Thu, 3 May 2018 15:50:00 +0200 Subject: [PATCH] dev #74865 translate more strings --- .../admin/controllers/ActivityController.php | 8 +++--- .../admin/controllers/AlbumController.php | 2 +- .../admin/controllers/HarvestController.php | 2 +- .../controllers/MultimediaController.php | 6 ++--- .../admin/controllers/OaiController.php | 2 +- .../admin/controllers/OpdsController.php | 5 ++-- .../controllers/SessionActivityController.php | 2 +- .../views/scripts/album/edit-images.phtml | 2 +- .../views/scripts/album/preview-album.phtml | 2 +- .../scripts/activities/detail-session.phtml | 8 +++--- library/Class/Album.php | 2 +- .../Cosmogramme/Integration/PhaseAbstract.php | 8 +++--- library/Class/EAD.php | 26 +++++++++++-------- library/Class/MoteurRecherche/Facettes.php | 11 +++++--- library/Class/MultiUpload.php | 9 ++++--- library/Class/Systeme/Widget/Abstract.php | 6 ++--- .../WebService/BibNumerique/Abstract.php | 6 ++--- .../WebService/BibNumerique/ToutApprendre.php | 2 +- .../WebService/BibNumerique/Vodeclic.php | 2 +- .../Class/WebService/OPDS/CatalogEntry.php | 18 +++++++------ .../WebService/SIGB/Carthame/Service.php | 4 +-- .../Controller/Plugin/Manager/Album.php | 6 ++--- .../Plugin/Manager/SessionActivity.php | 4 +-- .../ZendAfi/View/Helper/Abonne/Multimedia.php | 2 +- .../ZendAfi/View/Helper/CosmoBibPlannif.php | 9 ++++--- 25 files changed, 83 insertions(+), 71 deletions(-) diff --git a/application/modules/admin/controllers/ActivityController.php b/application/modules/admin/controllers/ActivityController.php index c014530efc5..f155142e8af 100644 --- a/application/modules/admin/controllers/ActivityController.php +++ b/application/modules/admin/controllers/ActivityController.php @@ -107,7 +107,7 @@ class Admin_ActivityController extends ZendAfi_Controller_Action { return; } - $this->view->titre = sprintf('Modifier la session du %s de l\'activité "%s"', + $this->view->titre = $this->_('Modifier la session du %s de l\'activité "%s"', $this->view->humanDate($session->getDateDebut(), 'd MMMM YYYY'), $session->getLibelleActivity()); @@ -133,7 +133,7 @@ class Admin_ActivityController extends ZendAfi_Controller_Action { return; } - $this->view->titre = sprintf('Personnes présentes à la session du %s de l\'activité "%s"', + $this->view->titre = $this->_('Personnes présentes à la session du %s de l\'activité "%s"', $this->view->humanDate($session->getDateDebut(), 'd MMMM YYYY'), $session->getLibelleActivity()); $this->view->activity = $session->getActivity(); @@ -175,7 +175,7 @@ class Admin_ActivityController extends ZendAfi_Controller_Action { return; } - $this->view->titre = sprintf('Nouvelle session de l\'activité "%s"', + $this->view->titre = $this->_('Nouvelle session de l\'activité "%s"', $activity->getLibelle()); $session = Class_SessionActivity::getLoader() @@ -214,7 +214,7 @@ class Admin_ActivityController extends ZendAfi_Controller_Action { if ($form->isValid($session)) { $session->save(); - $this->_helper->notify(sprintf('Session du %s sauvegardée', + $this->_helper->notify($this->_('Session du %s sauvegardée', $this->view->humanDate($session->getDateDebut(), 'd MMMM YYYY'))); $this->_redirect('admin/activity/session_edit/id/'.$session->getId()); return true; diff --git a/application/modules/admin/controllers/AlbumController.php b/application/modules/admin/controllers/AlbumController.php index 0d865522d9a..c1410b891f7 100644 --- a/application/modules/admin/controllers/AlbumController.php +++ b/application/modules/admin/controllers/AlbumController.php @@ -123,7 +123,7 @@ class Admin_AlbumController extends ZendAfi_Controller_Action { if ($form->isValid($this->_request->getPost()) && $form->ead->receive()) { $ead = new Class_EAD(); $ead->loadFile($form->ead->getFileName()); - $this->_helper->notify(sprintf('%d albums importés', count($ead->getAlbums()))); + $this->_helper->notify($this->_('%d albums importés', count($ead->getAlbums()))); $this->_redirect('admin/album'); return; } diff --git a/application/modules/admin/controllers/HarvestController.php b/application/modules/admin/controllers/HarvestController.php index c1ae07eb98f..015f20d792a 100644 --- a/application/modules/admin/controllers/HarvestController.php +++ b/application/modules/admin/controllers/HarvestController.php @@ -56,7 +56,7 @@ class Admin_HarvestController extends ZendAfi_Controller_Action { return; } - $this->view->titre = $this->view->_(sprintf('Moissonnage %s', + $this->view->titre = $this->view->_($this->_('Moissonnage %s', $this->_service->getName())); } diff --git a/application/modules/admin/controllers/MultimediaController.php b/application/modules/admin/controllers/MultimediaController.php index c6e1ad5f2a5..9ed0b166c86 100644 --- a/application/modules/admin/controllers/MultimediaController.php +++ b/application/modules/admin/controllers/MultimediaController.php @@ -50,7 +50,7 @@ class Admin_MultimediaController extends ZendAfi_Controller_Action { ->setLabel($hold->getLibelleDevice()) ->setContent( $this->view->tag('p', - sprintf('Le poste "%s" (OS: %s) a été réservé par %s dans le site de "%s"', + $this->_('Le poste "%s" (OS: %s) a été réservé par %s dans le site de "%s"', $hold->getLibelleDevice(), $hold->getOs(), $hold->getUsername(), @@ -70,7 +70,7 @@ class Admin_MultimediaController extends ZendAfi_Controller_Action { ->setId('holds'); $this->view->subview = $this->view->partial('multimedia/browse.phtml', - ['titre' => sprintf('Postes du site multimédia "%s"', $location->getLibelle()), + ['titre' => $this->_('Postes du site multimédia "%s"', $location->getLibelle()), 'location' => $location, 'holds' => $holds, 'devices' => $devices]); @@ -86,7 +86,7 @@ class Admin_MultimediaController extends ZendAfi_Controller_Action { } $this->view->subview = $this->view->partial('multimedia/holds.phtml', - ['titre' => sprintf('%s (%s): réservations', + ['titre' => $this->_('%s (%s): réservations', $device->getLibelle(), $device->getOs()), 'device' => $device]); diff --git a/application/modules/admin/controllers/OaiController.php b/application/modules/admin/controllers/OaiController.php index 48e1c4d7a47..7d615f2cb3d 100644 --- a/application/modules/admin/controllers/OaiController.php +++ b/application/modules/admin/controllers/OaiController.php @@ -55,7 +55,7 @@ class Admin_OaiController extends ZendAfi_Controller_Action { } $this->view->subview = $this->view->partial('oai/browse.phtml', - array('titre' => sprintf('Parcours de l\'entrepôt "%s"', $entrepot->getLibelle()), + array('titre' => $this->_('Parcours de l\'entrepôt "%s"', $entrepot->getLibelle()), 'entrepot_id' => $entrepot_id, 'oai_sets' => $oai_sets, 'oai_set' => $oai_set)); diff --git a/application/modules/admin/controllers/OpdsController.php b/application/modules/admin/controllers/OpdsController.php index 1e985c10da2..13232585996 100644 --- a/application/modules/admin/controllers/OpdsController.php +++ b/application/modules/admin/controllers/OpdsController.php @@ -46,9 +46,8 @@ class Admin_OpdsController extends ZendAfi_Controller_Action { $catalog = $catalog->newForEntry($entry_url); $this->view->subview = $this->view->partial('opds/browse.phtml', - array('titre' => sprintf('Parcours du catalogue "%s"', $catalog->getLibelle()), - 'catalog' => $catalog)); - + ['titre' => $this->_('Parcours du catalogue "%s"', $catalog->getLibelle()), + 'catalog' => $catalog]); $this->_forward('index'); } diff --git a/application/modules/admin/controllers/SessionActivityController.php b/application/modules/admin/controllers/SessionActivityController.php index db1029ad624..9a4835d46be 100644 --- a/application/modules/admin/controllers/SessionActivityController.php +++ b/application/modules/admin/controllers/SessionActivityController.php @@ -124,7 +124,7 @@ class Admin_SessionActivityController extends ZendAfi_Controller_Action { return; } - $this->view->titre = sprintf('Impressions pour la session du %s de l\'activité "%s"', + $this->view->titre = $this->_('Impressions pour la session du %s de l\'activité "%s"', $this->view->humanDate($session->getDateDebut(), 'd MMMM YYYY'), $session->getLibelleActivity()); $this->view->session = $session; diff --git a/application/modules/admin/views/scripts/album/edit-images.phtml b/application/modules/admin/views/scripts/album/edit-images.phtml index c2899626561..2b1ce288cd5 100644 --- a/application/modules/admin/views/scripts/album/edit-images.phtml +++ b/application/modules/admin/views/scripts/album/edit-images.phtml @@ -19,7 +19,7 @@ echo $this->tagUploadMultiple('albumRessourcesUpload', <?php echo $this->tagAnchor(['action' => 'sortressources'], - sprintf('%s Réordonner par nom de fichier', + $this->_('%s Réordonner par nom de fichier', Class_Admin_Skin::current()->renderActionIconOn('sort', $this, ['alt' => 'Trier ce media', diff --git a/application/modules/admin/views/scripts/album/preview-album.phtml b/application/modules/admin/views/scripts/album/preview-album.phtml index 4221704f99d..6c413275a27 100644 --- a/application/modules/admin/views/scripts/album/preview-album.phtml +++ b/application/modules/admin/views/scripts/album/preview-album.phtml @@ -6,7 +6,7 @@ if ($this->form) { ['style' => 'float: right', 'data-popup' => 'true']); - echo sprintf('Poids de la première vignette: %d ko (essayez de garder une valeur inférieure à 50ko)', + echo $this->_('Poids de la première vignette: %d ko (essayez de garder une valeur inférieure à 50ko)', round($this->album->getFirstThumbnailSize()/1000)); echo $this->renderForm($this->form); diff --git a/application/modules/opac/views/scripts/activities/detail-session.phtml b/application/modules/opac/views/scripts/activities/detail-session.phtml index a84cffdd9a0..fd6c6f7bd52 100644 --- a/application/modules/opac/views/scripts/activities/detail-session.phtml +++ b/application/modules/opac/views/scripts/activities/detail-session.phtml @@ -1,8 +1,8 @@ <?php -echo $this->openBoite(sprintf('Activité %s: session du %s', - $this->session->getLibelleActivity(), - $this->renderDateRange($this->session->getDateDebut(), - $this->session->getDateFin()))); +echo $this->openBoite($this->_('Activité %s: session du %s', + $this->session->getLibelleActivity(), + $this->renderDateRange($this->session->getDateDebut(), + $this->session->getDateFin()))); echo $this->renderSession($this->session); diff --git a/library/Class/Album.php b/library/Class/Album.php index f5b71a52083..478a6d49f4b 100644 --- a/library/Class/Album.php +++ b/library/Class/Album.php @@ -349,7 +349,7 @@ class Class_Album extends Storm_Model_Abstract { if ($this->hasDefaultValue($field)) return $this->getDefaultValue($field); - throw new Storm_Model_Exception(sprintf('Tried to call unknown method Class_Album::get%s', + throw new Storm_Model_Exception($this->_('Tried to call unknown method Class_Album::get%s', $this->attributeNameToAccessor($field))); } diff --git a/library/Class/Cosmogramme/Integration/PhaseAbstract.php b/library/Class/Cosmogramme/Integration/PhaseAbstract.php index 63f6de14d9c..f5c6b5a9d92 100644 --- a/library/Class/Cosmogramme/Integration/PhaseAbstract.php +++ b/library/Class/Cosmogramme/Integration/PhaseAbstract.php @@ -91,10 +91,10 @@ abstract class Class_Cosmogramme_Integration_PhaseAbstract { try { $this->_execute(); } catch (Exception $e) { - $this->_log->log('<p class="rouge">' . sprintf('Erreur lors de l\'execution de la phase %s : <br/>%s<br/>%s', - $this->_label, - $e->getMessage(), - $e->getTraceAsString()) . '</p>'); + $this->_log->log('<p class="rouge">' . $this->_('Erreur lors de l\'execution de la phase %s : <br/>%s<br/>%s', + $this->_label, + $e->getMessage(), + $e->getTraceAsString()) . '</p>'); $this->_cleanMemory(); } diff --git a/library/Class/EAD.php b/library/Class/EAD.php index 246458025a5..e44fb3a598f 100644 --- a/library/Class/EAD.php +++ b/library/Class/EAD.php @@ -16,10 +16,11 @@ * * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ class EADParser extends Class_WebService_XMLParser { + /** * @return EADParser */ @@ -37,6 +38,9 @@ class EADParser extends Class_WebService_XMLParser { class Class_EAD { + use Trait_Translator; + + protected $_xml_parser; protected $_albums; protected $_current_album; @@ -68,7 +72,7 @@ class Class_EAD { } - /** + /** * @param string $xml * @return Class_EAD */ @@ -76,7 +80,7 @@ class Class_EAD { $this->_albums = array(); $this->_import_categorie = Class_AlbumCategorie::getLoader() ->newInstance() - ->setLibelle(sprintf('import du %s', date('d M Y'))); + ->setLibelle($this->_('import du %s', date('d M Y'))); $this->_xml_parser = EADParser::newInstance(); $this->_xml_parser @@ -87,9 +91,9 @@ class Class_EAD { } - /** + /** * @return Class_EAD - */ + */ public function saveAlbums() { if ($this->_import_categorie->hasAlbums()) $this->_import_categorie->save(); @@ -106,7 +110,7 @@ class Class_EAD { } - /** + /** * @param string $filename * @return Class_EAD */ @@ -115,7 +119,7 @@ class Class_EAD { } - /** + /** * @return array */ public function getAlbums() { @@ -123,7 +127,7 @@ class Class_EAD { } - /** + /** * @return boolean */ public function isInFolio() { @@ -185,7 +189,7 @@ class Class_EAD { public function endUnitId($data) { - if ($this->isInFolio()) + if ($this->isInFolio()) $this->_current_folio['no'] = $data; else if ($this->_current_album) $this->_current_album->setCote(sprintf('MS%03d', $data)); @@ -208,7 +212,7 @@ class Class_EAD { public function endPhysFacet($data) { if (!$this->_current_album) return; - + if ($this->_type_physfacet == 'reliure') return $this->_current_album->addNote('316$a', self::cleanString($data)); @@ -240,7 +244,7 @@ class Class_EAD { $this->_current_album->setAnnee((int)$data); return; } - + $this->_current_album->setAnnee(null); $this->_current_album->addNote('305$a', self::cleanString($data)); } diff --git a/library/Class/MoteurRecherche/Facettes.php b/library/Class/MoteurRecherche/Facettes.php index a1de945fac3..f6618490487 100644 --- a/library/Class/MoteurRecherche/Facettes.php +++ b/library/Class/MoteurRecherche/Facettes.php @@ -20,6 +20,9 @@ */ class Class_MoteurRecherche_Facettes { + use Trait_Translator; + + protected $_facettes_par_cle = [], $_nb_facettes_par_cle = [], @@ -219,10 +222,10 @@ class Class_MoteurRecherche_Facettes { continue; $matches[] = ['id' => $bookmark_code, - 'label' => sprintf('%s : %s (%d)', - $facet->getCodeRubriqueLibelle(), - $facet_label, - $this->_codes_count[$bookmark_code])]; + 'label' => $this->_('%s : %s (%d)', + $facet->getCodeRubriqueLibelle(), + $facet_label, + $this->_codes_count[$bookmark_code])]; } usort($matches, function($first, $second) diff --git a/library/Class/MultiUpload.php b/library/Class/MultiUpload.php index cdd5c661a96..81e0adc2f1c 100644 --- a/library/Class/MultiUpload.php +++ b/library/Class/MultiUpload.php @@ -16,9 +16,12 @@ * * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ class Class_MultiUpload { + use Trait_Translator; + + /** @var Zend_Controller_Request_Http */ protected $_request; @@ -194,7 +197,7 @@ class Class_MultiUpload { */ protected function _ensureDirectory($path) { if (!$this->getFolderManager()->ensure($path)) { - $this->_error = sprintf('Le dossier "%s" n\'est pas accessible en écriture', $path); + $this->_error = $this->_('Le dossier "%s" n\'est pas accessible en écriture', $path); return false; } @@ -263,7 +266,7 @@ class Class_MultiUpload { */ class MultiUploadSettingReader { protected $_settings = array(); - + /** * @return MultiUploadSettingReader */ diff --git a/library/Class/Systeme/Widget/Abstract.php b/library/Class/Systeme/Widget/Abstract.php index 1c361717eda..8b8392f7adb 100644 --- a/library/Class/Systeme/Widget/Abstract.php +++ b/library/Class/Systeme/Widget/Abstract.php @@ -127,9 +127,9 @@ abstract class Class_Systeme_Widget_Abstract extends Class_Entity { $datas[] = (new Class_Entity()) ->setId($child['id_module']) ->setCategory($item->getCategoryLabel()) - ->setLabel(sprintf('%s ( %s )', - $item->getLibelle(), - $child['libelle'])); + ->setLabel($this->_('%s ( %s )', + $item->getLibelle(), + $child['libelle'])); } return $datas; diff --git a/library/Class/WebService/BibNumerique/Abstract.php b/library/Class/WebService/BibNumerique/Abstract.php index b6c05fd153e..13e03624c49 100644 --- a/library/Class/WebService/BibNumerique/Abstract.php +++ b/library/Class/WebService/BibNumerique/Abstract.php @@ -115,9 +115,9 @@ abstract class Class_WebService_BibNumerique_Abstract extends Class_WebService_A return; $total_page = $reader->getPageCount(); - $this->getLogger()->info(sprintf('Traitement de la page %s / %s', - $current_page, - $total_page)); + $this->getLogger()->info($this->_('Traitement de la page %s / %s', + $current_page, + $total_page)); $ress_numerique = $reader->getRessourcesNumeriques(); $this->_harvested_ids = array_merge($this->_harvested_ids, diff --git a/library/Class/WebService/BibNumerique/ToutApprendre.php b/library/Class/WebService/BibNumerique/ToutApprendre.php index 79b5aeb8326..220fd275868 100644 --- a/library/Class/WebService/BibNumerique/ToutApprendre.php +++ b/library/Class/WebService/BibNumerique/ToutApprendre.php @@ -48,7 +48,7 @@ class Class_WebService_BibNumerique_ToutApprendre extends Class_WebService_BibNu $this->getLogger()->info('Réponse reçue'); $this->parseXML($content); $this->_deleteNonHarvested(); - $this->getLogger()->info(sprintf('%d formations dans la base', count($this->_albums))); + $this->getLogger()->info($this->_('%d formations dans la base', count($this->_albums))); } diff --git a/library/Class/WebService/BibNumerique/Vodeclic.php b/library/Class/WebService/BibNumerique/Vodeclic.php index c12fc82e6e8..cb820e0887e 100644 --- a/library/Class/WebService/BibNumerique/Vodeclic.php +++ b/library/Class/WebService/BibNumerique/Vodeclic.php @@ -53,7 +53,7 @@ class Class_WebService_BibNumerique_Vodeclic extends Class_WebService_BibNumeriq $this->getLogger()->info('Réponse reçue'); $this->parseXML($content); $this->_deleteNonHarvested(); - $this->getLogger()->info(sprintf('%d formations dans la base', count($this->_albums))); + $this->getLogger()->info($this->_('%d formations dans la base', count($this->_albums))); } diff --git a/library/Class/WebService/OPDS/CatalogEntry.php b/library/Class/WebService/OPDS/CatalogEntry.php index c5c81f621fe..7d2e58860e9 100644 --- a/library/Class/WebService/OPDS/CatalogEntry.php +++ b/library/Class/WebService/OPDS/CatalogEntry.php @@ -16,9 +16,11 @@ * * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_RessourceNumerique { +class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_RessourceNumerique { + use Trait_Translator; + protected $_properties; protected $_isNotice; protected $_files; @@ -35,7 +37,7 @@ class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_R $this->_files = []; } - + public function matchId($other_id) { return $this->getId() === hash('adler32',$other_id); } @@ -103,7 +105,7 @@ class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_R return $this; } - + public function getThumbnail() { return $this->_properties['thumbnail']; } @@ -114,7 +116,7 @@ class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_R return $this; } - + public function getSummary() { return $this->_properties['summary']; } @@ -125,7 +127,7 @@ class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_R return $this; } - + public function getPoster() { return $this->_properties['poster']; } @@ -133,7 +135,7 @@ class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_R public function getEpubFile() { foreach ($this->_files as $file) { - if ($file->getExtension()=='.epub') + if ($file->getExtension()=='.epub') return $file; } return false; @@ -155,7 +157,7 @@ class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_R return $this->_properties[$key]; } - throw new RuntimeException(sprintf('Call to undefined "%s" method', $name)); + throw new RuntimeException($this->_('Call to undefined "%s" method', $name)); } diff --git a/library/Class/WebService/SIGB/Carthame/Service.php b/library/Class/WebService/SIGB/Carthame/Service.php index 625b384add3..f2059a4bf3e 100644 --- a/library/Class/WebService/SIGB/Carthame/Service.php +++ b/library/Class/WebService/SIGB/Carthame/Service.php @@ -144,8 +144,8 @@ class Class_WebService_SIGB_Carthame_Service extends Class_WebService_SIGB_Abstr $reader = Class_WebService_SIGB_Carthame_ReserveInfoResponseReader::read($xml); if (!$reader->isSiteAllowed($code_annexe)) { - return $this->_error(sprintf('Réservation impossible. Autorisée seulement sur %s', - implode(', ' , $reader->getSites()))); + return $this->_error($this->_('Réservation impossible. Autorisée seulement sur %s', + implode(', ' , $reader->getSites()))); } $xml = $this->_callAction('reserveDocument', diff --git a/library/ZendAfi/Controller/Plugin/Manager/Album.php b/library/ZendAfi/Controller/Plugin/Manager/Album.php index c79cbd3c506..aee37130e6f 100644 --- a/library/ZendAfi/Controller/Plugin/Manager/Album.php +++ b/library/ZendAfi/Controller/Plugin/Manager/Album.php @@ -112,8 +112,8 @@ class ZendAfi_Controller_Plugin_Manager_Album extends ZendAfi_Controller_Plugin_ return; } - $this->_view->titre = sprintf('Visualisation de l\'album "%s"', - $album->getTitre()); + $this->_view->titre = $this->_('Visualisation de l\'album "%s"', + $album->getTitre()); $this->_view->album = $album; $this->_view->form = $form; } @@ -125,7 +125,7 @@ class ZendAfi_Controller_Plugin_Manager_Album extends ZendAfi_Controller_Plugin_ return; } - $this->_view->titre = sprintf('Génération des vignettes de l\'album "%s"', + $this->_view->titre = $this->_('Génération des vignettes de l\'album "%s"', $album->getTitre()); $this->_view->album = $album; } diff --git a/library/ZendAfi/Controller/Plugin/Manager/SessionActivity.php b/library/ZendAfi/Controller/Plugin/Manager/SessionActivity.php index 3839f7e47bc..4be82fca450 100644 --- a/library/ZendAfi/Controller/Plugin/Manager/SessionActivity.php +++ b/library/ZendAfi/Controller/Plugin/Manager/SessionActivity.php @@ -42,8 +42,8 @@ class ZendAfi_Controller_Plugin_Manager_SessionActivity extends ZendAfi_Controll parent::addAction(); - $this->_view->titre = sprintf('Nouvelle session de l\'activité "%s"', - $activity->getLibelle()); + $this->_view->titre = $this->_('Nouvelle session de l\'activité "%s"', + $activity->getLibelle()); } diff --git a/library/ZendAfi/View/Helper/Abonne/Multimedia.php b/library/ZendAfi/View/Helper/Abonne/Multimedia.php index cb417dd6abf..fbbe1bf02f6 100644 --- a/library/ZendAfi/View/Helper/Abonne/Multimedia.php +++ b/library/ZendAfi/View/Helper/Abonne/Multimedia.php @@ -36,7 +36,7 @@ class ZendAfi_View_Helper_Abonne_Multimedia extends ZendAfi_View_Helper_Abonne_A null, true), $hold->getLibelleDevice() . ' - ' . $hold->getOs(), strftime('le %d %B %Y à %Hh%M', $hold->getStart()), - sprintf('pour %smn', (($hold->getEnd() - $hold->getStart()) / 60)), + $this->_('pour %smn', (($hold->getEnd() - $hold->getStart()) / 60)), $hold->getLibelleBib()); } diff --git a/library/ZendAfi/View/Helper/CosmoBibPlannif.php b/library/ZendAfi/View/Helper/CosmoBibPlannif.php index b479407921c..89ba12a402f 100644 --- a/library/ZendAfi/View/Helper/CosmoBibPlannif.php +++ b/library/ZendAfi/View/Helper/CosmoBibPlannif.php @@ -20,7 +20,8 @@ */ -class ZendAfi_View_Helper_CosmoBibPlannif extends Zend_View_Helper_Abstract { +class ZendAfi_View_Helper_CosmoBibPlannif extends ZendAfi_View_Helper_BaseHelper { + public function cosmoBibPlannif($bib) { if (!$bib || !$bib->isPlanifConfigured()) return 'Aucune'; @@ -37,9 +38,9 @@ class ZendAfi_View_Helper_CosmoBibPlannif extends Zend_View_Helper_Abstract { 'm' => 'mois', 'a' => 'an']; - return sprintf('%s fois par %s', - $bib->getPlanifFois(), - $mapping[$bib->getPlanifPar()]); + return $this->_('%s fois par %s', + $bib->getPlanifFois(), + $mapping[$bib->getPlanifPar()]); } -- GitLab