当前位置: 首页>>代码示例>>PHP>>正文


PHP Application::trans方法代码示例

本文整理汇总了PHP中Silex\Application::trans方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::trans方法的具体用法?PHP Application::trans怎么用?PHP Application::trans使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Silex\Application的用法示例。


在下文中一共展示了Application::trans方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: slash

 /**
  * Display admin dashboard page
  *
  * @param  Application $app
  * @param  Request     $request
  * @return Response
  */
 public function slash(Application $app, Request $request)
 {
     switch ($emailStatus = $request->query->get('email')) {
         case 'sent':
             $emailStatus = $app->trans('Mail sent');
             break;
         case 'error':
             $emailStatus = $app->trans('Could not send email');
             break;
     }
     $parameters = ['cache_flushed' => $request->query->get('flush_cache') === 'ok', 'admins' => $app['repo.users']->findAdmins(), 'email_status' => $emailStatus];
     return $app['twig']->render('admin/dashboard.html.twig', $parameters);
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:20,代码来源:Dashboard.php

示例2: saveUserPref

 /**
  *  Save user preferenes
  *
  * @param  Application  $app
  * @param  Request      $request
  * @return JsonResponse
  */
 public function saveUserPref(Application $app, Request $request)
 {
     if (!$request->isXmlHttpRequest()) {
         $app->abort(400);
     }
     $msg = $app->trans('Error while saving preference');
     $prop = $request->request->get('prop');
     $value = $request->request->get('value');
     $success = false;
     if (null !== $prop && null !== $value) {
         $app['manipulator.user']->setUserSetting($app['authentication']->getUser(), $prop, $value);
         $success = true;
         $msg = $app->trans('Preference saved !');
     }
     return new JsonResponse(['success' => $success, 'message' => $msg]);
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:23,代码来源:Preferences.php

示例3: getScheduler

 public function getScheduler(Application $app, Request $request)
 {
     if ($request->getRequestFormat() !== "json") {
         $app->abort(406, 'Only JSON format is accepted.');
     }
     $scheduler = array_replace($app['task-manager.live-information']->getManager(), ['name' => $app->trans('Task Scheduler'), 'urls' => ['start' => $app->path('admin_tasks_scheduler_start'), 'stop' => $app->path('admin_tasks_scheduler_stop'), 'log' => $app->path('admin_tasks_scheduler_log')]]);
     return $app->json($scheduler);
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:8,代码来源:TaskManager.php

示例4: updateSession

 /**
  * Check session state
  *
  * @param  Application  $app
  * @param  Request      $request
  * @return JsonResponse
  */
 public function updateSession(Application $app, Request $request)
 {
     if (!$request->isXmlHttpRequest()) {
         $app->abort(400);
     }
     $ret = ['status' => 'unknown', 'message' => '', 'notifications' => false, 'changed' => []];
     if ($app['authentication']->isAuthenticated()) {
         $usr_id = $app['authentication']->getUser()->getId();
         if ($usr_id != $request->request->get('usr')) {
             // I logged with another user
             $ret['status'] = 'disconnected';
             return $app->json($ret);
         }
     } else {
         $ret['status'] = 'disconnected';
         return $app->json($ret);
     }
     try {
         $app['phraseanet.appbox']->get_connection();
     } catch (\Exception $e) {
         return $app->json($ret);
     }
     if (1 > ($moduleId = (int) $request->request->get('module'))) {
         $ret['message'] = 'Missing or Invalid `module` parameter';
         return $app->json($ret);
     }
     $session = $app['EM']->find('Phraseanet:Session', $app['session']->get('session_id'));
     $session->setUpdated(new \DateTime());
     if (!$session->hasModuleId($moduleId)) {
         $module = new SessionModule();
         $module->setModuleId($moduleId);
         $module->setSession($session);
         $app['EM']->persist($module);
     } else {
         $app['EM']->persist($session->getModuleById($moduleId)->setUpdated(new \DateTime()));
     }
     $app['EM']->persist($session);
     $app['EM']->flush();
     $ret['status'] = 'ok';
     $ret['notifications'] = $app['twig']->render('prod/notifications.html.twig', ['notifications' => $app['events-manager']->get_notifications()]);
     $baskets = $app['EM']->getRepository('Phraseanet:Basket')->findUnreadActiveByUser($app['authentication']->getUser());
     foreach ($baskets as $basket) {
         $ret['changed'][] = $basket->getId();
     }
     if (in_array($app['session']->get('phraseanet.message'), ['1', null])) {
         if ($app['conf']->get(['main', 'maintenance'])) {
             $ret['message'] .= $app->trans('The application is going down for maintenance, please logout.');
         }
         if ($app['conf']->get(['registry', 'maintenance', 'enabled'])) {
             $ret['message'] .= strip_tags($app['conf']->get(['registry', 'maintenance', 'message']));
         }
     }
     return $app->json($ret);
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:61,代码来源:Session.php

示例5: get_story

 /**
  * Return detailed informations about one story
  *
  * @param  Request       $request
  * @param  int           $databox_id
  * @param  int           $story_id
  * @return API_V1_result
  */
 public function get_story(Request $request, $databox_id, $story_id)
 {
     $result = new API_V1_result($this->app, $request, $this);
     $databox = $this->app['phraseanet.appbox']->get_databox($databox_id);
     try {
         $story = $databox->get_record($story_id);
         $result->set_datas(['story' => $this->list_story($story)]);
     } catch (NotFoundHttpException $e) {
         $result->set_error_message(API_V1_result::ERROR_BAD_REQUEST, $this->app->trans('Story Not Found'));
     } catch (\Exception $e) {
         $result->set_error_message(API_V1_result::ERROR_BAD_REQUEST, $this->app->trans('An error occured'));
     }
     return $result;
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:22,代码来源:adapter.php

示例6: displayTermsOfUse

 /**
  * Display database terms of use
  *
  * @param  Application $app
  * @param  Request     $request
  * @return Response
  */
 public function displayTermsOfUse(Application $app, Request $request)
 {
     $toDisplay = $request->query->get('to_display', []);
     $data = [];
     foreach ($app['phraseanet.appbox']->get_databoxes() as $databox) {
         if (count($toDisplay) > 0 && !in_array($databox->get_sbas_id(), $toDisplay)) {
             continue;
         }
         $cgus = $databox->get_cgus();
         if (!isset($cgus[$app['locale']])) {
             continue;
         }
         $data[$databox->get_label($app['locale'])] = $cgus[$app['locale']]['value'];
     }
     return new Response($app['twig']->render('/prod/TOU.html.twig', ['TOUs' => $data, 'local_title' => $app->trans('Terms of use')]));
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:23,代码来源:TOU.php

示例7: getDatabases

 /**
  * Get Databases control panel
  *
  * @param           $app     Application $app
  * @param           $request Request $request
  * @return Response
  */
 public function getDatabases(Application $app, Request $request)
 {
     $sbasIds = array_merge(array_keys($app['acl']->get($app['authentication']->getUser())->get_granted_sbas(['bas_manage'])), array_keys($app['acl']->get($app['authentication']->getUser())->get_granted_sbas(['bas_modify_struct'])));
     $sbas = [];
     foreach ($sbasIds as $sbasId) {
         $sbas[$sbasId] = ['version' => 'unknown', 'image' => '/skins/icons/db-remove.png', 'server_info' => '', 'name' => $app->trans('Unreachable server')];
         try {
             $databox = $app['phraseanet.appbox']->get_databox($sbasId);
             $sbas[$sbasId] = ['version' => $databox->get_version(), 'image' => '/skins/icons/foldph20close_0.gif', 'server_info' => $databox->get_connection()->getWrappedConnection()->getAttribute(\PDO::ATTR_SERVER_VERSION), 'name' => \phrasea::sbas_labels($sbasId, $app)];
         } catch (\Exception $e) {
         }
     }
     switch ($errorMsg = $request->query->get('error')) {
         case 'scheduler-started':
             $errorMsg = $app->trans('Veuillez arreter le planificateur avant la mise a jour');
             break;
         case 'already-started':
             $errorMsg = $app->trans('The upgrade is already started');
             break;
         case 'unknow':
             $errorMsg = $app->trans('An error occured');
             break;
         case 'bad-email':
             $errorMsg = $app->trans('Please fix the database before starting');
             break;
         case 'special-chars':
             $errorMsg = $app->trans('Database name can not contains special characters');
             break;
         case 'base-failed':
             $errorMsg = $app->trans('Base could not be created');
             break;
         case 'database-failed':
             $errorMsg = $app->trans('Database does not exists or can not be accessed');
             break;
         case 'no-empty':
             $errorMsg = $app->trans('Database can not be empty');
             break;
         case 'mount-failed':
             $errorMsg = $app->trans('Database could not be mounted');
             break;
     }
     $upgrader = new \Setup_Upgrade($app);
     return $app['twig']->render('admin/databases.html.twig', ['files' => new \DirectoryIterator($app['root.path'] . '/lib/conf.d/data_templates'), 'sbas' => $sbas, 'error_msg' => $errorMsg, 'recommendations' => $upgrader->getRecommendations(), 'advices' => $request->query->get('advices', []), 'reloadTree' => (bool) $request->query->get('reload-tree')]);
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:51,代码来源:Databoxes.php

示例8: doSearchCandidate

 private function doSearchCandidate(Application $app, $bid, $pid, $t, $k, $piv)
 {
     $ret = new \DOMDocument("1.0", "UTF-8");
     $ret->standalone = true;
     $ret->preserveWhiteSpace = false;
     $root = $ret->appendChild($ret->createElement("result"));
     $root->appendChild($ret->createCDATASection(var_export(["bid" => $bid, "pid" => $pid, "t" => $t, "k" => $k, "piv" => $piv], true)));
     $ctlist = $root->appendChild($ret->createElement("candidates_list"));
     try {
         $databox = $app['phraseanet.appbox']->get_databox((int) $bid);
         $domstruct = $databox->get_dom_structure();
         $domth = $databox->get_dom_thesaurus();
         $domct = $databox->get_dom_cterms();
         if ($domstruct && $domth && $domct) {
             $xpathth = new \DOMXPath($domth);
             $xpathct = new \DOMXPath($domct);
             // on cherche les champs d'ou peut provenir un candidat, en fct de l'endroit oe on veut inserer le nouveau terme
             $fields = array();
             $xpathstruct = new \DOMXPath($domstruct);
             $nodes = $xpathstruct->query("/record/description/*[@tbranch]");
             for ($i = 0; $i < $nodes->length; $i++) {
                 $fieldname = $nodes->item($i)->nodeName;
                 $tbranch = $nodes->item($i)->getAttribute("tbranch");
                 if ($pid != "") {
                     $q = "(" . $tbranch . ")/descendant-or-self::te[@id='" . $pid . "']";
                 } else {
                     $q = "(" . $tbranch . ")/descendant-or-self::te[not(@id)]";
                 }
                 $fields[$fieldname] = ["name" => $fieldname, "tbranch" => $tbranch, "cid" => null, "sourceok" => false];
                 if (!$tbranch) {
                     continue;
                 }
                 $l = $xpathth->query($q)->length;
                 if ($l > 0) {
                     // le pt d'insertion du nvo terme se trouve dans la tbranch du champ,
                     // donc ce champ peut etre source de candidats
                     $fields[$fieldname]["sourceok"] = true;
                 } else {
                     // le pt d'insertion du nvo terme ne se trouve PAS dans la tbranch du champ,
                     // donc ce champ ne peut pas etre source de candidats
                 }
             }
             // on considere que la source 'deleted' est toujours valide
             $fields["[deleted]"] = ["name" => $app->trans('thesaurus:: corbeille'), "tbranch" => null, "cid" => null, "sourceok" => true];
             if (count($fields) > 0) {
                 $q = "@w='" . \thesaurus::xquery_escape($app['unicode']->remove_indexer_chars($t)) . "'";
                 if ($k) {
                     if ($k != "*") {
                         $q .= " and @k='" . \thesaurus::xquery_escape($app['unicode']->remove_indexer_chars($k)) . "'";
                     }
                 } else {
                     $q .= " and not(@k)";
                 }
                 $q = "/cterms//te[./sy[{$q}]]";
                 $nodes = $xpathct->query($q);
                 // le terme peut etre present dans plusieurs candidats
                 for ($i = 0; $i < $nodes->length; $i++) {
                     // on a trouve le terme dans les candidats, mais en provenance de quel champ ?.. on remonte au champ candidat
                     for ($n = $nodes->item($i)->parentNode; $n && $n->parentNode && $n->parentNode->nodeName != "cterms"; $n = $n->parentNode) {
                     }
                     if ($n && array_key_exists($f = $n->getAttribute("field"), $fields)) {
                         $fields[$f]["cid"] = $nodes->item($i)->getAttribute("id");
                     }
                 }
             }
             foreach ($fields as $kfield => $field) {
                 if ($field["cid"] === null) {
                     continue;
                 }
                 $ct = $ctlist->appendChild($ret->createElement("ct"));
                 $ct->setAttribute("field", $field["name"]);
                 $ct->setAttribute("sourceok", $field["sourceok"] ? "1" : "0");
                 if ($field["cid"] !== null) {
                     $ct->setAttribute("id", $field["cid"]);
                 }
             }
         }
     } catch (\Exception $e) {
     }
     return $ret;
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:81,代码来源:Thesaurus.php

示例9: progressBarInfos

 /**
  * Get number of indexed items for a databox
  *
  * @param  Application  $app        The silex application
  * @param  Request      $request    The current HTTP request
  * @param  integer      $databox_id The requested databox
  * @return JsonResponse
  */
 public function progressBarInfos(Application $app, Request $request, $databox_id)
 {
     if (!$app['request']->isXmlHttpRequest() || 'json' !== $app['request']->getRequestFormat()) {
         $app->abort(400, $app->trans('Bad request format, only JSON is allowed'));
     }
     $app['phraseanet.appbox'] = $app['phraseanet.appbox'];
     $ret = ['success' => false, 'msg' => $app->trans('An error occured'), 'sbas_id' => null, 'indexable' => false, 'records' => 0, 'xml_indexed' => 0, 'thesaurus_indexed' => 0, 'viewname' => null, 'printLogoURL' => null];
     try {
         $databox = $app['phraseanet.appbox']->get_databox($databox_id);
         $datas = $databox->get_indexed_record_amount();
         $ret['indexable'] = $app['phraseanet.appbox']->is_databox_indexable($databox);
         $ret['viewname'] = $databox->get_dbname() == $databox->get_viewname() ? $app->trans('admin::base: aucun alias') : $databox->get_viewname();
         $ret['records'] = $databox->get_record_amount();
         $ret['sbas_id'] = $databox_id;
         $ret['xml_indexed'] = $datas['xml_indexed'];
         $ret['thesaurus_indexed'] = $datas['thesaurus_indexed'];
         $ret['jeton_subdef'] = $datas['jeton_subdef'];
         if ($app['filesystem']->exists($app['root.path'] . '/config/minilogos/logopdf_' . $databox_id . '.jpg')) {
             $ret['printLogoURL'] = '/custom/minilogos/logopdf_' . $databox_id . '.jpg';
         }
         $ret['success'] = true;
         $ret['msg'] = $app->trans('Successful update');
     } catch (\Exception $e) {
     }
     return $app->json($ret);
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:34,代码来源:Databox.php

示例10: unshareWithUser

 public function unshareWithUser(Application $app, $list_id, $usr_id)
 {
     try {
         $repository = $app['EM']->getRepository('Phraseanet:UsrList');
         $list = $repository->findUserListByUserAndId($app['authentication']->getUser(), $list_id);
         /* @var $list UsrList */
         if ($list->getOwner($app['authentication']->getUser())->getRole() < UsrListOwner::ROLE_ADMIN) {
             throw new \Exception($app->trans('You are not authorized to do this'));
         }
         $owners_repository = $app['EM']->getRepository('Phraseanet:UsrListOwner');
         $owner = $owners_repository->findByListAndUsrId($list, $usr_id);
         $app['EM']->remove($owner);
         $app['EM']->flush();
         $datas = ['success' => true, 'message' => $app->trans('Owner removed from list')];
     } catch (ControllerException $e) {
         $datas = ['success' => false, 'message' => $e->getMessage()];
     } catch (\Exception $e) {
         $datas = ['success' => false, 'message' => $app->trans('Unable to remove usr from list')];
     }
     return $app->json($datas);
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:21,代码来源:UsrLists.php

示例11: stealElements

 public function stealElements(Application $app, Request $request, BasketEntity $basket)
 {
     $n = 0;
     foreach ($request->request->get('elements') as $bask_element_id) {
         try {
             $basket_element = $app['repo.basket-elements']->findUserElement($bask_element_id, $app['authentication']->getUser());
         } catch (\Exception $e) {
             continue;
         }
         $basket_element->getBasket()->removeElement($basket_element);
         $basket_element->setBasket($basket);
         $basket->addElement($basket_element);
         $n++;
     }
     $app['EM']->flush();
     $data = ['success' => true, 'message' => $app->trans('%quantity% records moved', ['%quantity%' => $n])];
     if ($request->getRequestFormat() === 'json') {
         return $app->json($data);
     } else {
         return $app->redirectPath('prod_workzone_show');
     }
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:22,代码来源:BasketController.php

示例12: labels

 public function labels(Application $app, Request $request, $bas_id)
 {
     if (null === ($labels = $request->request->get('labels'))) {
         $app->abort(400, $app->trans('Missing labels parameter'));
     }
     if (false === is_array($labels)) {
         $app->abort(400, $app->trans('Invalid labels parameter'));
     }
     $collection = \collection::get_from_base_id($app, $bas_id);
     $success = true;
     try {
         foreach ($app['locales.available'] as $code => $language) {
             if (!isset($labels[$code])) {
                 continue;
             }
             $value = $labels[$code] ?: null;
             $collection->set_label($code, $value);
         }
     } catch (\Exception $e) {
         $success = false;
     }
     if ('json' === $app['request']->getRequestFormat()) {
         return $app->json(['success' => $success, 'msg' => $success ? $app->trans('Successful update') : $app->trans('An error occured')]);
     }
     return $app->redirectPath('admin_display_collection', ['bas_id' => $collection->get_base_id(), 'success' => (int) $success, 'reload-tree' => 1]);
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:26,代码来源:Collection.php

示例13: doReport

 /**
  * Set Report configuration according to request parameters
  *
  * @param  Application    $app     An application instance
  * @param  Request        $request A request instance
  * @param  \module_report $report  A report instance
  * @param  Array          $conf    A report column configuration
  * @param  Boolean        $what    Whether to group on a particular field or not
  * @return Array
  */
 private function doReport(Application $app, Request $request, \module_report $report, $conf, $what = false)
 {
     if ($app['conf']->get(['registry', 'modules', 'anonymous-report']) == true) {
         if (isset($conf['user'])) {
             unset($conf['user']);
         }
         if (isset($conf['ip'])) {
             unset($conf['ip']);
         }
     }
     //save initial conf
     $base_conf = $conf;
     //format conf according user preferences
     if ('' !== ($columnsList = $request->request->get('list_column', ''))) {
         $new_conf = $conf;
         $columns = explode(',', $columnsList);
         foreach (array_keys($conf) as $col) {
             if (!in_array($col, $columns)) {
                 unset($new_conf[$col]);
             }
         }
         $conf = $new_conf;
     }
     //display content of a table column when user click on it
     if ($request->request->get('conf') == 'on') {
         return $app->json(['liste' => $app['twig']->render('report/listColumn.html.twig', ['conf' => $base_conf]), 'title' => $app->trans('configuration')]);
     }
     //set order
     if ('' !== ($order = $request->request->get('order', '')) && '' !== ($field = $request->request->get('champ', ''))) {
         $report->setOrder($field, $order);
     }
     //work on filters
     $mapColumnTitleToSqlField = $report->getTransQueryString();
     $currentfilter = [];
     if ('' !== ($serializedFilter = $request->request->get('liste_filter', ''))) {
         $currentfilter = @unserialize(urldecode($serializedFilter));
     }
     $filter = new \module_report_filter($app, $currentfilter, $mapColumnTitleToSqlField);
     if ('' !== ($filterColumn = $request->request->get('filter_column', ''))) {
         $field = current(explode(' ', $filterColumn));
         $value = $request->request->get('filter_value', '');
         if ($request->request->get('liste') == 'on') {
             return $app->json(['diag' => $app['twig']->render('report/colFilter.html.twig', ['result' => $report->colFilter($field), 'field' => $field]), 'title' => $app->trans('filtrer les resultats sur la colonne %colonne%', ['%colonne%' => $field])]);
         }
         if ($field === $value) {
             $filter->removeFilter($field);
         } else {
             $filter->addFilter($field, '=', $value);
         }
     }
     //set new request filter if user asking for them
     if ($request->request->get('precise') == 1) {
         $filter->addFilter('xml', 'LIKE', $request->request->get('word', ''));
     } elseif ($request->request->get('precise') == 2) {
         $filter->addFilter('record_id', '=', $request->request->get('word', ''));
     }
     //set filters to current report
     $report->setFilter($filter->getTabFilter());
     $report->setActiveColumn($filter->getActiveColumn());
     $report->setPostingFilter($filter->getPostingFilter());
     // display a new arraywhere results are group
     if ('' !== ($groupby = $request->request->get('groupby', ''))) {
         $report->setConfig(false);
         $groupby = current(explode(' ', $groupby));
         $reportArray = $report->buildReport(false, $groupby);
         if (count($reportArray['allChamps']) > 0 && count($reportArray['display']) > 0) {
             $groupField = isset($reportArray['display'][$reportArray['allChamps'][0]]['title']) ? $reportArray['display'][$reportArray['allChamps'][0]]['title'] : '';
         } else {
             $groupField = isset($conf[strtolower($groupby)]['title']) ? $conf[strtolower($groupby)]['title'] : '';
         }
         return $app->json(['rs' => $app['twig']->render('report/ajax_data_content.html.twig', ['result' => isset($reportArray['report']) ? $reportArray['report'] : $reportArray, 'is_infouser' => false, 'is_nav' => false, 'is_groupby' => true, 'is_plot' => false, 'is_doc' => false]), 'display_nav' => false, 'title' => $app->trans('Groupement des resultats sur le champ %name%', ['%name%' => $groupField])]);
     }
     //set Limit
     if ($report->getEnableLimit() && '' !== ($page = $request->request->get('page', '')) && '' !== ($limit = $request->request->get('limit', ''))) {
         $report->setLimit($page, $limit);
     } else {
         $report->setLimit(false, false);
     }
     //time to build our report
     if (false === $what) {
         $reportArray = $report->buildReport($conf);
     } else {
         $reportArray = $report->buildReport($conf, $what, $request->request->get('tbl', false));
     }
     return $reportArray;
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:96,代码来源:Root.php

示例14: connect

 public function connect(Application $app)
 {
     $app['controller.prod.language'] = $this;
     $controller = $app['controllers_factory'];
     $controller->get("/", function (Application $app) {
         $out = [];
         $out['thesaurusBasesChanged'] = $app->trans('prod::recherche: Attention : la liste des bases selectionnees pour la recherche a ete changee.');
         $out['confirmDel'] = $app->trans('paniers::Vous etes sur le point de supprimer ce panier. Cette action est irreversible. Souhaitez-vous continuer ?');
         $out['serverError'] = $app->trans('phraseanet::erreur: Une erreur est survenue, si ce probleme persiste, contactez le support technique');
         $out['serverName'] = $app['conf']->get('servername');
         $out['serverTimeout'] = $app->trans('phraseanet::erreur: La connection au serveur Phraseanet semble etre indisponible');
         $out['serverDisconnected'] = $app->trans('phraseanet::erreur: Votre session est fermee, veuillez vous re-authentifier');
         $out['hideMessage'] = $app->trans('phraseanet::Ne plus afficher ce message');
         $out['confirmGroup'] = $app->trans('Supprimer egalement les documents rattaches a ces regroupements');
         $out['confirmDelete'] = $app->trans('reponses:: Ces enregistrements vont etre definitivement supprimes et ne pourront etre recuperes. Etes vous sur ?');
         $out['cancel'] = $app->trans('boutton::annuler');
         $out['deleteTitle'] = $app->trans('boutton::supprimer');
         $out['deleteRecords'] = $app->trans('Delete records');
         $out['edit_hetero'] = $app->trans('prod::editing valeurs heterogenes, choisir \'remplacer\', \'ajouter\' ou \'annuler\'');
         $out['confirm_abandon'] = $app->trans('prod::editing::annulation: abandonner les modification ?');
         $out['loading'] = $app->trans('phraseanet::chargement');
         $out['valider'] = $app->trans('boutton::valider');
         $out['annuler'] = $app->trans('boutton::annuler');
         $out['create'] = $app->trans('boutton::creer');
         $out['rechercher'] = $app->trans('boutton::rechercher');
         $out['renewRss'] = $app->trans('boutton::renouveller');
         $out['candeletesome'] = $app->trans('Vous n\'avez pas les droits pour supprimer certains documents');
         $out['candeletedocuments'] = $app->trans('Vous n\'avez pas les droits pour supprimer ces documents');
         $out['needTitle'] = $app->trans('Vous devez donner un titre');
         $out['newPreset'] = $app->trans('Nouveau modele');
         $out['fermer'] = $app->trans('boutton::fermer');
         $out['feed_require_fields'] = $app->trans('Vous n\'avez pas rempli tous les champ requis');
         $out['feed_require_feed'] = $app->trans('Vous n\'avez pas selectionne de fil de publication');
         $out['removeTitle'] = $app->trans('panier::Supression d\'un element d\'un reportage');
         $out['confirmRemoveReg'] = $app->trans('panier::Attention, vous etes sur le point de supprimer un element du reportage. Merci de confirmer votre action.');
         $out['advsearch_title'] = $app->trans('phraseanet::recherche avancee');
         $out['bask_rename'] = $app->trans('panier:: renommer le panier');
         $out['reg_wrong_sbas'] = $app->trans('panier:: Un reportage ne peux recevoir que des elements provenants de la base ou il est enregistre');
         $out['error'] = $app->trans('phraseanet:: Erreur');
         $out['warningDenyCgus'] = $app->trans('cgus :: Attention, si vous refuser les CGUs de cette base, vous n\'y aures plus acces');
         $out['cgusRelog'] = $app->trans('cgus :: Vous devez vous reauthentifier pour que vos parametres soient pris en compte.');
         $out['editDelMulti'] = $app->trans('edit:: Supprimer %s du champ dans les records selectionnes');
         $out['editAddMulti'] = $app->trans('edit:: Ajouter %s au champ courrant pour les records selectionnes');
         $out['editDelSimple'] = $app->trans('edit:: Supprimer %s du champ courrant');
         $out['editAddSimple'] = $app->trans('edit:: Ajouter %s au champ courrant');
         $out['cantDeletePublicOne'] = $app->trans('panier:: vous ne pouvez pas supprimer un panier public');
         $out['wrongsbas'] = $app->trans('panier:: Un reportage ne peux recevoir que des elements provenants de la base ou il est enregistre');
         $out['max_record_selected'] = $app->trans('Vous ne pouvez pas selectionner plus de 800 enregistrements');
         $out['confirmRedirectAuth'] = $app->trans('invite:: Redirection vers la zone d\'authentification, cliquez sur OK pour continuer ou annulez');
         $out['error_test_publi'] = $app->trans('Erreur : soit les parametres sont incorrects, soit le serveur distant ne repond pas');
         $out['test_publi_ok'] = $app->trans('Les parametres sont corrects, le serveur distant est operationnel');
         $out['some_not_published'] = $app->trans('Certaines publications n\'ont pu etre effectuees, verifiez vos parametres');
         $out['error_not_published'] = $app->trans('Aucune publication effectuee, verifiez vos parametres');
         $out['warning_delete_publi'] = $app->trans('Attention, en supprimant ce preregalge, vous ne pourrez plus modifier ou supprimer de publications prealablement effectues avec celui-ci');
         $out['some_required_fields'] = $app->trans('edit::certains documents possedent des champs requis non remplis. Merci de les remplir pour valider votre editing');
         $out['nodocselected'] = $app->trans('Aucun document selectionne');
         $out['sureToRemoveList'] = $app->trans('Are you sure you want to delete this list ?');
         $out['newListName'] = $app->trans('New list name ?');
         $out['listNameCannotBeEmpty'] = $app->trans('List name can not be empty');
         $out['FeedBackName'] = $app->trans('Name');
         $out['FeedBackMessage'] = $app->trans('Message');
         $out['FeedBackDuration'] = $app->trans('Time for feedback (days)');
         $out['FeedBackNameMandatory'] = $app->trans('Please provide a name for this selection.');
         $out['send'] = $app->trans('Send');
         $out['Recept'] = $app->trans('Accuse de reception');
         $out['nFieldsChanged'] = $app->trans('%d fields have been updated');
         $out['FeedBackNoUsersSelected'] = $app->trans('No users selected');
         $out['errorFileApi'] = $app->trans('An error occurred reading this file');
         $out['errorFileApiTooBig'] = $app->trans('This file is too big');
         $out['selectOneRecord'] = $app->trans('Please select one record');
         $out['onlyOneRecord'] = $app->trans('You can choose only one record');
         $out['errorAjaxRequest'] = $app->trans('An error occured, please retry');
         $out['fileBeingDownloaded'] = $app->trans('Some files are being downloaded');
         $out['warning'] = $app->trans('Attention');
         $out['browserFeatureSupport'] = $app->trans('This feature is not supported by your browser');
         $out['noActiveBasket'] = $app->trans('No active basket');
         $out['pushUserCanDownload'] = $app->trans('User can download HD');
         $out['feedbackCanContribute'] = $app->trans('User contribute to the feedback');
         $out['feedbackCanSeeOthers'] = $app->trans('User can see others choices');
         $out['forceSendDocument'] = $app->trans('Force sending of the document ?');
         $out['export'] = $app->trans('Export');
         $out['share'] = $app->trans('Share');
         $out['move'] = $app->trans('Move');
         $out['push'] = $app->trans('Push');
         $out['feedback'] = $app->trans('Feedback');
         $out['toolbox'] = $app->trans('Tool box');
         $out['print'] = $app->trans('Print');
         $out['attention'] = $app->trans('Attention !');
         return $app->json($out);
     });
     return $controller;
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:92,代码来源:Language.php

示例15: getClientLanguage

 /**
  * Gets client language
  *
  * @param  Application  $app
  * @param  Request      $request
  * @return JsonResponse
  */
 public function getClientLanguage(Application $app, Request $request)
 {
     $out = [];
     $out['createWinInvite'] = $app->trans('paniers:: Quel nom souhaitez vous donner a votre panier ?');
     $out['chuNameEmpty'] = $app->trans('paniers:: Quel nom souhaitez vous donner a votre panier ?');
     $out['noDLok'] = $app->trans('export:: aucun document n\'est disponible au telechargement');
     $out['confirmRedirectAuth'] = $app->trans('invite:: Redirection vers la zone d\'authentification, cliquez sur OK pour continuer ou annulez');
     $out['serverName'] = $app['conf']->get('servername');
     $out['serverError'] = $app->trans('phraseanet::erreur: Une erreur est survenue, si ce probleme persiste, contactez le support technique');
     $out['serverTimeout'] = $app->trans('phraseanet::erreur: La connection au serveur Phraseanet semble etre indisponible');
     $out['serverDisconnected'] = $app->trans('phraseanet::erreur: Votre session est fermee, veuillez vous re-authentifier');
     $out['confirmDelBasket'] = $app->trans('paniers::Vous etes sur le point de supprimer ce panier. Cette action est irreversible. Souhaitez-vous continuer ?');
     $out['annuler'] = $app->trans('boutton::annuler');
     $out['fermer'] = $app->trans('boutton::fermer');
     $out['renewRss'] = $app->trans('boutton::renouveller');
     $out['print'] = $app->trans('Print');
     $out['no_basket'] = $app->trans('Please create a basket before adding an element');
     return $app->json($out);
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:26,代码来源:Root.php


注:本文中的Silex\Application::trans方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。