You are here

translations.html.twig in Devel 8.3

{% block toolbar %}
    {% set icon %}
    <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: "translations"}) }}"
       title="{{ 'Translations'|t }}">
        <img height="28" alt="{{ 'Translations'|t }}"
             src="data:image/png;base64,{{ collector.icon }}"/>
        <span class="sf-toolbar-status">{{ collector.untranslatedCount }}</span>
    </a>
    {% endset %}
    {% set text %}
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Translated'|t }}</b>
        <span>{{ collector.translatedCount }}</span>
    </div>
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Untranslated'|t }}</b>
        <span>{{ collector.untranslatedCount }}</span>
    </div>
    {% endset %}

    <div class="sf-toolbar-block">
        <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
        <div class="sf-toolbar-info">{{ text|default('') }}</div>
    </div>
{% endblock %}

{% block panel %}
    <script id="translations" type="text/template">
        <h2 class="panel__title">{{ 'Translations'|t }}</h2>
        <div class="tabs">
            <input class="tabs__radio" type="radio" id="translated" name="tabs" checked/>
            <input class="tabs__radio" type="radio" id="untranslated" name="tabs"/>
            <ul class="tabs__tabs list--inline">
                <li><label class="tabs__label" for="translated">{{ 'Translated'|t }}</label></li>
                <li><label class="tabs__label" for="untranslated">{{ 'Unranslated'|t }}</label></li>
            </ul>

            <div class="tabs__panels">
                <div class="tabs__panel">
                    <div class="panel__container">
                        <table class="table--duo">
                            <thead>
                            <tr>
                                <th>{{ 'Original'|t }}</th>
                                <th>{{ 'Tanslation'|t }}</th>
                                <th>{{ 'Action'|t }}</th>
                            </tr>
                            </thead>
                            <tbody>
                            <% _.each( data.translations.translated, function( value, key ){ %>
                            <tr>
                                <td><%= key %></td>
                                <td><%= value %></td>
                                <td><a href="<%- data.user_interface_translations_path %>?string=<%- key%>" target="_blank" class="h--word-intact">{{ 'Edit'|t }}</a></td>
                            </tr>
                            <% }); %>
                            </tbody>
                        </table>
                    </div>
                </div>

                <div class="tabs__panel">
                    <div class="panel__container">
                        <table class="table--duo">
                            <thead>
                            <tr>
                                <th>{{ 'Original'|t }}</th>
                                <th>{{ 'Action'|t }}</th>
                            </tr>
                            </thead>
                            <tbody>
                            <% _.each( data.translations.untranslated, function( value, key ){ %>
                            <tr>
                                <td><%= key %></td>
                                <td><a href="<%- data.user_interface_translations_path %>?string=<%- key%>" target="_blank" class="h--word-intact">{{ 'Edit'|t }}</a></td>
                            </tr>
                            <% }); %>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </script>
{% endblock %}

File

webprofiler/templates/Collector/translations.html.twig
View source
  1. {% block toolbar %}
  2. {% set icon %}
  3. <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: "translations"}) }}"
  4. title="{{ 'Translations'|t }}">
  5. <img height="28" alt="{{ 'Translations'|t }}"
  6. src="data:image/png;base64,{{ collector.icon }}"/>
  7. <span class="sf-toolbar-status">{{ collector.untranslatedCount }}</span>
  8. </a>
  9. {% endset %}
  10. {% set text %}
  11. <div class="sf-toolbar-info-piece">
  12. <b>{{ 'Translated'|t }}</b>
  13. <span>{{ collector.translatedCount }}</span>
  14. </div>
  15. <div class="sf-toolbar-info-piece">
  16. <b>{{ 'Untranslated'|t }}</b>
  17. <span>{{ collector.untranslatedCount }}</span>
  18. </div>
  19. {% endset %}
  20. <div class="sf-toolbar-block">
  21. <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
  22. <div class="sf-toolbar-info">{{ text|default('') }}</div>
  23. </div>
  24. {% endblock %}
  25. {% block panel %}
  26. <script id="translations" type="text/template">
  27. <h2 class="panel__title">{{ 'Translations'|t }}</h2>
  28. <div class="tabs">
  29. <input class="tabs__radio" type="radio" id="translated" name="tabs" checked/>
  30. <input class="tabs__radio" type="radio" id="untranslated" name="tabs"/>
  31. <ul class="tabs__tabs list--inline">
  32. <li><label class="tabs__label" for="translated">{{ 'Translated'|t }}</label></li>
  33. <li><label class="tabs__label" for="untranslated">{{ 'Unranslated'|t }}</label></li>
  34. </ul>
  35. <div class="tabs__panels">
  36. <div class="tabs__panel">
  37. <div class="panel__container">
  38. <table class="table--duo">
  39. <thead>
  40. <tr>
  41. <th>{{ 'Original'|t }}</th>
  42. <th>{{ 'Tanslation'|t }}</th>
  43. <th>{{ 'Action'|t }}</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <% _.each( data.translations.translated, function( value, key ){ %>
  48. <tr>
  49. <td><%= key %></td>
  50. <td><%= value %></td>
  51. <td><a href="<%- data.user_interface_translations_path %>?string=<%- key%>" target="_blank" class="h--word-intact">{{ 'Edit'|t }}</a></td>
  52. </tr>
  53. <% }); %>
  54. </tbody>
  55. </table>
  56. </div>
  57. </div>
  58. <div class="tabs__panel">
  59. <div class="panel__container">
  60. <table class="table--duo">
  61. <thead>
  62. <tr>
  63. <th>{{ 'Original'|t }}</th>
  64. <th>{{ 'Action'|t }}</th>
  65. </tr>
  66. </thead>
  67. <tbody>
  68. <% _.each( data.translations.untranslated, function( value, key ){ %>
  69. <tr>
  70. <td><%= key %></td>
  71. <td><a href="<%- data.user_interface_translations_path %>?string=<%- key%>" target="_blank" class="h--word-intact">{{ 'Edit'|t }}</a></td>
  72. </tr>
  73. <% }); %>
  74. </tbody>
  75. </table>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </script>
  81. {% endblock %}