aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-03-09 08:59:08 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-03-20 21:12:22 +0100
commit0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc (patch)
tree4cf8b97ed3c06def270e9172c7b17c5c86048585 /src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
parentd2b4f01d7435e8a8f99b15a2487916427c04e58d (diff)
downloadwallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.tar.gz
wallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.tar.zst
wallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.zip
Convert english translation file
- convert english translation to translate key - remove baggy template for login (never used since user isn't logged in and it'll use the default theme: material) - fix tests about text in response (now checking translation key instead of translated text) - remove all ugly `<div class="hidden">{{ form_rest(form) }}</div>`
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig65
1 files changed, 34 insertions, 31 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
index 371992df..433b1cae 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
@@ -4,13 +4,13 @@
4 {% set currentRoute = app.request.attributes.get('_route') %} 4 {% set currentRoute = app.request.attributes.get('_route') %}
5 5
6 {% if currentRoute == 'starred' %} 6 {% if currentRoute == 'starred' %}
7 {% trans %}starred{% endtrans %} 7 {{ 'entry.page_titles.starred'|trans }}
8 {% elseif currentRoute == 'archive' %} 8 {% elseif currentRoute == 'archive' %}
9 {% trans %}archive{% endtrans %} 9 {{ 'entry.page_titles.archived'|trans }}
10 {% elseif currentRoute == 'all' %} 10 {% elseif currentRoute == 'all' %}
11 {% trans %}Filtered{% endtrans %} 11 {{ 'entry.page_titles.filtered'|trans }}
12 {% else %} 12 {% else %}
13 {% trans %}unread{% endtrans %} 13 {{ 'entry.page_titles.unread'|trans }}
14 {% endif %} 14 {% endif %}
15 15
16{% endblock %} 16{% endblock %}
@@ -18,7 +18,9 @@
18{% block content %} 18{% block content %}
19 {% block pager %} 19 {% block pager %}
20 <div class="results clearfix"> 20 <div class="results clearfix">
21 <div class="nb-results left">{% transchoice entries.count %}{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.{% endtranschoice %}</div> 21 <div class="nb-results left">
22 {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
23 </div>
22 <ul class="pagination right"> 24 <ul class="pagination right">
23 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} 25 {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
24 <li class="{{ currentPage == p ? 'active':'waves-effect'}}"> 26 <li class="{{ currentPage == p ? 'active':'waves-effect'}}">
@@ -52,9 +54,9 @@
52 <span class="tool reading-time"> 54 <span class="tool reading-time">
53 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} 55 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
54 {% if readingTime > 0 %} 56 {% if readingTime > 0 %}
55 {% trans with {'%readingTime%': readingTime } %}estimated reading time: %readingTime% min{% endtrans %} 57 {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime}) }}
56 {% else %} 58 {% else %}
57 {% trans with {'%inferior%': '<small class="inferieur">&lt;</small>'} %}estimated reading time: %inferior% 1 min{% endtrans %} 59 {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
58 {% endif %} 60 {% endif %}
59 </span> 61 </span>
60 </div> 62 </div>
@@ -72,7 +74,7 @@
72 74
73 <div class="estimatedTime grey-text"> 75 <div class="estimatedTime grey-text">
74 <span class="tool reading-time"> 76 <span class="tool reading-time">
75 {% trans %}estimated reading time{% endtrans %}: 77 {{ 'entry.list.reading_time'|trans }}
76 {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur">&lt;</small> 1{% endif %} min 78 {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur">&lt;</small> 1{% endif %} min
77 </span> 79 </span>
78 </div> 80 </div>
@@ -82,13 +84,15 @@
82 {% endif %} 84 {% endif %}
83 85
84 <div class="card-action"> 86 <div class="card-action">
85 <span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }} - {{ entry.domainName|removeWww }}" class="tool original grey-text"><span>{{ entry.domainName|removeWww|truncate(18) }}</span></a></bold> 87 <span class="bold">
88 <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }}: {{ entry.title|e }} - {{ entry.domainName|removeWww }}" class="tool original grey-text"><span>{{ entry.domainName|removeWww|truncate(18) }}</span></a>
89 </bold>
86 90
87 <ul class="tools links right"> 91 <ul class="tools links right">
88 <li> 92 <li>
89 <a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool grey-text {% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"></a> 93 <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text {% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"></a>
90 <a title="{% trans %}Toggle favorite{% endtrans %}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a> 94 <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a>
91 <a title="{% trans %}Delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a> 95 <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a>
92 </li> 96 </li>
93 </ul> 97 </ul>
94 </div> 98 </div>
@@ -103,7 +107,7 @@
103 {% if currentRoute == 'homepage' %} 107 {% if currentRoute == 'homepage' %}
104 {% set currentRoute = 'unread' %} 108 {% set currentRoute = 'unread' %}
105 {% endif %} 109 {% endif %}
106 <h4 class="center">{% trans %}Export{% endtrans %}</h4> 110 <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4>
107 <ul> 111 <ul>
108 {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">EPUB</a></li>{% endif %} 112 {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">EPUB</a></li>{% endif %}
109 {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">MOBI</a></li>{% endif %} 113 {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">MOBI</a></li>{% endif %}
@@ -119,34 +123,34 @@
119 <div id="filters" class="side-nav fixed right-aligned"> 123 <div id="filters" class="side-nav fixed right-aligned">
120 <form action="{{ path('all') }}"> 124 <form action="{{ path('all') }}">
121 125
122 <h4 class="center">{% trans %}Filters{% endtrans %}</h4> 126 <h4 class="center">{{ 'entry.filters.title'|trans }}</h4>
123 127
124 <div class="row"> 128 <div class="row">
125 <div class="col s12"> 129 <div class="col s12">
126 <label>{% trans %}Status{% endtrans %}</label> 130 <label>{{ 'entry.filters.status_label'|trans }}</label>
127 </div> 131 </div>
128 132
129 <div class="input-field col s6 with-checkbox"> 133 <div class="input-field col s6 with-checkbox">
130 {{ form_widget(form.isArchived) }} 134 {{ form_widget(form.isArchived) }}
131 <label for="entry_filter_isArchived">{% trans %}Archived{% endtrans %}</label> 135 {{ form_label(form.isArchived) }}
132 </div> 136 </div>
133 137
134 <div class="input-field col s6 with-checkbox"> 138 <div class="input-field col s6 with-checkbox">
135 {{ form_widget(form.isStarred) }} 139 {{ form_widget(form.isStarred) }}
136 <label for="entry_filter_isStarred">{% trans %}Starred{% endtrans %}</label> 140 {{ form_label(form.isStarred) }}
137 </div> 141 </div>
138 142
139 <div class="col s12"> 143 <div class="col s12">
140 <label>{% trans %}Preview picture{% endtrans %}</label> 144 <label>{{ 'entry.filters.preview_picture_help'|trans }}</label>
141 </div> 145 </div>
142 146
143 <div class="input-field col s12 with-checkbox"> 147 <div class="input-field col s12 with-checkbox">
144 {{ form_widget(form.previewPicture) }} 148 {{ form_widget(form.previewPicture) }}
145 <label for="entry_filter_previewPicture">{% trans %}Has a preview picture{% endtrans %}</label> 149 {{ form_label(form.previewPicture) }}
146 </div> 150 </div>
147 151
148 <div class="col s12"> 152 <div class="col s12">
149 <label>{% trans %}Language{% endtrans %}</label> 153 {{ form_label(form.language) }}
150 </div> 154 </div>
151 155
152 <div class="input-field col s12"> 156 <div class="input-field col s12">
@@ -154,43 +158,42 @@
154 </div> 158 </div>
155 159
156 <div class="col s12"> 160 <div class="col s12">
157 <label>{% trans %}Reading time in minutes{% endtrans %}</label> 161 {{ form_label(form.readingTime) }}
158 </div> 162 </div>
159 <div class="input-field col s6"> 163 <div class="input-field col s6">
160 {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }} 164 {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }}
161 <label for="entry_filter_readingTime_left_number">{% trans %}from{% endtrans %}</label> 165 <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label>
162 </div> 166 </div>
163 <div class="input-field col s6"> 167 <div class="input-field col s6">
164 {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }} 168 {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }}
165 <label for="entry_filter_readingTime_right_number">{% trans %}to{% endtrans %}</label> 169 <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label>
166 </div> 170 </div>
167 171
168 <div class="input-field col s12"> 172 <div class="input-field col s12">
169 {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com' | trans} }) }} 173 {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }}
170 <label for="entry_filter_domainName">{% trans %}Domain name{% endtrans %}</label> 174 {{ form_label(form.domainName) }}
171 </div> 175 </div>
172 176
173 <div class="col s12"> 177 <div class="col s12">
174 <label>{% trans %}Creation date{% endtrans %}</label> 178 {{ form_label(form.createdAt) }}
175 </div> 179 </div>
176 180
177 <div class="input-field col s6"> 181 <div class="input-field col s6">
178 {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} 182 {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
179 <label for="entry_filter_createdAt_left_date" class="active">{% trans %}from{% endtrans %}</label> 183 <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label>
180 </div> 184 </div>
181 <div class="input-field col s6"> 185 <div class="input-field col s6">
182 {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} 186 {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
183 <label for="entry_filter_createdAt_right_date" class="active">{% trans %}to{% endtrans %}</label> 187 <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label>
184 </div> 188 </div>
185 189
186 <div class="col s6"> 190 <div class="col s6">
187 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{% trans %}Clear{% endtrans %}</a> 191 <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a>
188 </div> 192 </div>
189 193
190 <div class="col s6"> 194 <div class="col s6">
191 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{% trans %}Filter{% endtrans %}</button> 195 <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
192 </div> 196 </div>
193
194 </div> 197 </div>
195 198
196 </form> 199 </form>