diff --git a/application/modules/admin/controllers/ActivityController.php b/application/modules/admin/controllers/ActivityController.php index c014530efc55d1d6347adf5865dd78e132861124..f155142e8af8ff85cb81e498c549c9448149274a 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 0d865522d9a4b58996bd98eb13e417ffedba7b6d..c1410b891f700eacc30874714a0b2cefbd8c24d9 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 c1ae07eb98f647d9cd5aa4cc72c101f6760733c9..015f20d792af533b4bae05a03802c4793222e35e 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 c6e1ad5f2a575f137fe7db12a306c1741d8857bf..9ed0b166c863de413982b96c810bdffd671736aa 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 48e1c4d7a47356bd05d1dc0762541d64b6f1aa1d..7d615f2cb3d262e9d178bf133a892a26cb5e9704 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 1e985c10da2a773ad104bf8e95a47b5f2d146bb3..132325859962c28c5c9ec5ba697e5a013c0d687c 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 db1029ad624febc1e5c08d7598abab64de6fa009..9a4835d46be7915e17d8317306bd94229666b01f 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 c2899626561fe3fb34480b3816971f3821c652f9..2b1ce288cd56ae8944cc66e017044162c2a97f92 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 4221704f99d0690f8404e6dd45fdacd437dceb44..6c413275a27accc617f96061942bbeeccdefcf45 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 a84cffdd9a088666ac8f50e6719dc0f2196aa690..fd6c6f7bd52c844015d0fa6eaf46d1702769b97e 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 f5b71a52083ee76579afa1f19b0eb9cac73c616d..478a6d49f4b7c8d1420d8e7614a95809f6ed0650 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 63f6de14d9c41583ffc30515ff796c7b4a4f0034..f5c6b5a9d92d34ec13da5cdff683b12709f2b51e 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 246458025a588e315b37ea305d293a85aaffe715..e44fb3a598febd04215fa1504cbfd0542d87bcaf 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 a1de945fac3a970802fff1e78a390a2bd5d20fce..f661849048741a29ce5556afda6ee6afa119b57c 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 cdd5c661a96da5e3e7cda986a3a890461596a1e7..81e0adc2f1c60f4b4dca8a0ba557b0c2ffa1e420 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 1c361717eda9e0238e34677cfe5fbc4b2b27555a..8b8392f7adbe010ca18d5babfc0539035743825f 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 b6c05fd153ead50804b373655dddd4c8dba597a3..13e03624c49f735407794b973cfea6967de2c80e 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 79b5aeb832615c28d8fd23d5e2d57039f3fb05be..220fd27586865396558005ad19e1294241f42b31 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 c12fc82e6e8350654534da50742178e306a0242a..cb820e0887ec0a051bb34e16310dff142bc77c95 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 c5c81f621fe964eeb0d6c4328ab84096ee3d34f2..7d2e58860e973114e9cc5f09bc76f4bd82e59058 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 625b384add3b07ebdd4e6f1a1d81045020a058d4..f2059a4bf3ef28ed2dd46969cee999e25deea8bf 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 c79cbd3c506df32fa5fee881634bc3ad4d4e2f16..aee37130e6fa2015d46c499581554a851bb3bb3f 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 3839f7e47bcf4fa94fe65438a50bd673eb0fae98..4be82fca450badf2fead87f902743cc17242a0ae 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 cb417dd6abf9474d017147d0d0ffb7191b9b09b8..fbbe1bf02f6b6ccf58e5f61d8abe5edb378a6b48 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 b479407921ccfba6727073f1933e728882a7b9d6..89ba12a402fc68749ab207e02f8c54c24eae9617 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()]); }