var_dev/cache/dev/twig/9c/9cd0f1d75acb0e2bd6ff35fad79b331b.php line 62

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* @WebProfiler/Collector/translation.html.twig */
  16. class __TwigTemplate_1dd440d4dd59da693a72ba174e507a71 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'toolbar' => [$this, 'block_toolbar'],
  29. 'menu' => [$this, 'block_menu'],
  30. 'panel' => [$this, 'block_panel'],
  31. 'messages' => [$this, 'block_messages'],
  32. 'defined_messages' => [$this, 'block_defined_messages'],
  33. 'fallback_messages' => [$this, 'block_fallback_messages'],
  34. 'missing_messages' => [$this, 'block_missing_messages'],
  35. ];
  36. }
  37. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  38. {
  39. // line 1
  40. return "@WebProfiler/Profiler/layout.html.twig";
  41. }
  42. protected function doDisplay(array $context, array $blocks = []): iterable
  43. {
  44. $macros = $this->macros;
  45. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  46. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@WebProfiler/Collector/translation.html.twig"));
  47. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  48. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@WebProfiler/Collector/translation.html.twig"));
  49. // line 3
  50. $macros["helper"] = $this->macros["helper"] = $this;
  51. // line 1
  52. $this->parent = $this->loadTemplate("@WebProfiler/Profiler/layout.html.twig", "@WebProfiler/Collector/translation.html.twig", 1);
  53. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  54. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  55. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  56. }
  57. // line 5
  58. /**
  59. * @return iterable<null|scalar|\Stringable>
  60. */
  61. public function block_toolbar(array $context, array $blocks = []): iterable
  62. {
  63. $macros = $this->macros;
  64. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  65. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "toolbar"));
  66. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  67. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "toolbar"));
  68. // line 6
  69. yield " ";
  70. if (Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 6, $this->source); })()), "messages", [], "any", false, false, false, 6))) {
  71. // line 7
  72. yield " ";
  73. $context["icon"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
  74. // line 8
  75. yield " ";
  76. yield Twig\Extension\CoreExtension::include($this->env, $context, "@WebProfiler/Icon/translation.svg");
  77. yield "
  78. ";
  79. // line 9
  80. $context["status_color"] = ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 9, $this->source); })()), "countMissings", [], "any", false, false, false, 9)) ? ("red") : (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 9, $this->source); })()), "countFallbacks", [], "any", false, false, false, 9)) ? ("yellow") : (""))));
  81. // line 10
  82. yield " ";
  83. $context["error_count"] = (CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 10, $this->source); })()), "countMissings", [], "any", false, false, false, 10) + CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 10, $this->source); })()), "countFallbacks", [], "any", false, false, false, 10));
  84. // line 11
  85. yield " <span class=\"sf-toolbar-value\">";
  86. yield (((isset($context["error_count"]) || array_key_exists("error_count", $context) ? $context["error_count"] : (function () { throw new RuntimeError('Variable "error_count" does not exist.', 11, $this->source); })())) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["error_count"], "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 11, $this->source); })()), "countDefines", [], "any", false, false, false, 11), "html", null, true)));
  87. yield "</span>
  88. ";
  89. yield from [];
  90. })())) ? '' : new Markup($tmp, $this->env->getCharset());
  91. // line 13
  92. yield "
  93. ";
  94. // line 14
  95. $context["text"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
  96. // line 15
  97. yield " <div class=\"sf-toolbar-info-piece\">
  98. <b>Default locale</b>
  99. <span class=\"sf-toolbar-status\">
  100. ";
  101. // line 18
  102. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, ($context["collector"] ?? null), "locale", [], "any", true, true, false, 18)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 18, $this->source); })()), "locale", [], "any", false, false, false, 18), "-")) : ("-")), "html", null, true);
  103. yield "
  104. </span>
  105. </div>
  106. <div class=\"sf-toolbar-info-piece\">
  107. <b>Missing messages</b>
  108. <span class=\"sf-toolbar-status sf-toolbar-status-";
  109. // line 23
  110. yield ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 23, $this->source); })()), "countMissings", [], "any", false, false, false, 23)) ? ("red") : (""));
  111. yield "\">
  112. ";
  113. // line 24
  114. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 24, $this->source); })()), "countMissings", [], "any", false, false, false, 24), "html", null, true);
  115. yield "
  116. </span>
  117. </div>
  118. <div class=\"sf-toolbar-info-piece\">
  119. <b>Fallback messages</b>
  120. <span class=\"sf-toolbar-status sf-toolbar-status-";
  121. // line 30
  122. yield ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 30, $this->source); })()), "countFallbacks", [], "any", false, false, false, 30)) ? ("yellow") : (""));
  123. yield "\">
  124. ";
  125. // line 31
  126. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 31, $this->source); })()), "countFallbacks", [], "any", false, false, false, 31), "html", null, true);
  127. yield "
  128. </span>
  129. </div>
  130. <div class=\"sf-toolbar-info-piece\">
  131. <b>Defined messages</b>
  132. <span class=\"sf-toolbar-status\">";
  133. // line 37
  134. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 37, $this->source); })()), "countDefines", [], "any", false, false, false, 37), "html", null, true);
  135. yield "</span>
  136. </div>
  137. ";
  138. yield from [];
  139. })())) ? '' : new Markup($tmp, $this->env->getCharset());
  140. // line 40
  141. yield "
  142. ";
  143. // line 41
  144. yield Twig\Extension\CoreExtension::include($this->env, $context, "@WebProfiler/Profiler/toolbar_item.html.twig", ["link" => (isset($context["profiler_url"]) || array_key_exists("profiler_url", $context) ? $context["profiler_url"] : (function () { throw new RuntimeError('Variable "profiler_url" does not exist.', 41, $this->source); })()), "status" => (isset($context["status_color"]) || array_key_exists("status_color", $context) ? $context["status_color"] : (function () { throw new RuntimeError('Variable "status_color" does not exist.', 41, $this->source); })())]);
  145. yield "
  146. ";
  147. }
  148. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  149. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  150. yield from [];
  151. }
  152. // line 45
  153. /**
  154. * @return iterable<null|scalar|\Stringable>
  155. */
  156. public function block_menu(array $context, array $blocks = []): iterable
  157. {
  158. $macros = $this->macros;
  159. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  160. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "menu"));
  161. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  162. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "menu"));
  163. // line 46
  164. yield " <span class=\"label label-status-";
  165. yield ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 46, $this->source); })()), "countMissings", [], "any", false, false, false, 46)) ? ("error") : (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 46, $this->source); })()), "countFallbacks", [], "any", false, false, false, 46)) ? ("warning") : (""))));
  166. yield " ";
  167. yield ((Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 46, $this->source); })()), "messages", [], "any", false, false, false, 46))) ? ("disabled") : (""));
  168. yield "\">
  169. <span class=\"icon\">";
  170. // line 47
  171. yield Twig\Extension\CoreExtension::include($this->env, $context, "@WebProfiler/Icon/translation.svg");
  172. yield "</span>
  173. <strong>Translation</strong>
  174. ";
  175. // line 49
  176. if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 49, $this->source); })()), "countMissings", [], "any", false, false, false, 49) || CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 49, $this->source); })()), "countFallbacks", [], "any", false, false, false, 49))) {
  177. // line 50
  178. yield " ";
  179. $context["error_count"] = (CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 50, $this->source); })()), "countMissings", [], "any", false, false, false, 50) + CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 50, $this->source); })()), "countFallbacks", [], "any", false, false, false, 50));
  180. // line 51
  181. yield " <span class=\"count\">
  182. <span>";
  183. // line 52
  184. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["error_count"]) || array_key_exists("error_count", $context) ? $context["error_count"] : (function () { throw new RuntimeError('Variable "error_count" does not exist.', 52, $this->source); })()), "html", null, true);
  185. yield "</span>
  186. </span>
  187. ";
  188. }
  189. // line 55
  190. yield " </span>
  191. ";
  192. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  193. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  194. yield from [];
  195. }
  196. // line 58
  197. /**
  198. * @return iterable<null|scalar|\Stringable>
  199. */
  200. public function block_panel(array $context, array $blocks = []): iterable
  201. {
  202. $macros = $this->macros;
  203. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  204. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "panel"));
  205. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  206. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "panel"));
  207. // line 59
  208. yield " <h2>Translation</h2>
  209. <div class=\"metrics\">
  210. <div class=\"metric\">
  211. <span class=\"value\">";
  212. // line 63
  213. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, ($context["collector"] ?? null), "locale", [], "any", true, true, false, 63)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 63, $this->source); })()), "locale", [], "any", false, false, false, 63), "-")) : ("-")), "html", null, true);
  214. yield "</span>
  215. <span class=\"label\">Default locale</span>
  216. </div>
  217. <div class=\"metric\">
  218. <span class=\"value\">";
  219. // line 67
  220. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::default(Twig\Extension\CoreExtension::join(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 67, $this->source); })()), "fallbackLocales", [], "any", false, false, false, 67), ", "), "-"), "html", null, true);
  221. yield "</span>
  222. <span class=\"label\">Fallback locale";
  223. // line 68
  224. yield (((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 68, $this->source); })()), "fallbackLocales", [], "any", false, false, false, 68)) != 1)) ? ("s") : (""));
  225. yield "</span>
  226. </div>
  227. </div>
  228. <h2>Messages</h2>
  229. ";
  230. // line 74
  231. if (Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 74, $this->source); })()), "messages", [], "any", false, false, false, 74))) {
  232. // line 75
  233. yield " <div class=\"empty\">
  234. <p>No translations have been called.</p>
  235. </div>
  236. ";
  237. } else {
  238. // line 79
  239. yield " ";
  240. yield from $this->unwrap()->yieldBlock('messages', $context, $blocks);
  241. // line 159
  242. yield " ";
  243. }
  244. // line 160
  245. yield "
  246. ";
  247. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  248. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  249. yield from [];
  250. }
  251. // line 79
  252. /**
  253. * @return iterable<null|scalar|\Stringable>
  254. */
  255. public function block_messages(array $context, array $blocks = []): iterable
  256. {
  257. $macros = $this->macros;
  258. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  259. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "messages"));
  260. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  261. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "messages"));
  262. // line 80
  263. yield "
  264. ";
  265. // line 82
  266. yield " ";
  267. [$context["messages_defined"], $context["messages_missing"], $context["messages_fallback"]] = [[], [], []];
  268. // line 83
  269. yield " ";
  270. $context['_parent'] = $context;
  271. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 83, $this->source); })()), "messages", [], "any", false, false, false, 83));
  272. foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  273. // line 84
  274. yield " ";
  275. if ((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "state", [], "any", false, false, false, 84) == Twig\Extension\CoreExtension::constant("Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_DEFINED"))) {
  276. // line 85
  277. yield " ";
  278. $context["messages_defined"] = Twig\Extension\CoreExtension::merge((isset($context["messages_defined"]) || array_key_exists("messages_defined", $context) ? $context["messages_defined"] : (function () { throw new RuntimeError('Variable "messages_defined" does not exist.', 85, $this->source); })()), [$context["message"]]);
  279. // line 86
  280. yield " ";
  281. } elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "state", [], "any", false, false, false, 86) == Twig\Extension\CoreExtension::constant("Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_MISSING"))) {
  282. // line 87
  283. yield " ";
  284. $context["messages_missing"] = Twig\Extension\CoreExtension::merge((isset($context["messages_missing"]) || array_key_exists("messages_missing", $context) ? $context["messages_missing"] : (function () { throw new RuntimeError('Variable "messages_missing" does not exist.', 87, $this->source); })()), [$context["message"]]);
  285. // line 88
  286. yield " ";
  287. } elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "state", [], "any", false, false, false, 88) == Twig\Extension\CoreExtension::constant("Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK"))) {
  288. // line 89
  289. yield " ";
  290. $context["messages_fallback"] = Twig\Extension\CoreExtension::merge((isset($context["messages_fallback"]) || array_key_exists("messages_fallback", $context) ? $context["messages_fallback"] : (function () { throw new RuntimeError('Variable "messages_fallback" does not exist.', 89, $this->source); })()), [$context["message"]]);
  291. // line 90
  292. yield " ";
  293. }
  294. // line 91
  295. yield " ";
  296. }
  297. $_parent = $context['_parent'];
  298. unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
  299. $context = array_intersect_key($context, $_parent) + $_parent;
  300. // line 92
  301. yield "
  302. <div class=\"sf-tabs\">
  303. <div class=\"tab ";
  304. // line 94
  305. yield (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 94, $this->source); })()), "countMissings", [], "any", false, false, false, 94) == 0)) ? ("active") : (""));
  306. yield "\">
  307. <h3 class=\"tab-title\">Defined <span class=\"badge\">";
  308. // line 95
  309. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 95, $this->source); })()), "countDefines", [], "any", false, false, false, 95), "html", null, true);
  310. yield "</span></h3>
  311. <div class=\"tab-content\">
  312. <p class=\"help\">
  313. These messages are correctly translated into the given locale.
  314. </p>
  315. ";
  316. // line 102
  317. if (Twig\Extension\CoreExtension::testEmpty((isset($context["messages_defined"]) || array_key_exists("messages_defined", $context) ? $context["messages_defined"] : (function () { throw new RuntimeError('Variable "messages_defined" does not exist.', 102, $this->source); })()))) {
  318. // line 103
  319. yield " <div class=\"empty\">
  320. <p>None of the used translation messages are defined for the given locale.</p>
  321. </div>
  322. ";
  323. } else {
  324. // line 107
  325. yield " ";
  326. yield from $this->unwrap()->yieldBlock('defined_messages', $context, $blocks);
  327. // line 110
  328. yield " ";
  329. }
  330. // line 111
  331. yield " </div>
  332. </div>
  333. <div class=\"tab\">
  334. <h3 class=\"tab-title\">Fallback <span class=\"badge ";
  335. // line 115
  336. yield ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 115, $this->source); })()), "countFallbacks", [], "any", false, false, false, 115)) ? ("status-warning") : (""));
  337. yield "\">";
  338. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 115, $this->source); })()), "countFallbacks", [], "any", false, false, false, 115), "html", null, true);
  339. yield "</span></h3>
  340. <div class=\"tab-content\">
  341. <p class=\"help\">
  342. These messages are not available for the given locale
  343. but Symfony found them in the fallback locale catalog.
  344. </p>
  345. ";
  346. // line 123
  347. if (Twig\Extension\CoreExtension::testEmpty((isset($context["messages_fallback"]) || array_key_exists("messages_fallback", $context) ? $context["messages_fallback"] : (function () { throw new RuntimeError('Variable "messages_fallback" does not exist.', 123, $this->source); })()))) {
  348. // line 124
  349. yield " <div class=\"empty\">
  350. <p>No fallback translation messages were used.</p>
  351. </div>
  352. ";
  353. } else {
  354. // line 128
  355. yield " ";
  356. yield from $this->unwrap()->yieldBlock('fallback_messages', $context, $blocks);
  357. // line 131
  358. yield " ";
  359. }
  360. // line 132
  361. yield " </div>
  362. </div>
  363. <div class=\"tab ";
  364. // line 135
  365. yield (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 135, $this->source); })()), "countMissings", [], "any", false, false, false, 135) > 0)) ? ("active") : (""));
  366. yield "\">
  367. <h3 class=\"tab-title\">Missing <span class=\"badge ";
  368. // line 136
  369. yield ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 136, $this->source); })()), "countMissings", [], "any", false, false, false, 136)) ? ("status-error") : (""));
  370. yield "\">";
  371. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 136, $this->source); })()), "countMissings", [], "any", false, false, false, 136), "html", null, true);
  372. yield "</span></h3>
  373. <div class=\"tab-content\">
  374. <p class=\"help\">
  375. These messages are not available for the given locale and cannot
  376. be found in the fallback locales. Add them to the translation
  377. catalogue to avoid Symfony outputting untranslated contents.
  378. </p>
  379. ";
  380. // line 145
  381. if (Twig\Extension\CoreExtension::testEmpty((isset($context["messages_missing"]) || array_key_exists("messages_missing", $context) ? $context["messages_missing"] : (function () { throw new RuntimeError('Variable "messages_missing" does not exist.', 145, $this->source); })()))) {
  382. // line 146
  383. yield " <div class=\"empty\">
  384. <p>There are no messages of this category.</p>
  385. </div>
  386. ";
  387. } else {
  388. // line 150
  389. yield " ";
  390. yield from $this->unwrap()->yieldBlock('missing_messages', $context, $blocks);
  391. // line 153
  392. yield " ";
  393. }
  394. // line 154
  395. yield " </div>
  396. </div>
  397. </div>
  398. ";
  399. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  400. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  401. yield from [];
  402. }
  403. // line 107
  404. /**
  405. * @return iterable<null|scalar|\Stringable>
  406. */
  407. public function block_defined_messages(array $context, array $blocks = []): iterable
  408. {
  409. $macros = $this->macros;
  410. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  411. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "defined_messages"));
  412. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  413. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "defined_messages"));
  414. // line 108
  415. yield " ";
  416. yield $macros["helper"]->getTemplateForMacro("macro_render_table", $context, 108, $this->getSourceContext())->macro_render_table(...[(isset($context["messages_defined"]) || array_key_exists("messages_defined", $context) ? $context["messages_defined"] : (function () { throw new RuntimeError('Variable "messages_defined" does not exist.', 108, $this->source); })())]);
  417. yield "
  418. ";
  419. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  420. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  421. yield from [];
  422. }
  423. // line 128
  424. /**
  425. * @return iterable<null|scalar|\Stringable>
  426. */
  427. public function block_fallback_messages(array $context, array $blocks = []): iterable
  428. {
  429. $macros = $this->macros;
  430. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  431. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "fallback_messages"));
  432. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  433. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "fallback_messages"));
  434. // line 129
  435. yield " ";
  436. yield $macros["helper"]->getTemplateForMacro("macro_render_table", $context, 129, $this->getSourceContext())->macro_render_table(...[(isset($context["messages_fallback"]) || array_key_exists("messages_fallback", $context) ? $context["messages_fallback"] : (function () { throw new RuntimeError('Variable "messages_fallback" does not exist.', 129, $this->source); })()), true]);
  437. yield "
  438. ";
  439. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  440. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  441. yield from [];
  442. }
  443. // line 150
  444. /**
  445. * @return iterable<null|scalar|\Stringable>
  446. */
  447. public function block_missing_messages(array $context, array $blocks = []): iterable
  448. {
  449. $macros = $this->macros;
  450. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  451. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "missing_messages"));
  452. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  453. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "missing_messages"));
  454. // line 151
  455. yield " ";
  456. yield $macros["helper"]->getTemplateForMacro("macro_render_table", $context, 151, $this->getSourceContext())->macro_render_table(...[(isset($context["messages_missing"]) || array_key_exists("messages_missing", $context) ? $context["messages_missing"] : (function () { throw new RuntimeError('Variable "messages_missing" does not exist.', 151, $this->source); })())]);
  457. yield "
  458. ";
  459. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  460. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  461. yield from [];
  462. }
  463. // line 163
  464. public function macro_render_table($messages = null, $is_fallback = null, ...$varargs): string|Markup
  465. {
  466. $macros = $this->macros;
  467. $context = [
  468. "messages" => $messages,
  469. "is_fallback" => $is_fallback,
  470. "varargs" => $varargs,
  471. ] + $this->env->getGlobals();
  472. $blocks = [];
  473. return ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
  474. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  475. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "render_table"));
  476. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  477. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "render_table"));
  478. // line 164
  479. yield " <table>
  480. <thead>
  481. <tr>
  482. <th>Locale</th>
  483. ";
  484. // line 168
  485. if ((isset($context["is_fallback"]) || array_key_exists("is_fallback", $context) ? $context["is_fallback"] : (function () { throw new RuntimeError('Variable "is_fallback" does not exist.', 168, $this->source); })())) {
  486. // line 169
  487. yield " <th>Fallback locale</th>
  488. ";
  489. }
  490. // line 171
  491. yield " <th>Domain</th>
  492. <th>Times used</th>
  493. <th>Message ID</th>
  494. <th>Message Preview</th>
  495. </tr>
  496. </thead>
  497. <tbody>
  498. ";
  499. // line 178
  500. $context['_parent'] = $context;
  501. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["messages"]) || array_key_exists("messages", $context) ? $context["messages"] : (function () { throw new RuntimeError('Variable "messages" does not exist.', 178, $this->source); })()));
  502. $context['loop'] = [
  503. 'parent' => $context['_parent'],
  504. 'index0' => 0,
  505. 'index' => 1,
  506. 'first' => true,
  507. ];
  508. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  509. $length = count($context['_seq']);
  510. $context['loop']['revindex0'] = $length - 1;
  511. $context['loop']['revindex'] = $length;
  512. $context['loop']['length'] = $length;
  513. $context['loop']['last'] = 1 === $length;
  514. }
  515. foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  516. // line 179
  517. yield " <tr>
  518. <td class=\"font-normal text-small nowrap\">";
  519. // line 180
  520. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "locale", [], "any", false, false, false, 180), "html", null, true);
  521. yield "</td>
  522. ";
  523. // line 181
  524. if ((isset($context["is_fallback"]) || array_key_exists("is_fallback", $context) ? $context["is_fallback"] : (function () { throw new RuntimeError('Variable "is_fallback" does not exist.', 181, $this->source); })())) {
  525. // line 182
  526. yield " <td class=\"font-normal text-small nowrap\">";
  527. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "fallbackLocale", [], "any", true, true, false, 182)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "fallbackLocale", [], "any", false, false, false, 182), "-")) : ("-")), "html", null, true);
  528. yield "</td>
  529. ";
  530. }
  531. // line 184
  532. yield " <td class=\"font-normal text-small text-bold nowrap\">";
  533. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "domain", [], "any", false, false, false, 184), "html", null, true);
  534. yield "</td>
  535. <td class=\"font-normal text-small nowrap\">";
  536. // line 185
  537. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "count", [], "any", false, false, false, 185), "html", null, true);
  538. yield "</td>
  539. <td>
  540. <span class=\"nowrap\">";
  541. // line 187
  542. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "id", [], "any", false, false, false, 187), "html", null, true);
  543. yield "</span>
  544. ";
  545. // line 189
  546. if ( !(null === CoreExtension::getAttribute($this->env, $this->source, $context["message"], "transChoiceNumber", [], "any", false, false, false, 189))) {
  547. // line 190
  548. yield " <small class=\"newline\">(pluralization is used)</small>
  549. ";
  550. }
  551. // line 192
  552. yield "
  553. ";
  554. // line 193
  555. if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["message"], "parameters", [], "any", false, false, false, 193)) > 0)) {
  556. // line 194
  557. yield " <button class=\"btn-link newline text-small sf-toggle\" data-toggle-selector=\"#parameters-";
  558. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 194), "html", null, true);
  559. yield "\" data-toggle-alt-content=\"Hide parameters\">Show parameters</button>
  560. <div id=\"parameters-";
  561. // line 196
  562. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 196), "html", null, true);
  563. yield "\" class=\"hidden\">
  564. ";
  565. // line 197
  566. $context['_parent'] = $context;
  567. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "parameters", [], "any", false, false, false, 197));
  568. foreach ($context['_seq'] as $context["_key"] => $context["parameters"]) {
  569. // line 198
  570. yield " ";
  571. yield $this->extensions['Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension']->dumpData($this->env, $context["parameters"], 1);
  572. yield "
  573. ";
  574. }
  575. $_parent = $context['_parent'];
  576. unset($context['_seq'], $context['_key'], $context['parameters'], $context['_parent']);
  577. $context = array_intersect_key($context, $_parent) + $_parent;
  578. // line 200
  579. yield " </div>
  580. ";
  581. }
  582. // line 202
  583. yield " </td>
  584. <td class=\"prewrap\">";
  585. // line 203
  586. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "translation", [], "any", false, false, false, 203), "html", null, true);
  587. yield "</td>
  588. </tr>
  589. ";
  590. ++$context['loop']['index0'];
  591. ++$context['loop']['index'];
  592. $context['loop']['first'] = false;
  593. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  594. --$context['loop']['revindex0'];
  595. --$context['loop']['revindex'];
  596. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  597. }
  598. }
  599. $_parent = $context['_parent'];
  600. unset($context['_seq'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
  601. $context = array_intersect_key($context, $_parent) + $_parent;
  602. // line 206
  603. yield " </tbody>
  604. </table>
  605. ";
  606. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  607. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  608. yield from [];
  609. })())) ? '' : new Markup($tmp, $this->env->getCharset());
  610. }
  611. /**
  612. * @codeCoverageIgnore
  613. */
  614. public function getTemplateName(): string
  615. {
  616. return "@WebProfiler/Collector/translation.html.twig";
  617. }
  618. /**
  619. * @codeCoverageIgnore
  620. */
  621. public function isTraitable(): bool
  622. {
  623. return false;
  624. }
  625. /**
  626. * @codeCoverageIgnore
  627. */
  628. public function getDebugInfo(): array
  629. {
  630. return array ( 686 => 206, 669 => 203, 666 => 202, 662 => 200, 653 => 198, 649 => 197, 645 => 196, 639 => 194, 637 => 193, 634 => 192, 630 => 190, 628 => 189, 623 => 187, 618 => 185, 613 => 184, 607 => 182, 605 => 181, 601 => 180, 598 => 179, 581 => 178, 572 => 171, 568 => 169, 566 => 168, 560 => 164, 541 => 163, 527 => 151, 514 => 150, 500 => 129, 487 => 128, 473 => 108, 460 => 107, 445 => 154, 442 => 153, 439 => 150, 433 => 146, 431 => 145, 417 => 136, 413 => 135, 408 => 132, 405 => 131, 402 => 128, 396 => 124, 394 => 123, 381 => 115, 375 => 111, 372 => 110, 369 => 107, 363 => 103, 361 => 102, 351 => 95, 347 => 94, 343 => 92, 337 => 91, 334 => 90, 331 => 89, 328 => 88, 325 => 87, 322 => 86, 319 => 85, 316 => 84, 311 => 83, 308 => 82, 305 => 80, 292 => 79, 280 => 160, 277 => 159, 274 => 79, 268 => 75, 266 => 74, 257 => 68, 253 => 67, 246 => 63, 240 => 59, 227 => 58, 215 => 55, 209 => 52, 206 => 51, 203 => 50, 201 => 49, 196 => 47, 189 => 46, 176 => 45, 162 => 41, 159 => 40, 152 => 37, 143 => 31, 139 => 30, 130 => 24, 126 => 23, 118 => 18, 113 => 15, 111 => 14, 108 => 13, 101 => 11, 98 => 10, 96 => 9, 91 => 8, 88 => 7, 85 => 6, 72 => 5, 61 => 1, 59 => 3, 46 => 1,);
  631. }
  632. public function getSourceContext(): Source
  633. {
  634. return new Source("{% extends '@WebProfiler/Profiler/layout.html.twig' %}
  635. {% import _self as helper %}
  636. {% block toolbar %}
  637. {% if collector.messages|length %}
  638. {% set icon %}
  639. {{ include('@WebProfiler/Icon/translation.svg') }}
  640. {% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' %}
  641. {% set error_count = collector.countMissings + collector.countFallbacks %}
  642. <span class=\"sf-toolbar-value\">{{ error_count ?: collector.countDefines }}</span>
  643. {% endset %}
  644. {% set text %}
  645. <div class=\"sf-toolbar-info-piece\">
  646. <b>Default locale</b>
  647. <span class=\"sf-toolbar-status\">
  648. {{ collector.locale|default('-') }}
  649. </span>
  650. </div>
  651. <div class=\"sf-toolbar-info-piece\">
  652. <b>Missing messages</b>
  653. <span class=\"sf-toolbar-status sf-toolbar-status-{{ collector.countMissings ? 'red' }}\">
  654. {{ collector.countMissings }}
  655. </span>
  656. </div>
  657. <div class=\"sf-toolbar-info-piece\">
  658. <b>Fallback messages</b>
  659. <span class=\"sf-toolbar-status sf-toolbar-status-{{ collector.countFallbacks ? 'yellow' }}\">
  660. {{ collector.countFallbacks }}
  661. </span>
  662. </div>
  663. <div class=\"sf-toolbar-info-piece\">
  664. <b>Defined messages</b>
  665. <span class=\"sf-toolbar-status\">{{ collector.countDefines }}</span>
  666. </div>
  667. {% endset %}
  668. {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
  669. {% endif %}
  670. {% endblock %}
  671. {% block menu %}
  672. <span class=\"label label-status-{{ collector.countMissings ? 'error' : collector.countFallbacks ? 'warning' }} {{ collector.messages is empty ? 'disabled' }}\">
  673. <span class=\"icon\">{{ include('@WebProfiler/Icon/translation.svg') }}</span>
  674. <strong>Translation</strong>
  675. {% if collector.countMissings or collector.countFallbacks %}
  676. {% set error_count = collector.countMissings + collector.countFallbacks %}
  677. <span class=\"count\">
  678. <span>{{ error_count }}</span>
  679. </span>
  680. {% endif %}
  681. </span>
  682. {% endblock %}
  683. {% block panel %}
  684. <h2>Translation</h2>
  685. <div class=\"metrics\">
  686. <div class=\"metric\">
  687. <span class=\"value\">{{ collector.locale|default('-') }}</span>
  688. <span class=\"label\">Default locale</span>
  689. </div>
  690. <div class=\"metric\">
  691. <span class=\"value\">{{ collector.fallbackLocales|join(', ')|default('-') }}</span>
  692. <span class=\"label\">Fallback locale{{ collector.fallbackLocales|length != 1 ? 's' }}</span>
  693. </div>
  694. </div>
  695. <h2>Messages</h2>
  696. {% if collector.messages is empty %}
  697. <div class=\"empty\">
  698. <p>No translations have been called.</p>
  699. </div>
  700. {% else %}
  701. {% block messages %}
  702. {# sort translation messages in groups #}
  703. {% set messages_defined, messages_missing, messages_fallback = [], [], [] %}
  704. {% for message in collector.messages %}
  705. {% if message.state == constant('Symfony\\\\Component\\\\Translation\\\\DataCollectorTranslator::MESSAGE_DEFINED') %}
  706. {% set messages_defined = messages_defined|merge([message]) %}
  707. {% elseif message.state == constant('Symfony\\\\Component\\\\Translation\\\\DataCollectorTranslator::MESSAGE_MISSING') %}
  708. {% set messages_missing = messages_missing|merge([message]) %}
  709. {% elseif message.state == constant('Symfony\\\\Component\\\\Translation\\\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK') %}
  710. {% set messages_fallback = messages_fallback|merge([message]) %}
  711. {% endif %}
  712. {% endfor %}
  713. <div class=\"sf-tabs\">
  714. <div class=\"tab {{ collector.countMissings == 0 ? 'active' }}\">
  715. <h3 class=\"tab-title\">Defined <span class=\"badge\">{{ collector.countDefines }}</span></h3>
  716. <div class=\"tab-content\">
  717. <p class=\"help\">
  718. These messages are correctly translated into the given locale.
  719. </p>
  720. {% if messages_defined is empty %}
  721. <div class=\"empty\">
  722. <p>None of the used translation messages are defined for the given locale.</p>
  723. </div>
  724. {% else %}
  725. {% block defined_messages %}
  726. {{ helper.render_table(messages_defined) }}
  727. {% endblock %}
  728. {% endif %}
  729. </div>
  730. </div>
  731. <div class=\"tab\">
  732. <h3 class=\"tab-title\">Fallback <span class=\"badge {{ collector.countFallbacks ? 'status-warning' }}\">{{ collector.countFallbacks }}</span></h3>
  733. <div class=\"tab-content\">
  734. <p class=\"help\">
  735. These messages are not available for the given locale
  736. but Symfony found them in the fallback locale catalog.
  737. </p>
  738. {% if messages_fallback is empty %}
  739. <div class=\"empty\">
  740. <p>No fallback translation messages were used.</p>
  741. </div>
  742. {% else %}
  743. {% block fallback_messages %}
  744. {{ helper.render_table(messages_fallback, true) }}
  745. {% endblock %}
  746. {% endif %}
  747. </div>
  748. </div>
  749. <div class=\"tab {{ collector.countMissings > 0 ? 'active' }}\">
  750. <h3 class=\"tab-title\">Missing <span class=\"badge {{ collector.countMissings ? 'status-error' }}\">{{ collector.countMissings }}</span></h3>
  751. <div class=\"tab-content\">
  752. <p class=\"help\">
  753. These messages are not available for the given locale and cannot
  754. be found in the fallback locales. Add them to the translation
  755. catalogue to avoid Symfony outputting untranslated contents.
  756. </p>
  757. {% if messages_missing is empty %}
  758. <div class=\"empty\">
  759. <p>There are no messages of this category.</p>
  760. </div>
  761. {% else %}
  762. {% block missing_messages %}
  763. {{ helper.render_table(messages_missing) }}
  764. {% endblock %}
  765. {% endif %}
  766. </div>
  767. </div>
  768. </div>
  769. {% endblock messages %}
  770. {% endif %}
  771. {% endblock %}
  772. {% macro render_table(messages, is_fallback) %}
  773. <table>
  774. <thead>
  775. <tr>
  776. <th>Locale</th>
  777. {% if is_fallback %}
  778. <th>Fallback locale</th>
  779. {% endif %}
  780. <th>Domain</th>
  781. <th>Times used</th>
  782. <th>Message ID</th>
  783. <th>Message Preview</th>
  784. </tr>
  785. </thead>
  786. <tbody>
  787. {% for message in messages %}
  788. <tr>
  789. <td class=\"font-normal text-small nowrap\">{{ message.locale }}</td>
  790. {% if is_fallback %}
  791. <td class=\"font-normal text-small nowrap\">{{ message.fallbackLocale|default('-') }}</td>
  792. {% endif %}
  793. <td class=\"font-normal text-small text-bold nowrap\">{{ message.domain }}</td>
  794. <td class=\"font-normal text-small nowrap\">{{ message.count }}</td>
  795. <td>
  796. <span class=\"nowrap\">{{ message.id }}</span>
  797. {% if message.transChoiceNumber is not null %}
  798. <small class=\"newline\">(pluralization is used)</small>
  799. {% endif %}
  800. {% if message.parameters|length > 0 %}
  801. <button class=\"btn-link newline text-small sf-toggle\" data-toggle-selector=\"#parameters-{{ loop.index }}\" data-toggle-alt-content=\"Hide parameters\">Show parameters</button>
  802. <div id=\"parameters-{{ loop.index }}\" class=\"hidden\">
  803. {% for parameters in message.parameters %}
  804. {{ profiler_dump(parameters, maxDepth=1) }}
  805. {% endfor %}
  806. </div>
  807. {% endif %}
  808. </td>
  809. <td class=\"prewrap\">{{ message.translation }}</td>
  810. </tr>
  811. {% endfor %}
  812. </tbody>
  813. </table>
  814. {% endmacro %}
  815. ", "@WebProfiler/Collector/translation.html.twig", "/Volumes/madi/opt/madi/www/geopos_proj/vendor/symfony/web-profiler-bundle/Resources/views/Collector/translation.html.twig");
  816. }
  817. }