From 0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 9 Mar 2016 08:59:08 +0100 Subject: 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 `` --- .../views/themes/baggy/Config/index.html.twig | 53 ++++++----- .../views/themes/baggy/Entry/edit.html.twig | 2 +- .../views/themes/baggy/Entry/entries.html.twig | 105 ++++++++++----------- .../views/themes/baggy/Entry/entries.xml.twig | 4 +- .../views/themes/baggy/Entry/entry.html.twig | 32 +++---- .../views/themes/baggy/Entry/new.html.twig | 2 +- .../views/themes/baggy/Entry/new_form.html.twig | 4 +- .../views/themes/baggy/Static/about.html.twig | 52 +++++----- .../views/themes/baggy/Static/howto.html.twig | 26 ++--- .../views/themes/baggy/Static/quickstart.html.twig | 83 +++++++++------- .../views/themes/baggy/Tag/new_form.html.twig | 3 +- .../views/themes/baggy/Tag/tags.html.twig | 18 ++-- .../Resources/views/themes/baggy/layout.html.twig | 36 +++---- 13 files changed, 217 insertions(+), 203 deletions(-) (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index 54faa788..721948ef 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -1,9 +1,9 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{% trans %}Config{% endtrans %}{% endblock %} +{% block title %}{{ 'config.page_title'|trans }}{% endblock %} {% block content %} -

{% trans %}Wallabag configuration{% endtrans %}

+

{{ 'config.tab_menu.settings'|trans }}

{{ form_start(form.config) }} {{ form_errors(form.config) }} @@ -44,13 +44,13 @@ {{ form_rest(form.config) }} -

{% trans %}RSS configuration{% endtrans %}

+

{{ 'config.tab_menu.rss'|trans }}

{{ form_start(form.rss) }} {{ form_errors(form.rss) }}
- {% trans %}RSS feeds provided by wallabag allow you to read your saved articles with your favourite RSS reader.{% endtrans %} + {{ 'config.form_rss.description'|trans }}
@@ -59,27 +59,31 @@ {% if rss.token %} {{ rss.token }} {% else %} - No token + {{ 'config.form_rss.no_token'|trans }} {% endif %} – - Regenerate ? + + {% if rss.token %} + {{ 'config.form_rss.token_reset'|trans }} + {% else %} + {{ 'config.form_rss.token_create'|trans }} + {% endif %} +
+ {% if rss.token %}
- - {% if rss.token %} - - {% else %} - You need to generate a token first. - {% endif %} + +
+ {% endif %}
@@ -92,7 +96,7 @@ {{ form_rest(form.rss) }} -

{% trans %}User information{% endtrans %}

+

{{ 'config.tab_menu.user_info'|trans }}

{{ form_start(form.user) }} {{ form_errors(form.user) }} @@ -115,7 +119,7 @@ {% if twofactor_auth %}
- {% trans %}Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion{% endtrans %} + {{ 'config.form_user.two_factor_description'|trans }}
@@ -130,7 +134,7 @@ {{ form_rest(form.user) }} -

{% trans %}Change your password{% endtrans %}

+

{{ 'config.tab_menu.password'|trans }}

{{ form_start(form.pwd) }} {{ form_errors(form.pwd) }} @@ -162,13 +166,16 @@ {{ form_rest(form.pwd) }} -

{% trans %}Tagging rules{% endtrans %}

+

{{ 'config.tab_menu.rules'|trans }}}

    {% for tagging_rule in app.user.config.taggingRules %}
  • - if « {{ tagging_rule.rule }} » then tag as « {{ tagging_rule.tags|join(', ') }} » - + {{ 'config.form_rules.if_label'|trans }} + « {{ tagging_rule.rule }} » + {{ 'config.form_rules.then_tag_as_label'|trans }} + « {{ tagging_rule.tags|join(', ') }} » +
  • {% endfor %}
@@ -196,7 +203,7 @@ {% if is_granted('ROLE_SUPER_ADMIN') %} -

{% trans %}Add a user{% endtrans %}

+

{{ 'config.tab_menu.new_user'|trans }}

{{ form_start(form.new_user) }} {{ form_errors(form.new_user) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/edit.html.twig index 0d4d5ad2..e974fc69 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/edit.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/edit.html.twig @@ -1,6 +1,6 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{% trans %}Edit an entry{% endtrans %}{% endblock %} +{% block title %}{{ 'entry.edit.page_title'|trans }}{% endblock %} {% block content %} {{ form(form) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 7271bdaa..f718043b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -1,13 +1,13 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title "Unread" %} +{% block title %}{{ 'entry.page_titles.unread'|trans }}{% endblock %} {% block content %} {% block pager %}
-
{{ entries.count }} {% trans %}entries{% endtrans %}
+
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
{% endblock %} - {% if entries is empty %} -

{% trans %}No articles found.{% endtrans %}

- {% else %} - {% for entry in entries %} -
-

{{ entry.title|raw }}

- {% if entry.readingTime > 0 %} -
- - {% trans with {'%readingTime%': entry.readingTime } %}estimated reading time: %readingTime% min{% endtrans %} - -
- {% else %} -
- - {% trans with {'%inferior%': '<'} %}estimated reading time: %inferior% 1 min{% endtrans %} - -
- {% endif %} - - - {% if entry.previewPicture is null %} -

{{ entry.content|striptags|slice(0, 300) }}…

- {% else %} - {{ entry.title|raw }} - {% endif %} -
- {% endfor %} - {% endif %} + {% for entry in entries %} +
+

{{ entry.title|raw }}

+ {% if entry.readingTime > 0 %} +
+ + {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }} + +
+ {% else %} +
+ + {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} + +
+ {% endif %} + + + {% if entry.previewPicture is null %} +

{{ entry.content|striptags|slice(0, 300) }}…

+ {% else %} + {{ entry.title|raw }} + {% endif %} +
+ {% endfor %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.xml.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.xml.twig index a39a8dc3..98f7194c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.xml.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.xml.twig @@ -18,9 +18,9 @@ 0 -%} - {% trans %}estimated reading time :{% endtrans %} {{ entry.readingTime }} min + {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }} {%- else -%} - {% trans %}estimated reading time :{% endtrans %} < 1 min + {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} {%- endif %} {{ entry.content|raw -}} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 9323e787..3cda3949 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -5,32 +5,32 @@ {% block content %}
-

{{ entry.title|raw }}

+

{{ entry.title|raw }}

{% set nbAnnotations = entry.annotations | length %} - {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %} + {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}