]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Convert english translation file
authorJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 9 Mar 2016 07:59:08 +0000 (08:59 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Sun, 20 Mar 2016 20:12:22 +0000 (21:12 +0100)
- 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>`

80 files changed:
src/Wallabag/CoreBundle/Entity/Config.php
src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
src/Wallabag/CoreBundle/Form/Type/ConfigType.php
src/Wallabag/CoreBundle/Form/Type/EditEntryType.php
src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
src/Wallabag/CoreBundle/Form/Type/NewTagType.php
src/Wallabag/CoreBundle/Form/Type/NewUserType.php
src/Wallabag/CoreBundle/Form/Type/RssType.php
src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php
src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
src/Wallabag/CoreBundle/Resources/translations/messages.en.yml [new file with mode: 0644]
src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/edit.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.xml.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new_form.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/about.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/quickstart.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/new_form.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.xml.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new_form.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Static/about.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Static/quickstart.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/new_form.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php
src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php
src/Wallabag/ImportBundle/Controller/PocketController.php
src/Wallabag/ImportBundle/Form/Type/UploadImportType.php
src/Wallabag/ImportBundle/Import/PocketImport.php
src/Wallabag/ImportBundle/Import/WallabagV1Import.php
src/Wallabag/ImportBundle/Import/WallabagV2Import.php
src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig
src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig
src/Wallabag/ImportBundle/Resources/views/WallabagV2/index.html.twig
src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php
src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php
src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php
src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php
src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml
src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml
src/Wallabag/UserBundle/Resources/translations/wallabag_user.tr.yml
src/Wallabag/UserBundle/Resources/views/Authentication/form.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/Authentication/form.html.twig with 96% similarity]
src/Wallabag/UserBundle/Resources/views/ChangePassword/changePassword_content.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/ChangePassword/changePassword_content.html.twig with 100% similarity]
src/Wallabag/UserBundle/Resources/views/Registration/checkEmail.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/Registration/checkEmail.html.twig with 100% similarity]
src/Wallabag/UserBundle/Resources/views/Registration/confirmed.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/Registration/confirmed.html.twig with 84% similarity]
src/Wallabag/UserBundle/Resources/views/Registration/register_content.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig with 97% similarity]
src/Wallabag/UserBundle/Resources/views/Resetting/checkEmail.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/checkEmail.html.twig with 100% similarity]
src/Wallabag/UserBundle/Resources/views/Resetting/passwordAlreadyRequested.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/passwordAlreadyRequested.html.twig with 100% similarity]
src/Wallabag/UserBundle/Resources/views/Resetting/request_content.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/request_content.html.twig with 82% similarity]
src/Wallabag/UserBundle/Resources/views/Resetting/reset_content.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/reset_content.html.twig with 100% similarity]
src/Wallabag/UserBundle/Resources/views/Security/login.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/Security/login.html.twig with 75% similarity]
src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig
src/Wallabag/UserBundle/Resources/views/layout.html.twig [moved from src/Wallabag/UserBundle/Resources/views/themes/material/layout.html.twig with 88% similarity]
src/Wallabag/UserBundle/Resources/views/themes/baggy/Authentication/form.html.twig [deleted file]
src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig [deleted file]
src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register_content.html.twig [deleted file]
src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/checkEmail.html.twig [deleted file]
src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request.html.twig [deleted file]
src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request_content.html.twig [deleted file]
src/Wallabag/UserBundle/Resources/views/themes/baggy/Security/login.html.twig [deleted file]
src/Wallabag/UserBundle/Resources/views/themes/baggy/layout.html.twig [deleted file]

index e18b543b19070c5271d1ffc9a13f05e341a6abcd..a25656d3b36597a38661b050f5bcebe95a071eb7 100644 (file)
@@ -40,7 +40,7 @@ class Config
      * @Assert\Range(
      *      min = 1,
      *      max = 100000,
-     *      maxMessage = "This will certainly kill the app"
+     *      maxMessage = "validator.item_per_page_too_high"
      * )
      * @ORM\Column(name="items_per_page", type="integer", nullable=false)
      */
@@ -68,7 +68,7 @@ class Config
      * @Assert\Range(
      *      min = 1,
      *      max = 100000,
-     *      maxMessage = "This will certainly kill the app"
+     *      maxMessage = "validator.rss_limit_too_hight"
      * )
      */
     private $rssLimit;
index 7d05a5d81442cb5f3ba04852f7c33b3fcd8b47fc..841af51e0d20d42590affd9e20a6d45f30dcdd32 100644 (file)
@@ -16,23 +16,27 @@ class ChangePasswordType extends AbstractType
     {
         $builder
             ->add('old_password', PasswordType::class, array(
-                'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')),
+                'constraints' => new UserPassword(array('message' => 'validator.password_wrong_value')),
+                'label' => 'config.form_password.old_password_label',
             ))
             ->add('new_password', RepeatedType::class, array(
                 'type' => PasswordType::class,
-                'invalid_message' => 'The password fields must match.',
+                'invalid_message' => 'validator.password_must_match',
                 'required' => true,
-                'first_options' => array('label' => 'New password'),
-                'second_options' => array('label' => 'Repeat new password'),
+                'first_options' => array('label' => 'config.form_password.new_password_label'),
+                'second_options' => array('label' => 'config.form_password.repeat_new_password_label'),
                 'constraints' => array(
                     new Constraints\Length(array(
                         'min' => 8,
-                        'minMessage' => 'Password should by at least 8 chars long',
+                        'minMessage' => 'validator.password_too_short',
                     )),
                     new Constraints\NotBlank(),
                 ),
+                'label' => 'config.form_password.new_password_label',
+            ))
+            ->add('save', SubmitType::class, array(
+                'label' => 'config.form.save',
             ))
-            ->add('save', SubmitType::class)
         ;
     }
 
index 0a5ea6cc8f37397f0c7484dfe1d2962851c8a075..25ea9efa2c9ea07ba3b14252b2db8bdb97a28160 100644 (file)
@@ -33,9 +33,13 @@ class ConfigType extends AbstractType
             ->add('theme', ChoiceType::class, array(
                 'choices' => array_flip($this->themes),
                 'choices_as_values' => true,
+                'label' => 'config.form_settings.theme_label',
+            ))
+            ->add('items_per_page', null, array(
+                'label' => 'config.form_settings.items_per_page_label',
             ))
-            ->add('items_per_page')
             ->add('reading_speed', ChoiceType::class, array(
+                'label' => 'config.form_settings.reading_speed',
                 'choices' => array(
                     'I read ~100 words per minute' => '0.5',
                     'I read ~200 words per minute' => '1',
@@ -46,8 +50,11 @@ class ConfigType extends AbstractType
             ->add('language', ChoiceType::class, array(
                 'choices' => array_flip($this->languages),
                 'choices_as_values' => true,
+                'label' => 'config.form_settings.language_label',
+            ))
+            ->add('save', SubmitType::class, array(
+                'label' => 'config.form.save',
             ))
-            ->add('save', SubmitType::class)
         ;
     }
 
index 2b1e1ef43c76a0c744a37ee6f985b3826ca70e4f..23d7b23984d3e4059695d3fd4c64ea7f588aab0f 100644 (file)
@@ -14,9 +14,22 @@ class EditEntryType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('title', TextType::class, array('required' => true))
-            ->add('is_public', CheckboxType::class, array('required' => false))
-            ->add('save', SubmitType::class)
+            ->add('title', TextType::class, array(
+                'required' => true,
+                'label' => 'entry.edit.title_label',
+            ))
+            ->add('is_public', CheckboxType::class, array(
+                'required' => false,
+                'label' => 'entry.edit.is_public_label',
+            ))
+            ->add('url', TextType::class, array(
+                'disabled' => true,
+                'required' => false,
+                'label' => 'entry.edit.url_label',
+            ))
+            ->add('save', SubmitType::class, array(
+                'label' => 'entry.edit.save_label',
+            ))
         ;
     }
 
index ee10bc8b517135deac7303beea15fa7c00e2d11b..ec36503b721fe84a6fa3738c6a5f8c5d8bc2cc17 100644 (file)
@@ -34,7 +34,9 @@ class EntryFilterType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('readingTime', NumberRangeFilterType::class)
+            ->add('readingTime', NumberRangeFilterType::class, array(
+                'label' => 'entry.filters.reading_time.label',
+            ))
             ->add('createdAt', DateRangeFilterType::class, array(
                     'left_date_options' => array(
                         'attr' => array(
@@ -50,6 +52,7 @@ class EntryFilterType extends AbstractType
                         'format' => 'dd/MM/yyyy',
                         'widget' => 'single_text',
                     ),
+                    'label' => 'entry.filters.created_at.label',
                 )
             )
             ->add('domainName', TextFilterType::class, array(
@@ -62,9 +65,14 @@ class EntryFilterType extends AbstractType
 
                     return $filterQuery->createCondition($expression);
                 },
+                'label' => 'entry.filters.domain_label',
+            ))
+            ->add('isArchived', CheckboxFilterType::class, array(
+                'label' => 'entry.filters.archived_label',
+            ))
+            ->add('isStarred', CheckboxFilterType::class, array(
+                'label' => 'entry.filters.starred_label',
             ))
-            ->add('isArchived', CheckboxFilterType::class)
-            ->add('isStarred', CheckboxFilterType::class)
             ->add('previewPicture', CheckboxFilterType::class, array(
                 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
                     if (false === $values['value']) {
@@ -75,10 +83,12 @@ class EntryFilterType extends AbstractType
 
                     return $filterQuery->createCondition($expression);
                 },
+                'label' => 'entry.filters.preview_picture_label',
             ))
             ->add('language', ChoiceFilterType::class, array(
                 'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())),
                 'choices_as_values' => true,
+                'label' => 'entry.filters.language_label',
             ))
         ;
     }
index fbce13f1fe0cd97b73f29bde1b4cc4ebfe4bb840..69fab6fbc1055f6c06755457d4459a69e3aacf1a 100644 (file)
@@ -3,7 +3,6 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\Extension\Core\Type\SubmitType;
 use Symfony\Component\Form\Extension\Core\Type\UrlType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -13,8 +12,10 @@ class NewEntryType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('url', UrlType::class, array('required' => true))
-            ->add('save', SubmitType::class)
+            ->add('url', UrlType::class, array(
+                'required' => true,
+                'label' => 'entry.new.form_new.url_label',
+            ))
         ;
     }
 
index 0f5590311dbd9cba91bf29a1b21cd5ec56968171..c7568de772ffe4c75d86cc8b9ea4e9af8d8f44d5 100644 (file)
@@ -3,7 +3,6 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\Extension\Core\Type\SubmitType;
 use Symfony\Component\Form\Extension\Core\Type\TextType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -14,7 +13,6 @@ class NewTagType extends AbstractType
     {
         $builder
             ->add('label', TextType::class, array('required' => true))
-            ->add('save', SubmitType::class)
         ;
     }
 
index 6eb0e63f7f46cc2bbba2807c474a3083e80f0d3d..60fcc20c625c7d283eda3b4478ca103d33c59a17 100644 (file)
@@ -17,22 +17,30 @@ class NewUserType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('username', TextType::class, array('required' => true))
+            ->add('username', TextType::class, array(
+                'required' => true,
+                'label' => 'config.form_new_user.username_label',
+            ))
             ->add('plainPassword', RepeatedType::class, array(
                 'type' => PasswordType::class,
-                'invalid_message' => 'The password fields must match',
-                'first_options' => array('label' => 'Password'),
-                'second_options' => array('label' => 'Repeat new password'),
+                'invalid_message' => 'validator.password_must_match',
+                'first_options' => array('label' => 'config.form_new_user.password_label'),
+                'second_options' => array('label' => 'config.form_new_user.repeat_new_password_label'),
                 'constraints' => array(
                     new Constraints\Length(array(
                         'min' => 8,
-                        'minMessage' => 'Password should by at least 8 chars long',
+                        'minMessage' => 'validator.password_too_short',
                     )),
                     new Constraints\NotBlank(),
                 ),
+                'label' => 'config.form_new_user.plain_password_label',
+            ))
+            ->add('email', EmailType::class, array(
+                'label' => 'config.form_new_user.email_label',
+            ))
+            ->add('save', SubmitType::class, array(
+                'label' => 'config.form.save',
             ))
-            ->add('email', EmailType::class)
-            ->add('save', SubmitType::class)
         ;
     }
 
index def8782cc12261afe35d57e8555d60ebfff474ac..a9f68e542019889326386b2ae1300157cfd22e79 100644 (file)
@@ -12,8 +12,12 @@ class RssType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('rss_limit')
-            ->add('save', SubmitType::class)
+            ->add('rss_limit', null, array(
+                'label' => 'config.form_rss.rss_limit',
+            ))
+            ->add('save', SubmitType::class, array(
+                'label' => 'config.form.save',
+            ))
         ;
     }
 
index 5815b8c66b9af96d1a5bdfb7e30315acb5a4988e..cfee21f17cfabb06eea0e2ac51a0158190ddbe12 100644 (file)
@@ -14,12 +14,19 @@ class TaggingRuleType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('rule', TextType::class, array('required' => true))
-            ->add('save', SubmitType::class)
+            ->add('rule', TextType::class, array(
+                'required' => true,
+                'label' => 'config.form_rules.rule_label',
+            ))
+            ->add('save', SubmitType::class, array(
+                'label' => 'config.form.save',
+            ))
         ;
 
         $tagsField = $builder
-            ->create('tags', TextType::class)
+            ->create('tags', TextType::class, array(
+                'label' => 'config.form_rules.tags_label',
+            ))
             ->addModelTransformer(new StringToListTransformer(','));
 
         $builder->add($tagsField);
index f491b0ae3c16cd2dd8aa023565f1a2b52a98c9cb..799ea39e6871e478f39fa2ed3c2b6328907f103f 100644 (file)
@@ -15,10 +15,19 @@ class UserInformationType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('name', TextType::class)
-            ->add('email', EmailType::class)
-            ->add('twoFactorAuthentication', CheckboxType::class, array('required' => false))
-            ->add('save', SubmitType::class)
+            ->add('name', TextType::class, array(
+                'label' => 'config.form_user.name_label',
+            ))
+            ->add('email', EmailType::class, array(
+                'label' => 'config.form_user.email_label',
+            ))
+            ->add('twoFactorAuthentication', CheckboxType::class, array(
+                'required' => false,
+                'label' => 'config.form_user.twoFactorAuthentication_label',
+            ))
+            ->add('save', SubmitType::class, array(
+                'label' => 'config.form.save',
+            ))
             ->remove('username')
             ->remove('plainPassword')
         ;
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
new file mode 100644 (file)
index 0000000..22039de
--- /dev/null
@@ -0,0 +1,334 @@
+security:
+    login:
+        page_title: 'Welcome to wallabag!'
+        keep_logged_in: 'Keep me logged in'
+        forgot_password: 'Forgot your password?'
+        submit: 'Login'
+        register: 'Register'
+        username: 'Username'
+        password: 'Password'
+        cancel: 'Cancel'
+    resetting:
+        description: "Enter your email address below and we'll send you password reset instructions."
+    register:
+        page_title: 'Create an account'
+        go_to_account: 'Go to your account'
+
+menu:
+    left:
+        unread: 'Unread'
+        starred: 'Starred'
+        archive: 'Archive'
+        all_articles: 'All entries'
+        config: 'Config'
+        tags: 'Tags'
+        internal_settings: 'Internal Settings'
+        import: 'Import'
+        howto: 'How to'
+        developer: 'Developer'
+        logout: 'Logout'
+        about: 'About'
+        search: 'Search'
+        save_link: 'Save a link'
+        back_to_unread: 'Back to unread articles'
+    top:
+        add_new_entry: 'Add a new entry'
+        search: 'Search'
+        filter_entries: 'Filter entries'
+        export: 'Export'
+    search_form:
+        input_label: 'Enter your search here'
+
+footer:
+    wallabag:
+        elsewhere: 'Take wallabag with you'
+        social: 'Social'
+        powered_by: 'powered by'
+        about: 'About'
+
+config:
+    page_title: Config
+    tab_menu:
+        settings: 'Settings'
+        rss: 'RSS'
+        user_info: 'User information'
+        password: 'Password'
+        rules: 'Tagging rules'
+        new_user: 'Add a user'
+    form:
+        save: 'Save'
+    form_settings:
+        theme_label: 'Theme'
+        items_per_page_label: 'Items per page'
+        language_label: 'Language'
+    form_rss:
+        description: 'RSS feeds provided by wallabag allow you to read your saved articles with your favourite RSS reader. You need to generate a token first.'
+        token_label: 'RSS token'
+        no_token: 'No token'
+        token_create: 'Create your token'
+        token_reset: 'Regenerate your token'
+        rss_links: 'RSS links'
+        rss_link:
+            unread: 'unread'
+            starred: 'starred'
+            archive: 'archived'
+        rss_limit: 'Number of items in the feed'
+    form_user:
+        two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion"
+        name_label: 'Name'
+        email_label: 'Email'
+        twoFactorAuthentication_label: 'Two factor authentication'
+    form_password:
+        old_password_label: 'Current password'
+        new_password_label: 'New password'
+        repeat_new_password_label: 'Repeat new password'
+    form_rules:
+        if_label: 'if'
+        then_tag_as_label: 'then tag as'
+        delete_rule_label: 'delete'
+        rule_label: 'Rule'
+        tags_label: 'Tags'
+        faq:
+            title: 'FAQ'
+            tagging_rules_definition_title: 'What does Â« tagging rules Â» mean?'
+            tagging_rules_definition_description: 'They are rules used by Wallabag to automatically tag new entries.<br />Each time a new entry is added, all the tagging rules will be used to add the tags you configured, thus saving you the trouble to manually classify your entries.'
+            how_to_use_them_title: 'How do I use them?'
+            how_to_use_them_description: 'Let assume you want to tag new entries as Â« <i>short reading</i> Â» when the reading time is inferior to 3 minutes.<br />In that case, you should put Â« readingTime &lt;= 3 Â» in the <i>Rule</i> field and Â« <i>short reading</i> Â» in the <i>Tags</i> field.<br />Several tags can added simultaneously by separating them by a comma: Â« <i>short reading, must read</i> Â»<br />Complex rules can be written by using predefined operators: if Â« <i>readingTime &gt;= 5 AND domainName = "github.com"</i> Â» then tag as Â« <i>long reading, github </i> Â»'
+            variables_available_title: 'Which variables and operators can I use to write rules?'
+            variables_available_description: 'The following variables and operators can be used to create tagging rules:'
+            meaning: 'Meaning'
+            variable_description:
+                label: 'Variable'
+                title: 'Title of the entry'
+                url: 'URL of the entry'
+                isArchived: 'Whether the entry is archived or not'
+                isStarred: 'Whether the entry is starred or not'
+                content: "The entry's content"
+                language: "The entry's language"
+                mimetype: "The entry's mime-type"
+                readingTime: "The estimated entry's reading time, in minutes"
+                domainName: 'The domain name of the entry'
+            operator_description:
+                label: 'Operator'
+                less_than: 'Less than...'
+                strictly_less_than: 'Strictly less than...'
+                greater_than: 'Greater than...'
+                strictly_greater_than: 'Strictly greater than...'
+                equal_to: 'Equal to...'
+                not_equal_to: 'Not equal to...'
+                or: 'One rule OR another'
+                and: 'One rule AND another'
+                matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>'
+    form_new_user:
+        username_label: 'Username'
+        password_label: 'Password'
+        repeat_new_password_label: 'Repeat new password'
+        plain_password_label: '????'
+        email_label: 'Email'
+
+entry:
+    page_titles:
+        unread: 'Unread entries'
+        starred: 'Starred entries'
+        archive: 'Archived entries'
+        filtered: 'Filtered entries'
+    list:
+        number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.'
+        reading_time: 'estimated reading time'
+        reading_time_minutes: 'estimated reading time: %readingTime% min'
+        reading_time_less_one_minute: 'estimated reading time: <small class="inferieur">&lt;</small> 1 min'
+        original_article: 'original'
+        toogle_as_read: 'Toggle mark as read'
+        toogle_as_star: 'Toggle favorite'
+        delete: 'Delete'
+        export_title: 'Export'
+    filters:
+        title: 'Filters'
+        status_label: 'Status'
+        archived_label: 'Archived'
+        starred_label: 'Starred'
+        preview_picture_label: 'Has a preview picture'
+        preview_picture_help: 'Preview picture'
+        language_label: 'Language'
+        reading_time:
+            label: 'Reading time in minutes'
+            from: 'from'
+            to: 'to'
+        domain_label: 'Domain name'
+        created_at:
+            label: 'Creation date'
+            from: 'from'
+            to: 'to'
+        action:
+            clear: 'Clear'
+            filter: 'Filter'
+    view:
+        left_menu:
+            back_to_top: 'Back to top'
+            back_to_homepage: 'Back'
+            set_as_read: 'Mark as read'
+            set_as_unread: 'Mark as unread'
+            set_as_favorite: 'Favorite'
+            view_original_article: 'Orignal article'
+            re_fetch_content: 'Re-fetch content'
+            delete: 'Delete'
+            add_a_tag: 'Add a tag'
+            share_content: 'Share'
+            share_email_label: 'Email'
+            download: 'Download'
+            print: 'Print'
+            problem:
+                label: 'Problems?'
+                description: 'Does this article appear wrong?'
+        edit_title: 'Edit title'
+        original_article: 'original'
+        annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
+    new:
+        page_title: 'Save new entry'
+        placeholder: 'http://website.com'
+        form_new:
+            url_label: Url
+    edit:
+        page_title: 'Edit an entry'
+        title_label: 'Title'
+        url_label: 'Url'
+        is_public_label: 'Public'
+        save_label: 'Save'
+
+about:
+    page_title: 'About'
+    top_menu:
+        who_behind_wallabag: 'Who is behind wallabag'
+        getting_help: 'Getting help'
+        helping: 'Helping wallabag'
+        contributors: 'Contributors'
+        third_party: 'Third-party libraries'
+    who_behind_wallabag:
+        developped_by: 'Developed by'
+        website: 'website'
+        many_contributors: 'And many others contributors â™¥ <a href="https://github.com/wallabag/wallabag/graphs/contributors">on Github</a>'
+        on_github: 'on GitHub'
+        project_website: 'Project website'
+        license: 'License'
+        version: 'Version'
+    getting_help:
+        documentation: 'Documentation'
+        bug_reports: 'Bug reports'
+        support: '<a href="https://support.wallabag.org">On our support website</a> or <a href="https://github.com/wallabag/wallabag/issues">on GitHub</a>'
+    helping:
+        description: 'wallabag is free and opensource. You can help us:'
+        by_contributing: 'by contributing to the project:'
+        by_contributing_2: 'an issue lists all our needs'
+        by_paypal: 'via Paypal'
+    contributors:
+        description: 'Thank you to contributors on wallabag web application'
+    third_party:
+        description: 'Here are the list of third-party libraries used in wallabag (with their licenses):'
+        package: 'Package'
+        license: 'License'
+
+howto:
+    page_title: 'How to'
+    page_description: 'There are several ways to save an article:'
+    top_menu:
+        browser_addons: 'Browser addons'
+        mobile_apps: 'Mobile apps'
+        bookmarklet: 'Bookmarklet'
+    form:
+        description: 'Thanks to this form'
+    browser_addons:
+        firefox: 'Standard Firefox Add-On'
+        chrome: 'Chrome Extension'
+    mobile_apps:
+        android:
+            via_f_droid: 'via F-Droid'
+            via_google_play: 'via Google Play'
+        ios: 'on the iTunes Store'
+        windows: 'on the Microsoft Store'
+    bookmarklet:
+        description: 'Drag & drop this link to your bookmarks bar:'
+
+quickstart:
+    page_title: 'Quickstart'
+    intro:
+        title: 'Welcome to wallabag!'
+        paragraph_1: "We'll accompany you to visit wallabag and show you some features which can interess you."
+        paragraph_2: 'Follow us!'
+    configure:
+        title: 'Configure the application'
+        language: 'Change language and design'
+        rss: 'Enable RSS feeds'
+        tagging_rules: 'Write rules to automatically tag your articles'
+    admin:
+        title: 'Administration'
+        description: 'As a administrator, you have privileges on wallabag. You can:'
+        new_user: 'Create a new user'
+        analytics: 'Configure analytics'
+        sharing: 'Enable some parameters about article sharing'
+        export: 'Configure export'
+        import: 'Configure import'
+    first_steps:
+        title: 'First steps'
+        new_article: 'Save your first article'
+        unread_articles: 'And classify it!'
+    migrate:
+        title: 'Migrate from an existing service'
+        description: "You're using an other service? We'll help you to retrieve your data on wallabag."
+        pocket: 'Migrate from Pocket'
+        wallabag_v1: 'Migrate from wallabag v1'
+        wallabag_v2: 'Migrate from wallabag v2'
+    developer:
+        title: 'Developers'
+        create_application: 'Create your third application'
+    docs:
+        title: 'Full documentation'
+        annotate: 'Annotate your article'
+        export: 'Convert your articles into ePUB or PDF'
+        search_filters: 'See how you can look for an article by using search engine and filters'
+        fetching_errors: 'What can I do if an article encounters errors during fetching?'
+        all_docs: 'And so many other articles!'
+    support:
+        title: 'Support'
+        description: 'If you need some help, we are here for you.'
+        github: 'On GitHub'
+        email: 'By email'
+        gitter: 'On Gitter'
+
+tag:
+    page_title: 'Tags'
+    list:
+        number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.'
+
+import:
+    page_title: 'Import'
+    page_description: 'Welcome to wallabag importer. Please select your previous service that you want to migrate.'
+    action:
+        import_contents: 'Import contents'
+    form:
+        mark_as_read_title: 'Mark all as read?'
+        mark_as_read_label: 'Mark all imported entries as read'
+        file_label: 'File'
+        save_label: 'Upload file'
+    pocket:
+        page_title: 'Import > Pocket'
+        description: "This importer will import all your Pocket data. Pocket doesn't allow us to retrieve content from their service, so the readable content of each article will be re-fetched by wallabag."
+        config_missing:
+            description: "Pocket import isn't configured."
+            admin_message: 'You need to define %keyurls%a pocket_consumer_key%keyurle%.'
+            user_message: 'Your server admin needs to define an API Key for Pocket.'
+        authorize_message: 'You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.'
+        connect_to_pocket: 'Connect to Pocket and import data'
+    wallabag_v1:
+        page_title: 'Import > Wallabag v1'
+        description: 'This importer will import all your wallabag v1 articles. On your config page, click on "JSON export" in the "Export your wallabag data" section. You will have a "wallabag-export-1-xxxx-xx-xx.json" file.'
+        how_to: 'Please select your wallabag export and click on the below button to upload and import it.'
+    wallabag_v2:
+        page_title: 'Import > Wallabag v2'
+        description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.'
+
+validator:
+    password_must_match: 'The password fields must match.'
+    password_too_short: 'Password should by at least 8 chars long'
+    password_wrong_value: 'Wrong value for your current password'
+    item_per_page_too_high: 'This will certainly kill the app'
+    rss_limit_too_hight: 'This will certainly kill the app'
index 7c6ad07e8dc105d31bb45333dc79fcdd5939f1a3..ddc453d01314626ceef51c07be2e31a706b660ca 100644 (file)
@@ -1,11 +1,14 @@
 #Login
-Keep me logged in: 'Rester connecté'
-Forgot your password?: 'Mot de passe oublié ?'
-Login: 'Se connecter'
-Back to login: 'Revenir au formulaire de connexion'
-Send: 'Envoyer'
-"Enter your email address below and we'll send you password reset instructions.": "Saisissez votre adresse e-mail ci-dessous, nous vous enverrons les instructions pour réinitialiser votre mot de passe."
-Register: 'Créer un compte'
+security:
+    login:
+        keep_logged_in: 'Rester connecté'
+        forgot_password: 'Mot de passe oublié ?'
+        submit: 'Se connecter'
+        register: 'Créer un compte'
+        username: "Nom d'utilisateur"
+        password: 'Mot de passe'
+    resetting:
+        description: 'Saisissez votre adresse e-mail ci-dessous, nous vous enverrons les instructions pour réinitialiser votre mot de passe.'
 
 # Menu
 unread: 'Non lus'
@@ -33,7 +36,6 @@ Export: Exporter
 # Config screen
 Settings: 'Paramètres'
 User information: 'Mon compte'
-Password: 'Mot de passe'
 RSS: 'RSS'
 Add a user: 'Créer un compte'
 Theme: 'Thème'
@@ -54,7 +56,6 @@ RSS links: 'URL de vos flux RSS'
 Old password: 'Mot de passe actuel'
 New password: 'Nouveau mot de passe'
 Repeat new password: 'Confirmez votre nouveau mot de passe'
-Username: "Nom d'utilisateur"
 Two factor authentication: "Double authentification"
 "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion": "Activer l'authentification double-facteur veut dire que vous allez recevoir un code par email Ã  chaque nouvelle connexion non approuvée."
 "I read ~100 words per minute": "Je lis environ 100 mots par minute"
index 54faa788c0b466a6211535600bc35174b7401adb..721948ef54605fd810b832d96596d361ad0723f6 100644 (file)
@@ -1,9 +1,9 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}Config{% endtrans %}{% endblock %}
+{% block title %}{{ 'config.page_title'|trans }}{% endblock %}
 
 {% block content %}
-    <h2>{% trans %}Wallabag configuration{% endtrans %}</h2>
+    <h2>{{ 'config.tab_menu.settings'|trans }}</h2>
 
     {{ form_start(form.config) }}
         {{ form_errors(form.config) }}
         {{ form_rest(form.config) }}
     </form>
 
-    <h2>{% trans %}RSS configuration{% endtrans %}</h2>
+    <h2>{{ 'config.tab_menu.rss'|trans }}</h2>
 
     {{ form_start(form.rss) }}
         {{ form_errors(form.rss) }}
 
         <div class="row">
-            {% trans %}RSS feeds provided by wallabag allow you to read your saved articles with your favourite RSS reader.{% endtrans %}
+            {{ 'config.form_rss.description'|trans }}
         </div>
 
         <fieldset class="w500p inline">
                 {% if rss.token %}
                     {{ rss.token }}
                 {% else %}
-                    <em>No token</em>
+                    <em>{{ 'config.form_rss.no_token'|trans }}</em>
                 {% endif %}
                 â€“
-                <a href="{{ path('generate_token') }}">Regenerate ?</a>
+                <a href="{{ path('generate_token') }}">
+                    {% if rss.token %}
+                        {{ 'config.form_rss.token_reset'|trans }}
+                    {% else %}
+                        {{ 'config.form_rss.token_create'|trans }}
+                    {% endif %}
+                </a>
             </div>
         </fieldset>
 
+        {% if rss.token %}
         <fieldset class="w500p inline">
             <div class="row">
-                <label>Rss links:</label>
-                {% if rss.token %}
-                    <ul>
-                        <li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">unread</a></li>
-                        <li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">fav</a></li>
-                        <li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">archives</a></li>
-                    </ul>
-                {% else %}
-                    <strong>You need to generate a token first.</strong>
-                {% endif %}
+                <label>{{ 'config.form_rss.rss_links'|trans }}</label>
+                <ul>
+                    <li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">unread</a></li>
+                    <li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">fav</a></li>
+                    <li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">archives</a></li>
+                </ul>
             </div>
         </fieldset>
+        {% endif %}
 
         <fieldset class="w500p inline">
             <div class="row">
@@ -92,7 +96,7 @@
         {{ form_rest(form.rss) }}
     </form>
 
-    <h2>{% trans %}User information{% endtrans %}</h2>
+    <h2>{{ 'config.tab_menu.user_info'|trans }}</h2>
 
     {{ form_start(form.user) }}
         {{ form_errors(form.user) }}
 
         {% if twofactor_auth %}
         <div class="row">
-            {% 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 }}
         </div>
 
         <fieldset class="w500p inline">
         {{ form_rest(form.user) }}
     </form>
 
-    <h2>{% trans %}Change your password{% endtrans %}</h2>
+    <h2>{{ 'config.tab_menu.password'|trans }}</h2>
 
     {{ form_start(form.pwd) }}
         {{ form_errors(form.pwd) }}
         {{ form_rest(form.pwd) }}
     </form>
 
-    <h2>{% trans %}Tagging rules{% endtrans %}</h2>
+    <h2>{{ 'config.tab_menu.rules'|trans }}}</h2>
 
     <ul>
         {% for tagging_rule in app.user.config.taggingRules %}
         <li>
-            if Â« {{ tagging_rule.rule }} Â» then tag as Â« {{ tagging_rule.tags|join(', ') }} Â»
-            <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{% trans %}Delete{% endtrans %}" class="tool delete icon-trash icon"></a>
+            {{ 'config.form_rules.if_label'|trans }}
+            Â« {{ tagging_rule.rule }} Â»
+            {{ 'config.form_rules.then_tag_as_label'|trans }}
+            Â« {{ tagging_rule.tags|join(', ') }} Â»
+            <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}" class="tool delete icon-trash icon"></a>
         </li>
         {% endfor %}
     </ul>
     </form>
 
     {% if is_granted('ROLE_SUPER_ADMIN') %}
-    <h2>{% trans %}Add a user{% endtrans %}</h2>
+    <h2>{{ 'config.tab_menu.new_user'|trans }}</h2>
 
     {{ form_start(form.new_user) }}
         {{ form_errors(form.new_user) }}
index 0d4d5ad2585640f711f23dc92167696ed2ffd4da..e974fc69453fd592a7a8380478893cac595fc814 100644 (file)
@@ -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) }}
index 7271bdaa2058ca262a0b4d8b2efa429ee2c3282a..f718043b05ffedc383c99011b4177ff558019a09 100644 (file)
@@ -1,13 +1,13 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title "Unread" %}
+{% block title %}{{ 'entry.page_titles.unread'|trans }}{% endblock %}
 
 {% block content %}
     {% block pager %}
         <div class="results">
-            <div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div>
+            <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
                 <div class="pagination">
-                <a href="#" id="filter">{% trans %}Filter{% endtrans %}</a>
+                <a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a>
                 {% if entries is not empty %}
                     â€“
                     {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
         </div>
     {% endblock %}
 
-    {% if entries is empty %}
-        <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div>
-    {% else %}
-        {% for entry in entries %}
-            <div id="entry-{{ entry.id|e }}" class="entry">
-                <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>
-                {% if entry.readingTime > 0 %}
-                    <div class="estimatedTime">
-                        <span class="tool reading-time">
-                            {% trans with {'%readingTime%': entry.readingTime } %}estimated reading time: %readingTime% min{% endtrans %}
-                        </span>
-                    </div>
-                {% else %}
-                    <div class="estimatedTime">
-                        <span class="tool reading-time">
-                        {% trans with {'%inferior%': '<small class="inferieur">&lt;</small>'} %}estimated reading time: %inferior% 1 min{% endtrans %}
-                        </span>
-                    </div>
-                {% endif %}
-
-                <ul class="tools links">
-                    <li><a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li>
-                    <li><a title="{% trans %}toggle favorite{% endtrans %}" class="tool icon-star icon {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}toggle favorite{% endtrans %}</span></a></li>
-                    <li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}delete{% endtrans %}</span></a></li>
-                    <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName|removeWww }}</span></a></li>
-                </ul>
-                {% if entry.previewPicture is null %}
-                    <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
-                {% else %}
-                    <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" />
-                {% endif %}
-            </div>
-        {% endfor %}
-    {% endif %}
+    {% for entry in entries %}
+        <div id="entry-{{ entry.id|e }}" class="entry">
+            <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>
+            {% if entry.readingTime > 0 %}
+                <div class="estimatedTime">
+                    <span class="tool reading-time">
+                        {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}
+                    </span>
+                </div>
+            {% else %}
+                <div class="estimatedTime">
+                    <span class="tool reading-time">
+                    {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
+                    </span>
+                </div>
+            {% endif %}
+
+            <ul class="tools links">
+                <li><a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.toogle_as_read'|trans }}</span></a></li>
+                <li><a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool icon-star icon {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.toogle_as_star'|trans }}</span></a></li>
+                <li><a title="{{ 'entry.list.delete'|trans }}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.delete'|trans }}</span></a></li>
+                <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName|removeWww }}</span></a></li>
+            </ul>
+            {% if entry.previewPicture is null %}
+                <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
+            {% else %}
+                <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" />
+            {% endif %}
+        </div>
+    {% endfor %}
 
     <aside id="filter-form" class="">
         <form method="get" action="{{ path('all') }}">
-            <h2>{% trans %}Filters{% endtrans %}</h2>
+            <h2>{{ 'entry.filters.title'|trans }}</h2>
             <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a>
 
             <div id="filter-status" class="filter-group">
                 <div class="">
-                    <label>{% trans %}Status{% endtrans %}</label>
+                    <label>{{ 'entry.filters.status_label'|trans }}</label>
                 </div>
                 <div class="input-field">
                     {{ form_widget(form.isArchived) }}
-                    <label for="entry_filter_isArchived">{% trans %}Archived{% endtrans %}</label>
+                    {{ form_label(form.isArchived) }}
                 </div>
 
                 <div class="input-field">
                     {{ form_widget(form.isStarred) }}
-                    <label for="entry_filter_isStarred">{% trans %}Starred{% endtrans %}</label>
+                    {{ form_label(form.isStarred) }}
                 </div>
 
                 <div class="input-field">
                     {{ form_widget(form.previewPicture) }}
-                    <label for="entry_filter_previewPicture">{% trans %}Has a preview picture{% endtrans %}</label>
+                    {{ form_label(form.previewPicture) }}
                 </div>
             </div>
 
             <div id="filter-language" class="filter-group">
-                <label for="entry_filter_language">{% trans %}Language{% endtrans %}</label>
+                {{ form_label(form.language) }}
                 <div class="input-field ">
                     {{ form_widget(form.language) }}
                 </div>
 
             <div id="filter-reading-time" class="filter-group">
                 <div class="">
-                    <label>{% trans %}Reading time in minutes{% endtrans %}</label>
+                    {{ form_label(form.readingTime) }}
                 </div>
                 <div class="input-field ">
-                    <label for="entry_filter_readingTime_left_number">{% trans %}from{% endtrans %}</label>
+                    <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label>
                     {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }}
                 </div>
                 <div class="input-field ">
-                    <label for="entry_filter_readingTime_right_number">{% trans %}to{% endtrans %}</label>
+                    <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label>
                     {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }}
                 </div>
             </div>
 
             <div id="filter-domain-name" class="filter-group">
-                <label for="entry_filter_domainName">{% trans %}Domain name{% endtrans %}</label>
+                {{ form_label(form.domainName) }}
                 <div class="input-field ">
                     {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }}
                 </div>
 
             <div id="filter-creation-date" class="filter-group">
                 <div class="">
-                    <label>{% trans %}Creation date{% endtrans %}</label>
+                    {{ form_label(form.createdAt) }}
                 </div>
                 <div class="input-field ">
-                    <label for="entry_filter_createdAt_left_date" class="active">{% trans %}from{% endtrans %}</label>
+                    <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label>
                     {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
                 </div>
                 <div class="input-field ">
-                    <label for="entry_filter_createdAt_right_date" class="active">{% trans %}to{% endtrans %}</label>
+                    <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label>
                     {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
                 </div>
             </div>
-            <div id="filter-buttons" class="filter-group">
 
+            <div id="filter-buttons" class="filter-group">
                 <div class="">
-                    <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{% trans %}Clear{% endtrans %}</a>
+                    <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a>
                 </div>
 
-                <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{% trans %}Filters{% endtrans %}</button>
-
-                </div>
+                <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
+            </div>
         </form>
     </aside>
 
index a39a8dc37a5c684112c7a906e5c61a9f00f81384..98f7194cfc82174e30079468caac8b8e600fab9b 100644 (file)
@@ -18,9 +18,9 @@
                 <description>
                     <![CDATA[
                     {%- if entry.readingTime > 0 -%}
-                        {% trans %}estimated reading time :{% endtrans %} {{ entry.readingTime }} min
+                        {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}
                     {%- else -%}
-                        {% trans %}estimated reading time :{% endtrans %} &lt; 1 min
+                        {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
                     {%- endif %}
 
                     {{ entry.content|raw -}}
index 9323e7873aa03a6d399363d64cd1f99125830dce..3cda3949eaecd356c575f365762b1c1d06c377e0 100644 (file)
@@ -5,32 +5,32 @@
 {% block content %}
     <div id="article">
         <header class="mbm">
-            <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{% trans %}Edit title{% endtrans %}">✎</a></h1>
+            <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
         </header>
 
         <div id="article_toolbar">
         <ul class="links">
-            <li class="topPosF"><a href="#top" title="{% trans %}Back to top{% endtrans %}" class="tool top icon icon-arrow-up-thick"><span>{% trans %}Back to top{% endtrans %}</span></a></li>
-            <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.domainName|removeWww }}</span></a></li>
-            <li><a title="{% trans %}Re-fetch content{% endtrans %}" class="tool icon icon-reload" href="{{ path('reload_entry', { 'id': entry.id }) }}"><span>{% trans %}Re-fetch content{% endtrans %}</span></a></li>
-            <li><a title="{% if entry.isArchived == 0 %}{% trans %}Mark as read{% endtrans %}{% else %}{% trans %}Mark as unread{% endtrans %}{% endif %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% if entry.isArchived == 0 %}{% trans %}Mark as read{% endtrans %}{% else %}{% trans %}Mark as unread{% endtrans %}{% endif %}</span></a></li>
-            <li><a title="{% trans %}Favorite{% endtrans %}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle favorite{% endtrans %}</span></a></li>
-            <li><a id="nav-btn-add-tag" title="{% trans %}Add a tag{% endtrans %}"><span>{% trans %}Tag{% endtrans %}</span></a></li>
-            <li><a title="{% trans %}Delete{% endtrans %}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}Delete{% endtrans %}</span></a></li>
-            {% if craue_setting('share_twitter') %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans %}Tweet{% endtrans %}"><span>{% trans %}Tweet{% endtrans %}</span></a></li>{% endif %}
-            {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans %}Email{% endtrans %}"><span>{% trans %}Email{% endtrans %}</span></a></li>{% endif %}
-            {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans %}shaarli{% endtrans %}"><span>{% trans %}shaarli{% endtrans %}</span></a></li>{% endif %}
-            {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="{% trans %}diaspora{% endtrans %}"><span>{% trans %}diaspora{% endtrans %}</span></a></li>{% endif %}
-            {% if craue_setting('carrot') %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="{% trans %}carrot{% endtrans %}"><span>Carrot</span></a></li>{% endif %}
-            {% if craue_setting('show_printlink') %}<li><a title="{% trans %}Print{% endtrans %}" class="tool icon icon-print" href="javascript: window.print();"><span>{% trans %}Print{% endtrans %}</span></a></li>{% endif %}
+            <li class="topPosF"><a href="#top" title="{{ 'entry.view.left_menu.back_to_top'|trans }}" class="tool top icon icon-arrow-up-thick"><span>{{ 'entry.view.left_menu.set_as_read'|trans }}</span></a></li>
+            <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.domainName|removeWww }}</span></a></li>
+            <li><a title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" class="tool icon icon-reload" href="{{ path('reload_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span></a></li>
+            <li><a title="{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}</span></a></li>
+            <li><a title="{{ 'entry.view.left_menu.set_as_favorite'|trans }}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_favorite'|trans }}</span></a></li>
+            <li><a id="nav-btn-add-tag" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li>
+            <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li>
+            {% if craue_setting('share_twitter') %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="Tweet"><span>Tweet</span></a></li>{% endif %}
+            {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %}
+            {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %}
+            {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %}
+            {% if craue_setting('carrot') %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="carrot"><span>Carrot</span></a></li>{% endif %}
+            {% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span></a></li>{% endif %}
             {% if craue_setting('export_epub') %}<li><a href="?epub&amp;method=id&amp;value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %}
             {% if craue_setting('export_mobi') %}<li><a href="?mobi&amp;method=id&amp;value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
             {% if craue_setting('export_pdf') %}<li><a href="?pdf&amp;method=id&amp;value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %}
-            <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans %}Does this article appear wrong?{% endtrans %}" class="tool bad-display icon icon-delete"><span>{% trans %}Does this article appear wrong?{% endtrans %}</span></a></li>
+            <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li>
         </ul>
     </div>
         {% set nbAnnotations = entry.annotations | length %}
-        <span class="tool link mdi-communication-comment"> {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %}</span>
+        <span class="tool link mdi-communication-comment"> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
         <aside class="tags">
             {% for tag in entry.tags %}
                 <span class="mdi-action-label-outline">{{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i>✘</i></a>
index 95ed0785231afa2a384e0281b3b2ff2253e2ed16..03768a3d80a0e2be4839b8a062e400dc062e66e4 100644 (file)
@@ -1,6 +1,6 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}Save new entry{% endtrans %}{% endblock %}
+{% block title %}{{ 'entry.new.page_title'|trans }}{% endblock %}
 
 {% block content %}
     {{ render(controller( "WallabagCoreBundle:Entry:addEntryForm" )) }}
index fa0a9f53f648d58d43b38b57d506c33c65e9e0ab..8c129068103eae45f79d4f723585d2895fd2d594 100644 (file)
@@ -8,7 +8,7 @@
     {% endif %}
 
     {{ form_label(form.url) }}
-    {{ form_widget(form.url) }}
+    {{ form_widget(form.url, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.new.placeholder'} }) }}
 
-    <div class="hidden">{{ form_rest(form) }}</div>
+    {{ form_rest(form) }}
 </form>
index fdd12cf7d085fceadb1284c31b3f2e4597ff73b1..5c0046d1020bce1ff31f11556f5b646f12cc0485 100644 (file)
@@ -1,57 +1,57 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}About{% endtrans %}{% endblock %}
+{% block title %}{{ 'about.page_title'|trans }}{% endblock %}
 
 {% block content %}
-    <h2>{% trans %}Who is behind wallabag{% endtrans %}</h2>
+    <h2>{{ 'about.top_menu.who_behind_wallabag'|trans }}</h2>
 
     <dl>
-        <dt>{% trans %}Developed by{% endtrans %}</dt>
-        <dd><a href="mailto:nicolas@loeuillet.org">Nicolas LÅ“uillet</a> â€” <a href="http://cdetc.fr">{% trans %}website{% endtrans %}</a></dd>
-        <dd>Thomas Citharel â€” <a href="https://tcit.fr">{% trans %}website{% endtrans %}</a></dd>
-        <dd>Jérémy Benoist â€” <a href="http://www.j0k3r.net">{% trans %}website{% endtrans %}</a></dd>
+        <dt>{{ 'about.who_behind_wallabag.developped_by'|trans }}</dt>
+        <dd><a href="mailto:nicolas@loeuillet.org">Nicolas LÅ“uillet</a> â€” <a href="http://cdetc.fr">{{ 'about.who_behind_wallabag.website'|trans }}</a></dd>
+        <dd>Thomas Citharel â€” <a href="https://tcit.fr">{{ 'about.who_behind_wallabag.website'|trans }}</a></dd>
+        <dd>Jérémy Benoist â€” <a href="http://www.j0k3r.net">{{ 'about.who_behind_wallabag.website'|trans }}</a></dd>
 
-        <dt>{% trans %}And many others contributors â™¥{% endtrans %} <a href="https://github.com/wallabag/wallabag/graphs/contributors">{% trans %}on Github{% endtrans %}</a></dt>
+        <dt>{{ 'about.who_behind_wallabag.many_contributors'|trans|raw }}</dt>
 
-        <dt>{% trans %}Project website{% endtrans %}</dt>
+        <dt>{{ 'about.who_behind_wallabag.project_website'|trans }}</dt>
         <dd><a href="https://www.wallabag.org">https://www.wallabag.org</a></dd>
 
-        <dt>{% trans %}License{% endtrans %}: <a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a></dt>
+        <dt>{{ 'about.who_behind_wallabag.license'|trans }}: <a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a></dt>
 
-        <dt>{% trans %}Version{% endtrans %}: {{ version }}</dt>
+        <dt>{{ 'about.who_behind_wallabag.version'|trans }}: {{ version }}</dt>
     </dl>
 
-    <h2>{% trans %}Getting help{% endtrans %}</h2>
+    <h2>{{ 'about.top_menu.getting_help'|trans }}</h2>
 
     <dl>
-        <dt>{% trans %}Documentation{% endtrans %}</dt>
+        <dt>{{ 'about.getting_help.documentation'|trans }}</dt>
         <dd><a href="https://doc.wallabag.org/en">english</a></dd>
         <dd><a href="https://doc.wallabag.org/fr">français</a></dd>
         <dd><a href="https://doc.wallabag.org/de">deutsch</a></dd>
 
-        <dt>{% trans %}Bug reports{% endtrans %}</dt>
-        <dd><a href="https://support.wallabag.org">{% trans %}On our support website{% endtrans %}</a> {% trans %}or{% endtrans %} <a href="https://github.com/wallabag/wallabag/issues">{% trans %}on Github{% endtrans %}</a></dd>
+        <dt>{{ 'about.getting_help.bug_reports'|trans }}</dt>
+        <dd>{{ 'about.getting_help.support'|trans|raw }}</dd>
     </dl>
 
-    <h2>{% trans %}Helping wallabag{% endtrans %}</h2>
+    <h2>{{ 'about.top_menu.helping'|trans }}</h2>
 
-    <p>{% trans %}wallabag is free and opensource. You can help us:{% endtrans %}</p>
+    <p>{{ 'about.helping.description'|trans }}</p>
 
     <dl>
-        <dt>{% trans %}wallabag is free and opensource. You can help us:{% endtrans %}</dt>
-        <dd>by contributing to the project: <a href="https://github.com/wallabag/wallabag/issues/1254">an issue lists all our needs</a></dd>
-        <dd><a href="{{ paypal_url }}">{% trans %}via Paypal{% endtrans %}</a></dd>
+        <dt>{{ 'about.helping.description'|trans }}</dt>
+        <dd>{{ 'about.helping.by_contributing_2'|trans }} <a href="https://github.com/wallabag/wallabag/issues/1254">{{ 'about.helping.by_contributing'|trans }}</a></dd>
+        <dd><a href="{{ paypal_url }}">{{ 'about.helping.by_paypal'|trans }}</a></dd>
     </dl>
 
-    <h2>{% trans %}Contributors{% endtrans %}</h2>
-    <p><a href="https://github.com/wallabag/wallabag/graphs/contributors">{% trans %}Thank you to contributors on wallabag web application{% endtrans %}</a></p>
+    <h2>{{ 'about.top_menu.contributors'|trans }}</h2>
+    <p><a href="https://github.com/wallabag/wallabag/graphs/contributors">{{ 'about.contributors.description'|trans }}</a></p>
 
-    <h2>{% trans %}Third-party libraries{% endtrans %}</h2>
-    <p>{% trans %}Here are the list of third-party libraries used in wallabag (with their licenses):{% endtrans %}</p>
-    <table>
+    <h2>{{ 'about.top_menu.third_party'|trans }}</h2>
+    <p>{{ 'about.third_party.description'|trans }}</p>
+    <table class="striped">
         <tr>
-            <th>{% trans %}Package{% endtrans %}</th>
-            <th>{% trans %}License{% endtrans %}</th>
+            <th>{{ 'about.third_party.package'|trans }}</th>
+            <th>{{ 'about.third_party.license'|trans }}</th>
         </tr>
         <tr><td>behat/transliterator</td><td>Artistic 1.0</td></tr>
         <tr><td>CraueConfigBundle</td><td>MIT</td></tr>
index e32264f3e9b2b21046996a99afea40b075cee714..8da1afa0f8c7c5f89d97993776d9163fc07ea343 100644 (file)
@@ -1,28 +1,28 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}Howto{% endtrans %}{% endblock %}
+{% block title %}{{ 'howto.page_title'|trans }}{% endblock %}
 
 {% block content %}
-    <h2>{% trans %}Howto{% endtrans %}</h2>
+    <h2>{{ 'howto.page_title'|trans }}</h2>
 
-    <p>{% trans %}There are several ways to save an article:{% endtrans %}</p>
+    <p>{{ 'howto.page_description'|trans }}</p>
     <ul>
-        <li><a href="{{ path('new') }}">{% trans %}Thanks to this form{% endtrans %}</a></li>
+        <li><a href="{{ path('new') }}">{{ 'howto.form.description'|trans }}</a></li>
     </ul>
-    <h3>{% trans %}Browser Addons{% endtrans %}</h3>
+    <h3>{{ 'howto.top_menu.browser_addons'|trans }}</h3>
     <ul>
-        <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{% trans %}Standard Firefox Add-On{% endtrans %}</a></li>
-        <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{% trans %}Chrome Extension{% endtrans %}</a></li>
+        <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
+        <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
     </ul>
-    <h3>{% trans %}Mobile Apps{% endtrans %}</h3>
+    <h3>{{ 'howto.top_menu.mobile_apps'|trans }}</h3>
     <ul>
-        <li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">via F-Droid</a> {% trans %} or {% endtrans %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">via Google Play</a></li>
-        <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
-        <li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
+        <li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
+        <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
+        <li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
     </ul>
-    <h3>{% trans %}Bookmarklet{% endtrans %}</h3>
+    <h3>{{ 'howto.top_menu.bookmarklet'|trans }}</h3>
     <p>
-    {% trans %}Drag &amp; drop this link to your bookmarks bar:{% endtrans %}
+    {{ 'howto.bookmarklet.description'|trans }}
     {% include 'WallabagCoreBundle::_bookmarklet.html.twig' %}
 
 {% endblock %}
index 6b008fca6305c03ffa5e66f9c1e99b58600e2b96..5f65ce151d53dcb2e0700eb6278a07a09d48f361 100644 (file)
@@ -1,55 +1,66 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}Quickstart{% endtrans %}{% endblock %}
+{% block title %}{{ 'quickstart.page_title'|trans }}{% endblock %}
 
 {% block content %}
 
-    <h3>{% trans %}Welcome to wallabag!{% endtrans %}</h3>
-    <p>{% trans %}We'll accompany you to visit wallabag and show you some features which can interess you.{% endtrans %}</p>
-    <p>{% trans %}Follow us!{% endtrans %}</p>
-    <h4>{% trans %}Configure the application{% endtrans %}</h4>
+    <h3>{{ 'quickstart.intro.title'|trans }}</h3>
+    <p>{{ 'quickstart.intro.paragraph_1'|trans }}</p>
+    <p>{{ 'quickstart.intro.paragraph_2'|trans }}</p>
+
+    <h4>{{ 'quickstart.configure.title'|trans }}</h4>
     <ul>
-        <li><a href="{{ path('config') }}">{% trans %}Change language and design{% endtrans %}</a></li>
-        <li><a href="{{ path('config') }}#set2">{% trans %}Enable RSS feeds{% endtrans %}</a></li>
-        <li><a href="{{ path('config') }}#set5">{% trans %}Write rules to automatically tag your articles{% endtrans %}</a></li>
+        <li><a href="{{ path('config') }}">{{ 'quickstart.configure.language'|trans }}</a></li>
+        <li><a href="{{ path('config') }}#set2">{{ 'quickstart.configure.rss'|trans }}</a></li>
+        <li><a href="{{ path('config') }}#set5">{{ 'quickstart.configure.tagging_rules'|trans }}</a></li>
     </ul>
+
     {% if is_granted('ROLE_SUPER_ADMIN') %}
-        <h4>{% trans %}Administration{% endtrans %}</h4>
-        <p>{% trans %}As a administrator, you have privileges on wallabag. You can:{% endtrans %}</p>
-        <ul>
-            <li><a href="{{ path('config') }}#set6">{% trans %}Create a new user{% endtrans %}</a></li>
-            <li><a href="{{ path('craue_config_settings_modify') }}#set-analytics">{% trans %}Configure analytics{% endtrans %}</a></li>
-            <li><a href="{{ path('craue_config_settings_modify') }}#set-entry">{% trans %}Enable some parameters about article sharing{% endtrans %}</a></li>
-            <li><a href="{{ path('craue_config_settings_modify') }}#set-export">{% trans %}Configure export{% endtrans %}</a></li>
-            <li><a href="{{ path('craue_config_settings_modify') }}#set-import">{% trans %}Configure import{% endtrans %}</a></li>
-        </ul>
+    <h4>{{ 'quickstart.admin.title'|trans }}</h4>
+    <p>{{ 'quickstart.admin.description'|trans }}</p>
+    <ul>
+        <li><a href="{{ path('config') }}#set6">{{ 'quickstart.admin.new_user'|trans }}</a></li>
+        <li><a href="{{ path('craue_config_settings_modify') }}#set-analytics">{{ 'quickstart.admin.analytics'|trans }}</a></li>
+        <li><a href="{{ path('craue_config_settings_modify') }}#set-entry">{{ 'quickstart.admin.sharing'|trans }}</a></li>
+        <li><a href="{{ path('craue_config_settings_modify') }}#set-export">{{ 'quickstart.admin.export'|trans }}</a></li>
+        <li><a href="{{ path('craue_config_settings_modify') }}#set-import">{{ 'quickstart.admin.import'|trans }}</a></li>
+    </ul>
     {% endif %}
-    <h4>{% trans %}First steps{% endtrans %}</h4>
+
+    <h4>{{ 'quickstart.first_steps.title'|trans }}</h4>
     <ul>
-        <li><a href="{{ path('new') }}">{% trans %}Save your first article{% endtrans %}</a></li>
-        <li><a href="{{ path('unread') }}">{% trans %}And classify it!{% endtrans %}</a></li>
+        <li><a href="{{ path('new') }}">{{ 'quickstart.first_steps.new_article'|trans }}</a></li>
+        <li><a href="{{ path('unread') }}">{{ 'quickstart.first_steps.unread_articles'|trans }}</a></li>
     </ul>
-    <h4>{% trans %}Migrate from an existing service{% endtrans %}</h4>
-    <p>{% trans %}You're using an other service? We'll help you to retrieve your data on wallabag.{% endtrans %}</p>
+
+    <h4>{{ 'quickstart.migrate.title'|trans }}</h4>
+    <p>{{ 'quickstart.migrate.description'|trans }}</p>
     <ul>
-        <li><a href="{{ path('import_pocket') }}">{% trans %}Migrate from Pocket{% endtrans %}</a></li>
-        <li><a href="{{ path('import_wallabag_v1') }}">{% trans %}Migrate from wallabag v1{% endtrans %}</a></li>
-        <li><a href="{{ path('import_wallabag_v2') }}">{% trans %}Migrate from wallabag v2{% endtrans %}</a></li>
+        <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li>
+        <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li>
+        <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li>
     </ul>
-    <h4>{% trans %}Full documentation{% endtrans %}</h4>
+
+    <h4>{{ 'quickstart.developer.title'|trans }}</h4>
     <ul>
-        <li><a href="http://doc.wallabag.org/en/v2/user/annotations.html">{% trans %}Annotate your article{% endtrans %}</a></li>
-        <li><a href="http://doc.wallabag.org/en/v2/user/download_articles.html">{% trans %}Convert your articles into ePUB or PDF{% endtrans %}</a></li>
-        <li><a href="http://doc.wallabag.org/en/v2/user/filters.html">{% trans %}See how you can look for an article by using search engine and filters{% endtrans %}</a></li>
-        <li><a href="http://doc.wallabag.org/en/v2/user/errors_during_fetching.html">{% trans %}What can I do if an article encounters errors during fetching?{% endtrans %}</a></li>
-        <li><a href="http://doc.wallabag.org/">{% trans %}And so many other articles!{% endtrans %}</a></li>
+        <li><a href="{{ path('developer') }}">{{ 'quickstart.developer.create_application'|trans }}</a></li>
     </ul>
-    <h4>{% trans %}Support{% endtrans %}</h4>
-    <p>{% trans %}If you need some help, we are here for you.{% endtrans %}</p>
+
+    <h4>{{ 'quickstart.docs.title'|trans }}</h4>
+    <ul>
+        <li><a href="http://doc.wallabag.org/en/v2/user/annotations.html">{{ 'quickstart.docs.annotate'|trans }}</a></li>
+        <li><a href="http://doc.wallabag.org/en/v2/user/download_articles.html">{{ 'quickstart.docs.export'|trans }}</a></li>
+        <li><a href="http://doc.wallabag.org/en/v2/user/filters.html">{{ 'quickstart.docs.search_filters'|trans }}</a></li>
+        <li><a href="http://doc.wallabag.org/en/v2/user/errors_during_fetching.html">{{ 'quickstart.docs.fetching_errors'|trans }}</a></li>
+        <li><a href="http://doc.wallabag.org/">{{ 'quickstart.docs.all_docs'|trans }}</a></li>
+    </ul>
+
+    <h4>{{ 'quickstart.support.title'|trans }}</h4>
+    <p>{{ 'quickstart.support.description'|trans }}</p>
     <ul>
-        <li><a href="https://github.com/wallabag/wallabag/issues/">{% trans %}On GitHub{% endtrans %}</a></li>
-        <li><a href="mailto:hello@wallabag.org">{% trans %}By email{% endtrans %}</a></li>
-        <li><a href="https://gitter.im/wallabag/wallabag">{% trans %}On Gitter{% endtrans %}</a></li>
+        <li><a href="https://github.com/wallabag/wallabag/issues/">{{ 'quickstart.support.github'|trans }}</a></li>
+        <li><a href="mailto:hello@wallabag.org">{{ 'quickstart.support.email'|trans }}</a></li>
+        <li><a href="https://gitter.im/wallabag/wallabag">{{ 'quickstart.support.gitter'|trans }}</a></li>
     </ul>
 
 {% endblock %}
index ade7f56d7f7943959e21d1389f86f0efa4168a28..6e552560ec14c2a491e08bcd6c3b9b071ddc5cc7 100644 (file)
@@ -8,7 +8,6 @@
     {% endif %}
 
     {{ form_widget(form.label, { 'attr': {'autocomplete': 'off'} }) }}
-    {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'}, 'label': 'add tag' }) }}
 
-    <div class="hidden">{{ form_rest(form) }}</div>
+    {{ form_rest(form) }}
 </form>
index c2a461b83d7f0c4f03a48e7e1a20377d907ad901..dfc6175132e217440f9211d0d9b64871dc377e49 100644 (file)
@@ -1,13 +1,15 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title "Tags" %}
+{% block title %}{{ 'tag.page_title'|trans }}{% endblock %}
 
 {% block content %}
-    {% if tags is empty %}
-        <div class="messages warning"><p>{% trans %}No tags found.{% endtrans %}</p></div>
-    {% else %}
-        {% for tag in tags %}
-            {{tag.label}}
-        {% endfor %}
-    {% endif %}
+    <div class="results">
+        <div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div>
+    </div>
+
+    <ul>
+    {% for tag in tags %}
+        <li id="tag-{{ tag.id|e }}">{{tag.label}} ({{ tag.entries.getValues | length }})</li>
+    {% endfor %}
+    </ul>
 {% endblock %}
index 7f0980660298d4f170a985746550eaa0c1a180df..0ce06962508d5930cef8190bd9164cd147b58b06 100644 (file)
 {% block menu %}
     <button id="menu" class="icon icon-menu desktopHide"><span>Menu</span></button>
     <ul id="links" class="links">
-        <li><a href="{{ path('unread') }}">{% trans %}unread{% endtrans %}</a></li>
-        <li><a href="{{ path('starred') }}">{% trans %}favorites{% endtrans %}</a></li>
-        <li><a href="{{ path('archive') }}">{% trans %}archive{% endtrans %}</a></li>
-        <li><a href="{{ path('all') }}">{% trans %}all{% endtrans %}</a></li>
-        <li><a href="{{ path('tag') }}">{% trans %}tags{% endtrans %}</a></li>
-        <li><a href="{{ path('new') }}">{% trans %}save a link{% endtrans %}</a></li>
-        <li style="position: relative;"><a href="javascript: void(null);" id="search">{% trans %}search{% endtrans %}</a>
+        <li><a href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }}</a></li>
+        <li><a href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }}</a></li>
+        <li><a href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }}</a></li>
+        <li><a href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }}</a></li>
+        <li><a href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }}</a></li>
+        <li><a href="{{ path('new') }}">{{ 'menu.left.save_link'|trans }}</a></li>
+        <li style="position: relative;"><a href="javascript: void(null);" id="search">{{ 'menu.left.search'|trans }}</a>
             <div id="search-form" class="messages info popup-form">
                 <form method="get" action="index.php">
-                    <h2>{% trans %}Search{% endtrans %}</h2>
+                    <h2>{{ 'menu.left.search'|trans }}</h2>
                     <a href="javascript: void(null);" id="search-form-close" class="close-button--popup close-button">&times;</a>
                     <input type="hidden" name="view" value="search">
-                    <input required placeholder="{% trans %}Enter your search here{% endtrans %}" type="text" name="search" id="searchfield"><br>
-                    <input id="submit-search" type="submit" value="{% trans %}Search{% endtrans %}">
+                    <input required placeholder="{{ 'menu.search_form.input_label'|trans }}" type="text" name="search" id="searchfield"><br>
+                    <input id="submit-search" type="submit" value="{{ 'menu.left.search'|trans }}">
                 </form>
             </div>
         </li>
-        <li><a href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li>
+        <li><a href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a></li>
         {% if is_granted('ROLE_SUPER_ADMIN') %}
-            <li><a href="{{ path('craue_config_settings_modify') }}">{% trans %}internal settings{% endtrans %}</a></li>
+            <li><a href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a></li>
         {% endif %}
-        <li><a href="{{ path('import') }}">{% trans %}import{% endtrans %}</a></li>
-        <li><a href="{{ path('howto') }}">{% trans %}howto{% endtrans %}</a></li>
-        <li><a href="{{ path('developer') }}">{% trans %}Developer{% endtrans %}</a></li>
-        <li><a href="{{ path('about') }}">{% trans %}about{% endtrans %}</a></li>
-        <li><a class="icon icon-power" href="{{ path('fos_user_security_logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
+        <li><a href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a></li>
+        <li><a href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a></li>
+        <li><a href="{{ path('developer') }}">{{ 'menu.left.developer'|trans }}</a></li>
+        <li><a href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a></li>
+        <li><a class="icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a></li>
     </ul>
 {% endblock %}
 
@@ -73,6 +73,6 @@
 
 {% block footer %}
     <footer class="w600p center mt3 mb3 smaller txtright">
-        <p>{% trans %}powered by{% endtrans %} <a href="http://wallabag.org">wallabag</a></p>
+        <p>{{ 'footer.wallabag.powered_by'|trans }} <a href="http://wallabag.org">wallabag</a></p>
     </footer>
 {% endblock %}
index 2b0b08289e935e233648b5554ec0de5d536d420a..698219b9ea54c0d13a910b33ff46d394177e2038 100644 (file)
@@ -1,6 +1,6 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}config{% endtrans %}{% endblock %}
+{% block title %}{{ 'config.page_title'|trans }}{% endblock %}
 
 {% block content %}
 
                 <div class="row">
                     <div class="div_tabs col s12">
                         <ul class="tabs">
-                            <li class="tab col s3"><a class="active" href="#set1">{% trans %}Settings{% endtrans %}</a></li>
-                            <li class="tab col s3"><a href="#set2">{% trans %}RSS{% endtrans %}</a></li>
-                            <li class="tab col s3"><a href="#set3">{% trans %}User information{% endtrans %}</a></li>
-                            <li class="tab col s3"><a href="#set4">{% trans %}Password{% endtrans %}</a></li>
-                            <li class="tab col s3"><a href="#set5">{% trans %}Tagging rules{% endtrans %}</a></li>
+                            <li class="tab col s3"><a class="active" href="#set1">{{ 'config.tab_menu.settings'|trans }}</a></li>
+                            <li class="tab col s3"><a href="#set2">{{ 'config.tab_menu.rss'|trans }}</a></li>
+                            <li class="tab col s3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li>
+                            <li class="tab col s3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li>
+                            <li class="tab col s3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li>
                             {% if is_granted('ROLE_SUPER_ADMIN') %}
-                            <li class="tab col s3"><a href="#set6">{% trans %}Add a user{% endtrans %}</a></li>
+                            <li class="tab col s3"><a href="#set6">{{ 'config.tab_menu.new_user'|trans }}</a></li>
                             {% endif %}
                         </ul>
                     </div>
@@ -28,9 +28,9 @@
 
                             <div class="row">
                                 <div class="input-field col s12">
+                                    {{ form_label(form.config.theme) }}
                                     {{ form_errors(form.config.theme) }}
                                     {{ form_widget(form.config.theme) }}
-                                    <label class="required">{% trans %}Theme{% endtrans %}</label>
                                 </div>
                             </div>
 
                                 </div>
                             </div>
 
-                            <div class="hidden">{{ form_rest(form.config) }}</div>
-                            <button class="btn waves-effect waves-light" type="submit" name="action">
-                                {% trans %}Save{% endtrans %}
-                            </button>
+                            {{ form_widget(form.config.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
+                            {{ form_rest(form.config) }}
                         </form>
                     </div>
 
 
                             <div class="row">
                                 <div class="input-field col s12">
-                                    {% trans %}RSS feeds provided by wallabag allow you to read your saved articles with your favourite RSS reader. You need to generate a token first.{% endtrans %}
+                                    {{ 'config.form_rss.description'|trans }}
                                 </div>
                             </div>
 
                             <div class="row">
                                 <div class="input-field col s12">
-                                    <label>{% trans %}RSS token{% endtrans %}</label>
+                                    <label>{{ 'config.form_rss.token_label'|trans }}</label>
                                     <div>
                                         {% if rss.token %}
                                             {{ rss.token }}
                                         {% else %}
-                                            <em>{% trans %}No token{% endtrans %}</em>
+                                            <em>{{ 'config.form_rss.no_token'|trans }}</em>
                                         {% endif %}
-                                        â€“ <a href="{{ path('generate_token') }}">{% if rss.token %}{% trans %}Reset your token{% endtrans %}{% else %}{% trans %}Create your token{% endtrans %}{% endif %}</a>
+                                        â€“ <a href="{{ path('generate_token') }}">
+                                        {% if rss.token %}
+                                            {{ 'config.form_rss.token_reset'|trans }}
+                                        {% else %}
+                                            {{ 'config.form_rss.token_create'|trans }}
+                                        {% endif %}</a>
                                     </div>
                                 </div>
                             </div>
                             {% if rss.token %}
                             <div class="row">
                                 <div class="input-field col s12">
-                                    <label>{% trans %}RSS links{% endtrans %}</label>
-                                        <ul>
-                                            <li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">{% trans %}unread{% endtrans %}</a></li>
-                                            <li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">{% trans %}starred{% endtrans %}</a></li>
-                                            <li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">{% trans %}archive{% endtrans %}</a></li>
-                                        </ul>
-
+                                    <label>{{ 'config.form_rss.rss_links'|trans }}</label>
+                                    <ul>
+                                        <li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.unread'|trans }}</a></li>
+                                        <li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.starred'|trans }}</a></li>
+                                        <li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.archive'|trans }}</a></li>
+                                    </ul>
                                 </div>
                             </div>
                             {% endif %}
                                 </div>
                             </div>
 
-                            <div class="hidden">{{ form_rest(form.rss) }}</div>
-                            <button class="btn waves-effect waves-light" type="submit" name="action">
-                                {% trans %}Save{% endtrans %}
-                            </button>
-
+                            {{ form_widget(form.rss.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
+                            {{ form_rest(form.rss) }}
                         </form>
                     </div>
 
                             {% if twofactor_auth %}
                             <div class="row">
                                 <div class="input-field col s12">
-                                    {% 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 }}
                                 </div>
                             </div>
 
                             </div>
                             {% endif %}
 
-                            <div class="hidden">{{ form_rest(form.user) }}</div>
-                            <button class="btn waves-effect waves-light" type="submit" name="action">
-                                {% trans %}Save{% endtrans %}
-                            </button>
-
+                            {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
+                            {{ form_rest(form.user) }}
                         </form>
                     </div>
 
                                 </div>
                             </div>
 
-                            <div class="hidden">{{ form_rest(form.pwd) }}</div>
-                            <button class="btn waves-effect waves-light" type="submit" name="action">
-                                {% trans %}Save{% endtrans %}
-                            </button>
-
+                            {{ form_widget(form.pwd.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
+                            {{ form_rest(form.pwd) }}
                         </form>
                     </div>
 
                                 <ul>
                                     {% for tagging_rule in app.user.config.taggingRules %}
                                     <li>
-                                        if Â« {{ tagging_rule.rule }} Â» then tag as Â« {{ tagging_rule.tags|join(', ') }} Â»
-                                        <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{% trans %}Delete{% endtrans %}">
+                                        {{ 'config.form_rules.if_label'|trans }}
+                                        Â« {{ tagging_rule.rule }} Â»
+                                        {{ 'config.form_rules.then_tag_as_label'|trans }}
+                                        Â« {{ tagging_rule.tags|join(', ') }} Â»
+                                        <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}">
                                             <i class="tool grey-text delete mdi-action-delete"></i>
                                         </a>
                                     </li>
                                 </div>
                             </div>
 
-                            <div class="hidden">{{ form_rest(form.new_tagging_rule) }}</div>
-                            <button class="btn waves-effect waves-light" type="submit" name="action">
-                                {% trans %}Save{% endtrans %}
-                            </button>
+                            {{ form_widget(form.new_tagging_rule.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
+                            {{ form_rest(form.new_tagging_rule) }}
                         </form>
 
                         <div class="row">
                             <div class="input-field col s12">
-                                <h4>{% trans %}FAQ{% endtrans %}</h4>
+                                <h4>{{ 'config.form_rules.faq.title'|trans }}</h4>
 
-                                <h5>{% trans %}What does Â« tagging rules Â» mean?{% endtrans %}</h5>
-                                <p class="help">
-                                    {% trans %}
-                                    They are rules used by Wallabag to automatically tag new entries.<br />Each time a new entry is added, all the tagging rules will be used to add the tags you configured, thus saving you the trouble to manually classify your entries.
-                                    {% endtrans %}
-                                </p>
+                                <h5>{{ 'config.form_rules.faq.tagging_rules_definition_title'|trans }}</h5>
+                                <p class="help">{{ 'config.form_rules.faq.tagging_rules_definition_description'|trans|raw }}</p>
 
-                                <h5>{% trans %}How do I use them?{% endtrans %}</h5>
-                                <p class="help">
-                                    {% trans %}
-                                    Let assume you want to tag new entries as Â« <i>short reading</i> Â» when the reading time is inferior to 3 minutes.<br />In that case, you should put Â« readingTime &lt;= 3 Â» in the <i>Rule</i> field and Â« <i>short reading</i> Â» in the <i>Tags</i> field.<br />Several tags can added simultaneously by separating them by a comma: Â« <i>short reading, must read</i> Â»<br />Complex rules can be written by using predefined operators: if Â« <i>readingTime &gt;= 5 AND domainName = "github.com"</i> Â» then tag as Â« <i>long reading, github </i> Â»
-                                    {% endtrans %}
-                                </p>
+                                <h5>{{ 'config.form_rules.faq.how_to_use_them_title'|trans }}</h5>
+                                <p class="help">{{ 'config.form_rules.faq.how_to_use_them_description'|trans|raw }}</p>
 
-                                <h5>{% trans %}Which variables and operators can I use to write rules?{% endtrans %}</h5>
+                                <h5>{{ 'config.form_rules.faq.variables_available_title'|trans }}</h5>
                                 <p class="help">
-                                    {% trans %}The following variables and operators can be used to create tagging rules:{% endtrans %}
+                                    {{ 'config.form_rules.faq.variables_available_description'|trans }}
 
-                                    <table>
+                                    <table class="bordered">
                                         <thead>
                                             <tr>
-                                                <th>{% trans %}Variable{% endtrans %}</th>
-                                                <th>{% trans %}Meaning{% endtrans %}</th>
-                                                <th>{% trans %}Operator{% endtrans %}</th>
-                                                <th>{% trans %}Meaning{% endtrans %}</th>
+                                                <th>{{ 'config.form_rules.faq.variable_description.label'|trans }}</th>
+                                                <th>{{ 'config.form_rules.faq.meaning'|trans }}</th>
+                                                <th>{{ 'config.form_rules.faq.operator_description.label'|trans }}</th>
+                                                <th>{{ 'config.form_rules.faq.meaning'|trans }}</th>
                                             </tr>
                                         </thead>
 
                                         <tbody>
                                             <tr>
                                                 <td>title</td>
-                                                <td>{% trans %}Title of the entry{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.variable_description.title'|trans }}</td>
                                                 <td>&lt;=</td>
-                                                <td>{% trans %}Less than…{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.operator_description.less_than'|trans }}</td>
                                             </tr>
                                             <tr>
                                                 <td>url</td>
-                                                <td>{% trans %}URL of the entry{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.variable_description.url'|trans }}</td>
                                                 <td>&lt;</td>
-                                                <td>{% trans %}Strictly less than…{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.operator_description.strictly_less_than'|trans }}</td>
                                             </tr>
                                             <tr>
                                                 <td>isArchived</td>
-                                                <td>{% trans %}Whether the entry is archived or not{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.variable_description.isArchived'|trans }}</td>
                                                 <td>=&gt;</td>
-                                                <td>{% trans %}Greater than…{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.operator_description.greater_than'|trans }}</td>
                                             </tr>
                                             <tr>
                                                 <td>isStarred</td>
-                                                <td>{% trans %}Whether the entry is starred or not{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.variable_description.isStarred'|trans }}</td>
                                                 <td>&gt;</td>
-                                                <td>{% trans %}Strictly greater than…{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.operator_description.strictly_greater_than'|trans }}</td>
                                             </tr>
                                             <tr>
                                                 <td>content</td>
-                                                <td>{% trans %}The entry's content{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.variable_description.content'|trans }}</td>
                                                 <td>=</td>
-                                                <td>{% trans %}Equal to…{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.operator_description.equal_to'|trans }}</td>
                                             </tr>
                                             <tr>
                                                 <td>language</td>
-                                                <td>{% trans %}The entry's language{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.variable_description.language'|trans }}</td>
                                                 <td>!=</td>
-                                                <td>{% trans %}Not equal to…{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.operator_description.not_equal_to'|trans }}</td>
                                             </tr>
                                             <tr>
                                                 <td>mimetype</td>
-                                                <td>{% trans %}The entry's mime-type{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.variable_description.mimetype'|trans }}</td>
                                                 <td>OR</td>
-                                                <td>{% trans %}One rule or another{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.operator_description.or'|trans }}</td>
                                             </tr>
                                             <tr>
                                                 <td>readingTime</td>
-                                                <td>{% trans %}The estimated entry's reading time, in minutes{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.variable_description.readingTime'|trans }}</td>
                                                 <td>AND</td>
-                                                <td>{% trans %}One rule and another{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.operator_description.and'|trans }}</td>
                                             </tr>
                                             <tr>
                                                 <td>domainName</td>
-                                                <td>{% trans %}The domain name of the entry{% endtrans %}</td>
+                                                <td>{{ 'config.form_rules.faq.variable_description.domainName'|trans }}</td>
                                                 <td>matches</td>
-                                                <td>
-                                                    {% trans %}
-                                                    Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>
-                                                    {% endtrans %}
-                                                </td>
+                                                <td>{{ 'config.form_rules.faq.operator_description.matches'|trans|raw }}</td>
                                             </tr>
                                         </tbody>
                                     </table>
                                 </div>
                             </div>
 
-                            <div class="hidden">{{ form_rest(form.new_user) }}</div>
-                            <button class="btn waves-effect waves-light" type="submit" name="action">
-                                {% trans %}Add a user{% endtrans %}
-                            </button>
-
+                            {{ form_widget(form.new_user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
+                            {{ form_rest(form.new_user) }}
                         </form>
                     </div>
                     {% endif %}
index c002c4c35e87e1e6d5296aa297a7f095430b57da..1c5e2aab55db0df0e4b414d47e21a5e1e0097bbd 100644 (file)
@@ -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 %}
 
@@ -10,7 +10,6 @@
 
                 <form name="entry" method="post" action="">
                     <div class="card-content">
-
                         {% if form_errors(form) %}
                             <span class="black-text">{{ form_errors(form) }}</span>
                         {% endif %}
                             {{ form_widget(form.title) }}
                         </div>
 
+                        <div class="input-field s12">
+                            {{ form_label(form.url) }}
+                            {{ form_widget(form.url) }}
+                        </div>
+
                         <div class="input-field s12">
                             {{ form_widget(form.is_public) }}
                             {{ form_label(form.is_public) }}
                         </div>
                         <br>
-                        <button class="btn waves-effect waves-light" type="submit" name="entry[save]">
-                            {% trans %}Save{% endtrans %}
-                            <i class="mdi-content-send right"></i>
-                        </button>
+
+                        {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
                     </div>
-                    <div class="hidden">{{ form_rest(form) }}</div>
+                    {{ form_rest(form) }}
                 </form>
 
             </div>
index 371992df41aad59aea17aebf337e06f475c52559..433b1caeb5218bb1598e25835661fa3d22bff2ea 100644 (file)
@@ -4,13 +4,13 @@
   {% set currentRoute = app.request.attributes.get('_route') %}
 
   {% if currentRoute == 'starred' %}
-    {% trans %}starred{% endtrans %}
+    {{ 'entry.page_titles.starred'|trans }}
   {% elseif currentRoute == 'archive' %}
-    {% trans %}archive{% endtrans %}
+    {{ 'entry.page_titles.archived'|trans }}
   {% elseif currentRoute == 'all' %}
-    {% trans %}Filtered{% endtrans %}
+    {{ 'entry.page_titles.filtered'|trans }}
   {% else %}
-    {% trans %}unread{% endtrans %}
+    {{ 'entry.page_titles.unread'|trans }}
   {% endif %}
 
 {% endblock %}
@@ -18,7 +18,9 @@
 {% block content %}
     {% block pager %}
     <div class="results clearfix">
-        <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>
+        <div class="nb-results left">
+            {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
+        </div>
         <ul class="pagination right">
             {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
                 <li class="{{ currentPage == p ? 'active':'waves-effect'}}">
@@ -52,9 +54,9 @@
                                 <span class="tool reading-time">
                                     {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
                                     {% if readingTime > 0 %}
-                                        {% trans with {'%readingTime%': readingTime } %}estimated reading time: %readingTime% min{% endtrans %}
+                                        {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime}) }}
                                     {% else %}
-                                        {% trans with {'%inferior%': '<small class="inferieur">&lt;</small>'} %}estimated reading time: %inferior% 1 min{% endtrans %}
+                                        {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
                                     {% endif %}
                                 </span>
                             </div>
@@ -72,7 +74,7 @@
 
                             <div class="estimatedTime grey-text">
                                 <span class="tool reading-time">
-                                    {% trans %}estimated reading time{% endtrans %}:
+                                    {{ 'entry.list.reading_time'|trans }}
                                     {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur">&lt;</small> 1{% endif %} min
                                 </span>
                             </div>
                     {% endif %}
 
                     <div class="card-action">
-                        <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>
+                        <span class="bold">
+                            <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>
+                        </bold>
 
                         <ul class="tools links right">
                             <li>
-                                <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>
-                                <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>
-                                <a title="{% trans %}Delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a>
+                                <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>
+                                <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>
+                                <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a>
                             </li>
                         </ul>
                     </div>
     {% if currentRoute == 'homepage' %}
         {% set currentRoute = 'unread' %}
     {% endif %}
-        <h4 class="center">{% trans %}Export{% endtrans %}</h4>
+        <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4>
         <ul>
             {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">EPUB</a></li>{% endif %}
             {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">MOBI</a></li>{% endif %}
     <div id="filters" class="side-nav fixed right-aligned">
         <form action="{{ path('all') }}">
 
-            <h4 class="center">{% trans %}Filters{% endtrans %}</h4>
+            <h4 class="center">{{ 'entry.filters.title'|trans }}</h4>
 
             <div class="row">
                 <div class="col s12">
-                    <label>{% trans %}Status{% endtrans %}</label>
+                    <label>{{ 'entry.filters.status_label'|trans }}</label>
                 </div>
 
                 <div class="input-field col s6 with-checkbox">
                     {{ form_widget(form.isArchived) }}
-                    <label for="entry_filter_isArchived">{% trans %}Archived{% endtrans %}</label>
+                    {{ form_label(form.isArchived) }}
                 </div>
 
                 <div class="input-field col s6 with-checkbox">
                     {{ form_widget(form.isStarred) }}
-                    <label for="entry_filter_isStarred">{% trans %}Starred{% endtrans %}</label>
+                    {{ form_label(form.isStarred) }}
                 </div>
 
                 <div class="col s12">
-                    <label>{% trans %}Preview picture{% endtrans %}</label>
+                    <label>{{ 'entry.filters.preview_picture_help'|trans }}</label>
                 </div>
 
                 <div class="input-field col s12 with-checkbox">
                     {{ form_widget(form.previewPicture) }}
-                    <label for="entry_filter_previewPicture">{% trans %}Has a preview picture{% endtrans %}</label>
+                    {{ form_label(form.previewPicture) }}
                 </div>
 
                 <div class="col s12">
-                    <label>{% trans %}Language{% endtrans %}</label>
+                    {{ form_label(form.language) }}
                 </div>
 
                 <div class="input-field col s12">
                 </div>
 
                 <div class="col s12">
-                    <label>{% trans %}Reading time in minutes{% endtrans %}</label>
+                    {{ form_label(form.readingTime) }}
                 </div>
                 <div class="input-field col s6">
                     {{ form_widget(form.readingTime.left_number, {'type': 'number'}) }}
-                    <label for="entry_filter_readingTime_left_number">{% trans %}from{% endtrans %}</label>
+                    <label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label>
                 </div>
                 <div class="input-field col s6">
                     {{ form_widget(form.readingTime.right_number, {'type': 'number'}) }}
-                    <label for="entry_filter_readingTime_right_number">{% trans %}to{% endtrans %}</label>
+                    <label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label>
                 </div>
 
                 <div class="input-field col s12">
-                    {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com' | trans} }) }}
-                    <label for="entry_filter_domainName">{% trans %}Domain name{% endtrans %}</label>
+                    {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }}
+                    {{ form_label(form.domainName) }}
                 </div>
 
                 <div class="col s12">
-                    <label>{% trans %}Creation date{% endtrans %}</label>
+                    {{ form_label(form.createdAt) }}
                 </div>
 
                 <div class="input-field col s6">
                     {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }}
-                    <label for="entry_filter_createdAt_left_date" class="active">{% trans %}from{% endtrans %}</label>
+                    <label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label>
                 </div>
                 <div class="input-field col s6">
                     {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }}
-                    <label for="entry_filter_createdAt_right_date" class="active">{% trans %}to{% endtrans %}</label>
+                    <label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label>
                 </div>
 
                 <div class="col s6">
-                    <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{% trans %}Clear{% endtrans %}</a>
+                    <a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a>
                 </div>
 
                 <div class="col s6">
-                    <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{% trans %}Filter{% endtrans %}</button>
+                    <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
                 </div>
-
             </div>
 
         </form>
index a39a8dc37a5c684112c7a906e5c61a9f00f81384..98f7194cfc82174e30079468caac8b8e600fab9b 100644 (file)
@@ -18,9 +18,9 @@
                 <description>
                     <![CDATA[
                     {%- if entry.readingTime > 0 -%}
-                        {% trans %}estimated reading time :{% endtrans %} {{ entry.readingTime }} min
+                        {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}
                     {%- else -%}
-                        {% trans %}estimated reading time :{% endtrans %} &lt; 1 min
+                        {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
                     {%- endif %}
 
                     {{ entry.content|raw -}}
index 6f33da23c1cf0ca9778793aff0e5c8c5f7bc5050..4eebf18fb370edd4b2d66ae8ac25412b7226c725 100644 (file)
@@ -2,6 +2,8 @@
 
 {% block title %}{{ entry.title|raw }} ({{ entry.domainName|removeWww }}){% endblock %}
 
+{% block body_class %}entry{% endblock %}
+
 {% block menu %}
     <div class="progress">
         <div class="determinate"></div>
             </ul>
             <ul class="right">
                 <li>
-                    <a class="waves-effect" title="{% trans %}Mark as read{% endtrans %}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead">
+                    <a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_read'|trans }}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead">
                         <i class="{% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %} small"></i>
                     </a>
                 </li>
                 <li>
-                    <a class="waves-effect" title="{% trans %}Favorite{% endtrans %}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
+                    <a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_favorite'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
                         <i class="{% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %} small"></i>
                     </a>
                 </li>
@@ -38,7 +40,7 @@
         <li class="bold border-bottom hide-on-med-and-down">
             <a class="waves-effect collapsible-header" href="{{ path('homepage') }}">
                 <i class="mdi-action-exit-to-app small"></i>
-                <span>{% trans %}back{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.back_to_homepage'|trans }}</span>
             </a>
             <div class="collapsible-body"></div>
         </li>
         <li class="bold border-bottom hide-on-med-and-down">
             <a class="waves-effect collapsible-header" href="{{ entry.url|e }}">
                 <i class="mdi-content-link small"></i>
-                <span>{% trans %}original article{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.view_original_article'|trans }}</span>
             </a>
             <div class="collapsible-body"></div>
         </li>
 
         <li class="bold hide-on-med-and-down">
-            <a class="waves-effect collapsible-header" title="{% trans %}Re-fetch content{% endtrans %}" href="{{ path('reload_entry', { 'id': entry.id }) }}" id="reload">
+            <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" href="{{ path('reload_entry', { 'id': entry.id }) }}" id="reload">
                 <i class="mdi-action-autorenew small"></i>
-                <span>{% trans %}Re-fetch content{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span>
             </a>
             <div class="collapsible-body"></div>
         </li>
 
         <li class="bold hide-on-med-and-down">
-            <a class="waves-effect collapsible-header" title="{% trans %}Mark as read{% endtrans %}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead">
+            <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.set_as_read'|trans }}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead">
                 <i class="{% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %} small"></i>
-                <span>{% if entry.isArchived == 0 %}{% trans %}Mark as read{% endtrans %}{% else %}{% trans %}Mark as unread{% endtrans %}{% endif %}</span>
+                <span>{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}</span>
             </a>
             <div class="collapsible-body"></div>
         </li>
 
         <li class="bold hide-on-med-and-down">
-            <a class="waves-effect collapsible-header" title="{% trans %}Favorite{% endtrans %}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
+            <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.set_as_favorite'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
                 <i class="{% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %} small"></i>
-                <span>{% trans %}Favorite{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.set_as_favorite'|trans }}</span>
             </a>
             <div class="collapsible-body"></div>
         </li>
         <li class="bold border-bottom hide-on-med-and-down">
-            <a class="waves-effect collapsible-header" title="{% trans %}Delete{% endtrans %}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
+            <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
                 <i class="mdi-action-delete small"></i>
-                <span>{% trans %}Delete{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.delete'|trans }}</span>
             </a>
             <div class="collapsible-body"></div>
         </li>
@@ -85,7 +87,7 @@
         <li class="bold border-bottom hide-on-med-and-down">
             <a class="waves-effect collapsible-header" id="nav-btn-add-tag">
                 <i class="mdi-action-label-outline small"></i>
-                <span>{% trans %}Add a tag{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span>
             </a>
             <div class="collapsible-body"></div>
         </li>
@@ -93,7 +95,7 @@
         <li class="bold">
             <a class="waves-effect collapsible-header">
                 <i class="mdi-social-share small"></i>
-                <span>{% trans %}Share{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.share_content'|trans }}</span>
             </a>
             <div class="collapsible-body">
                 <ul>
                     {% endif %}
                     {% if craue_setting('share_mail') %}
                         <li>
-                            <a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans %}Email{% endtrans %}">
-                                <span>{% trans %}Email{% endtrans %}</span>
+                            <a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{{ 'entry.view.left_menu.share_email_label'|trans }}">
+                                <span>{{ 'entry.view.left_menu.share_email_label'|trans }}</span>
                             </a>
                         </li>
                     {% endif %}
         <li class="bold">
             <a class="waves-effect collapsible-header">
                 <i class="mdi-file-file-download small"></i>
-                <span>{% trans %}Download{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.download'|trans }}</span>
             </a>
             <div class="collapsible-body">
                 <ul>
         </li>
 
         <li class="bold hide-on-large-only">
-            <a class="waves-effect collapsible-header" title="{% trans %}Delete{% endtrans %}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
+            <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
                 <i class="mdi-action-delete small"></i>
-                <span>{% trans %}Delete{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.delete'|trans }}</span>
             </a>
             <div class="collapsible-body"></div>
         </li>
 
         <li class="bold">
-            <a class="waves-effect collapsible-header" href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans %}Does this article appear wrong?{% endtrans %}">
+            <a class="waves-effect collapsible-header" href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.description'|trans }}">
                 <i class="mdi-alert-error small"></i>
-                <span>{% trans %}Problems?{% endtrans %}</span>
+                <span>{{ 'entry.view.left_menu.problem.label'|trans }}</span>
             </a>
             <div class="collapsible-body"></div>
         </li>
 
     </ul>
 
-<style>
-main {
-    padding: 0;
-}
-</style>
-
 {% endblock %}
 
 {% block content %}
     <div id="article">
         <header class="mbm">
-            <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{% trans %}Edit title{% endtrans %}">✎</a></h1>
+            <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
         </header>
         <aside>
-            <a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link mdi-content-link"> <span>{{ entry.domainName|removeWww }}</span></a>
-            {% set nbAnnotations = entry.annotations | length %}
-            <span class="tool link mdi-communication-comment"> {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %}</span>
+            <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool link mdi-content-link"> <span>{{ entry.domainName|removeWww }}</span></a>
+            <span class="tool link mdi-communication-comment"> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
             <div id="list">
                 {% for tag in entry.tags %}
                     <div class="chip">
index 95ed0785231afa2a384e0281b3b2ff2253e2ed16..03768a3d80a0e2be4839b8a062e400dc062e66e4 100644 (file)
@@ -1,6 +1,6 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}Save new entry{% endtrans %}{% endblock %}
+{% block title %}{{ 'entry.new.page_title'|trans }}{% endblock %}
 
 {% block content %}
     {{ render(controller( "WallabagCoreBundle:Entry:addEntryForm" )) }}
index f1e5641265cfb4e0ff3e8fa2309156a4b6ab41f1..0cf4fb7462ab6f88112e947c319821f6c160255c 100644 (file)
@@ -7,7 +7,7 @@
         <span class="black-text">{{ form_errors(form.url) }}</span>
     {% endif %}
 
-    {{ form_widget(form.url, { 'attr': {'autocomplete': 'off', 'placeholder': 'http://website'} }) }}
+    {{ form_widget(form.url, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.new.placeholder'} }) }}
 
-    <div class="hidden">{{ form_rest(form) }}</div>
+    {{ form_rest(form) }}
 </form>
index 1368bb092bdc34c02c90e5f41542726ee4bd6e4e..a294b74dba35d5114eea9ce756fd225042de81e4 100644 (file)
@@ -1,6 +1,6 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}About{% endtrans %}{% endblock %}
+{% block title %}{{ 'about.page_title'|trans }}{% endblock %}
 
 {% block content %}
 
                 <div class="row">
                     <div class="div_tabs col s12">
                         <ul class="tabs">
-                        <li class="tab col s3"><a class="active" href="#set1">{% trans %}Who is behind wallabag{% endtrans %}</a></li>
-                        <li class="tab col s3"><a href="#set2">{% trans %}Getting help{% endtrans %}</a></li>
-                        <li class="tab col s3"><a href="#set3">{% trans %}Helping wallabag{% endtrans %}</a></li>
-                        <li class="tab col s3"><a href="#set4">{% trans %}Contributors{% endtrans %}</a></li>
-                        <li class="tab col s3"><a href="#set5">{% trans %}Third-party libraries{% endtrans %}</a></li>
+                        <li class="tab col s3"><a class="active" href="#set1">{{ 'about.top_menu.who_behind_wallabag'|trans }}</a></li>
+                        <li class="tab col s3"><a href="#set2">{{ 'about.top_menu.getting_help'|trans }}</a></li>
+                        <li class="tab col s3"><a href="#set3">{{ 'about.top_menu.helping'|trans }}</a></li>
+                        <li class="tab col s3"><a href="#set4">{{ 'about.top_menu.contributors'|trans }}</a></li>
+                        <li class="tab col s3"><a href="#set5">{{ 'about.top_menu.third_party'|trans }}</a></li>
                         </ul>
                     </div>
 
                     <div id="set1" class="col s12">
-                        <dt>{% trans %}Developed by{% endtrans %}</dt>
-                        <dd><a href="mailto:nicolas@loeuillet.org">Nicolas LÅ“uillet</a> â€” <a href="http://cdetc.fr">{% trans %}website{% endtrans %}</a></dd>
-                        <dd>Thomas Citharel â€” <a href="https://tcit.fr">{% trans %}website{% endtrans %}</a></dd>
-                        <dd>Jérémy Benoist â€” <a href="http://www.j0k3r.net">{% trans %}website{% endtrans %}</a></dd>
-                        <dt>{% trans %}And many others contributors â™¥{% endtrans %} <a href="https://github.com/wallabag/wallabag/graphs/contributors">{% trans %}on GitHub{% endtrans %}</a></dt>
-                        <dt>{% trans %}Project website{% endtrans %}</dt>
+                        <dt>{{ 'about.who_behind_wallabag.developped_by'|trans }}</dt>
+                        <dd><a href="mailto:nicolas@loeuillet.org">Nicolas LÅ“uillet</a> â€” <a href="http://cdetc.fr">{{ 'about.who_behind_wallabag.website'|trans }}</a></dd>
+                        <dd>Thomas Citharel â€” <a href="https://tcit.fr">{{ 'about.who_behind_wallabag.website'|trans }}</a></dd>
+                        <dd>Jérémy Benoist â€” <a href="http://www.j0k3r.net">{{ 'about.who_behind_wallabag.website'|trans }}</a></dd>
+                        <dt>{{ 'about.who_behind_wallabag.many_contributors'|trans|raw }}</dt>
+                        <dt>{{ 'about.who_behind_wallabag.project_website'|trans }}</dt>
                         <dd><a href="https://www.wallabag.org">https://www.wallabag.org</a></dd>
-                        <dt>{% trans %}License{% endtrans %}: <a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a></dt>
-                        <dt>{% trans %}Version{% endtrans %}: {{ version }}</dt>
+                        <dt>{{ 'about.who_behind_wallabag.license'|trans }}: <a href="https://en.wikipedia.org/wiki/MIT_License">MIT</a></dt>
+                        <dt>{{ 'about.who_behind_wallabag.version'|trans }}: {{ version }}</dt>
                     </div>
 
                     <div id="set2" class="col s12">
                         <dl>
-                            <dt>{% trans %}Documentation{% endtrans %}</dt>
+                            <dt>{{ 'about.getting_help.documentation'|trans }}</dt>
                             <dd><a href="https://doc.wallabag.org/en">english</a></dd>
                             <dd><a href="https://doc.wallabag.org/fr">français</a></dd>
                             <dd><a href="https://doc.wallabag.org/de">deutsch</a></dd>
 
-                            <dt>{% trans %}Bug reports{% endtrans %}</dt>
-                            <dd><a href="https://support.wallabag.org">{% trans %}On our support website{% endtrans %}</a> {% trans %}or{% endtrans %} <a href="https://github.com/wallabag/wallabag/issues">{% trans %}on GitHub{% endtrans %}</a></dd>
+                            <dt>{{ 'about.getting_help.bug_reports'|trans }}</dt>
+                            <dd>{{ 'about.getting_help.support'|trans|raw }}</dd>
                         </dl>
                     </div>
 
                     <div id="set3" class="col s12">
                         <dl>
-                            <dt>{% trans %}wallabag is free and opensource. You can help us:{% endtrans %}</dt>
-                            <dd>{% trans %}by contributing to the project:{% endtrans %} <a href="https://github.com/wallabag/wallabag/issues/1254">{% trans %}an issue lists all our needs{% endtrans %}</a></dd>
-                            <dd><a href="{{ paypal_url }}">{% trans %}via Paypal{% endtrans %}</a></dd>
+                            <dt>{{ 'about.helping.description'|trans }}</dt>
+                            <dd>{{ 'about.helping.by_contributing_2'|trans }} <a href="https://github.com/wallabag/wallabag/issues/1254">{{ 'about.helping.by_contributing'|trans }}</a></dd>
+                            <dd><a href="{{ paypal_url }}">{{ 'about.helping.by_paypal'|trans }}</a></dd>
                         </dl>
                     </div>
 
                     <div id="set4" class="col s12">
-                        <p><a href="https://github.com/wallabag/wallabag/graphs/contributors">{% trans %}Thank you to contributors on wallabag web application{% endtrans %}</a></p>
+                        <p><a href="https://github.com/wallabag/wallabag/graphs/contributors">{{ 'about.contributors.description'|trans }}</a></p>
                     </div>
 
                     <div id="set5" class="col s12">
-                        <p>{% trans %}Here are the list of third-party libraries used in wallabag (with their licenses):{% endtrans %}</p>
-                        <table>
+                        <p>{{ 'about.third_party.description'|trans }}</p>
+                        <table class="striped">
                             <tr>
-                                <th>{% trans %}Package{% endtrans %}</th>
-                                <th>{% trans %}License{% endtrans %}</th>
+                                <th>{{ 'about.third_party.package'|trans }}</th>
+                                <th>{{ 'about.third_party.license'|trans }}</th>
                             </tr>
                             <tr><td>behat/transliterator</td><td>Artistic 1.0</td></tr>
                             <tr><td>CraueConfigBundle</td><td>MIT</td></tr>
index e27954094bd59b1fcf4bda16a5c2cae260356638..15b548d8915a28eb48c89594dd0beae3e3f61081 100644 (file)
@@ -1,44 +1,40 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}howto{% endtrans %}{% endblock %}
+{% block title %}{{ 'howto.page_title'|trans }}{% endblock %}
 
 {% block content %}
 
     <div class="row">
         <div class="col s12">
             <div class="card-panel settings">
+                <p>{{ 'howto.page_description'|trans }}</p>
 
                 <div class="row">
-                    <div class="div_tabs col s12">
-                        <ul class="tabs">
-                        <li class="tab col s3"><a class="active" href="#set1">{% trans %}Form{% endtrans %}</a></li>
-                        <li class="tab col s3"><a href="#set2">{% trans %}Browser addons{% endtrans %}</a></li>
-                        <li class="tab col s3"><a href="#set3">{% trans %}Mobile apps{% endtrans %}</a></li>
-                        <li class="tab col s3"><a href="#set4">{% trans %}Bookmarklet{% endtrans %}</a></li>
-                        </ul>
-                    </div>
 
-                    <div id="set1" class="col s12">
-                        <a href="{{ path('new') }}">{% trans %}Thanks to this form{% endtrans %}</a>
+                    <div class="col s12">
+                        <a href="{{ path('new') }}">{{ 'howto.form.description'|trans }}</a>
                     </div>
 
-                    <div id="set2" class="col s12">
+                    <div class="col s12">
+                        <h5>{{ 'howto.top_menu.browser_addons'|trans }}</h5>
                         <ul>
-                            <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{% trans %}Standard Firefox Add-On{% endtrans %}</a></li>
-                            <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{% trans %}Chrome Extension{% endtrans %}</a></li>
+                            <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
+                            <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
                         </ul>
                     </div>
 
-                    <div id="set3" class="col s12">
+                    <div class="col s12">
+                        <h5>{{ 'howto.top_menu.mobile_apps'|trans }}</h5>
                         <ul>
-                            <li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">via F-Droid</a> {% trans %} or {% endtrans %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">via Google Play</a></li>
-                            <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
-                            <li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
+                            <li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
+                            <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
+                            <li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
                         </ul>
                     </div>
 
-                    <div id="set4" class="col s12">
-                        {% trans %}Drag &amp; drop this link to your bookmarks bar:{% endtrans %}
+                    <div class="col s12">
+                        <h5>{{ 'howto.top_menu.bookmarklet'|trans }}</h5>
+                        {{ 'howto.bookmarklet.description'|trans }}
                         {% include 'WallabagCoreBundle::_bookmarklet.html.twig' %}
                     </div>
 
index 03754d3897c141421dce11775d217c7b363d945a..706c4a7926422c128e82f48db7143682e4ca8b33 100644 (file)
@@ -1,6 +1,6 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}Quickstart{% endtrans %}{% endblock %}
+{% block title %}{{ 'quickstart.page_title'|trans }}{% endblock %}
 
 {% block content %}
 
@@ -9,56 +9,63 @@
             <div class="card-panel settings">
 
                 <div class="row">
-                    <h3>{% trans %}Welcome to wallabag!{% endtrans %}</h3>
-                    <p>{% trans %}We'll accompany you to visit wallabag and show you some features which can interess you.{% endtrans %}</p>
-                    <p>{% trans %}Follow us!{% endtrans %}</p>
-                    <h4>{% trans %}Configure the application{% endtrans %}</h4>
+                    <h3>{{ 'quickstart.intro.title'|trans }}</h3>
+                    <p>{{ 'quickstart.intro.paragraph_1'|trans }}</p>
+                    <p>{{ 'quickstart.intro.paragraph_2'|trans }}</p>
+
+                    <h4>{{ 'quickstart.configure.title'|trans }}</h4>
                     <ul>
-                        <li><a href="{{ path('config') }}">{% trans %}Change language and design{% endtrans %}</a></li>
-                        <li><a href="{{ path('config') }}#set2">{% trans %}Enable RSS feeds{% endtrans %}</a></li>
-                        <li><a href="{{ path('config') }}#set5">{% trans %}Write rules to automatically tag your articles{% endtrans %}</a></li>
+                        <li><a href="{{ path('config') }}">{{ 'quickstart.configure.language'|trans }}</a></li>
+                        <li><a href="{{ path('config') }}#set2">{{ 'quickstart.configure.rss'|trans }}</a></li>
+                        <li><a href="{{ path('config') }}#set5">{{ 'quickstart.configure.tagging_rules'|trans }}</a></li>
                     </ul>
+
                     {% if is_granted('ROLE_SUPER_ADMIN') %}
-                    <h4>{% trans %}Administration{% endtrans %}</h4>
-                    <p>{% trans %}As a administrator, you have privileges on wallabag. You can:{% endtrans %}</p>
+                    <h4>{{ 'quickstart.admin.title'|trans }}</h4>
+                    <p>{{ 'quickstart.admin.description'|trans }}</p>
                     <ul>
-                        <li><a href="{{ path('config') }}#set6">{% trans %}Create a new user{% endtrans %}</a></li>
-                        <li><a href="{{ path('craue_config_settings_modify') }}#set-analytics">{% trans %}Configure analytics{% endtrans %}</a></li>
-                        <li><a href="{{ path('craue_config_settings_modify') }}#set-entry">{% trans %}Enable some parameters about article sharing{% endtrans %}</a></li>
-                        <li><a href="{{ path('craue_config_settings_modify') }}#set-export">{% trans %}Configure export{% endtrans %}</a></li>
-                        <li><a href="{{ path('craue_config_settings_modify') }}#set-import">{% trans %}Configure import{% endtrans %}</a></li>
+                        <li><a href="{{ path('config') }}#set6">{{ 'quickstart.admin.new_user'|trans }}</a></li>
+                        <li><a href="{{ path('craue_config_settings_modify') }}#set-analytics">{{ 'quickstart.admin.analytics'|trans }}</a></li>
+                        <li><a href="{{ path('craue_config_settings_modify') }}#set-entry">{{ 'quickstart.admin.sharing'|trans }}</a></li>
+                        <li><a href="{{ path('craue_config_settings_modify') }}#set-export">{{ 'quickstart.admin.export'|trans }}</a></li>
+                        <li><a href="{{ path('craue_config_settings_modify') }}#set-import">{{ 'quickstart.admin.import'|trans }}</a></li>
                     </ul>
                     {% endif %}
-                    <h4>{% trans %}First steps{% endtrans %}</h4>
+
+                    <h4>{{ 'quickstart.first_steps.title'|trans }}</h4>
                     <ul>
-                        <li><a href="{{ path('new') }}">{% trans %}Save your first article{% endtrans %}</a></li>
-                        <li><a href="{{ path('unread') }}">{% trans %}And classify it!{% endtrans %}</a></li>
+                        <li><a href="{{ path('new') }}">{{ 'quickstart.first_steps.new_article'|trans }}</a></li>
+                        <li><a href="{{ path('unread') }}">{{ 'quickstart.first_steps.unread_articles'|trans }}</a></li>
                     </ul>
-                    <h4>{% trans %}Migrate from an existing service{% endtrans %}</h4>
-                    <p>{% trans %}You're using an other service? We'll help you to retrieve your data on wallabag.{% endtrans %}</p>
+
+                    <h4>{{ 'quickstart.migrate.title'|trans }}</h4>
+                    <p>{{ 'quickstart.migrate.description'|trans }}</p>
                     <ul>
-                        <li><a href="{{ path('import_pocket') }}">{% trans %}Migrate from Pocket{% endtrans %}</a></li>
-                        <li><a href="{{ path('import_wallabag_v1') }}">{% trans %}Migrate from wallabag v1{% endtrans %}</a></li>
-                        <li><a href="{{ path('import_wallabag_v2') }}">{% trans %}Migrate from wallabag v2{% endtrans %}</a></li>
+                        <li><a href="{{ path('import_pocket') }}">{{ 'quickstart.migrate.pocket'|trans }}</a></li>
+                        <li><a href="{{ path('import_wallabag_v1') }}">{{ 'quickstart.migrate.wallabag_v1'|trans }}</a></li>
+                        <li><a href="{{ path('import_wallabag_v2') }}">{{ 'quickstart.migrate.wallabag_v2'|trans }}</a></li>
                     </ul>
-                    <h4>{% trans %}Developers{% endtrans %}</h4>
+
+                    <h4>{{ 'quickstart.developer.title'|trans }}</h4>
                     <ul>
-                        <li><a href="{{ path('developer') }}">{% trans %}Create your third application{% endtrans %}</a></li>
+                        <li><a href="{{ path('developer') }}">{{ 'quickstart.developer.create_application'|trans }}</a></li>
                     </ul>
-                    <h4>{% trans %}Full documentation{% endtrans %}</h4>
+
+                    <h4>{{ 'quickstart.docs.title'|trans }}</h4>
                     <ul>
-                        <li><a href="http://doc.wallabag.org/en/v2/user/annotations.html">{% trans %}Annotate your article{% endtrans %}</a></li>
-                        <li><a href="http://doc.wallabag.org/en/v2/user/download_articles.html">{% trans %}Convert your articles into ePUB or PDF{% endtrans %}</a></li>
-                        <li><a href="http://doc.wallabag.org/en/v2/user/filters.html">{% trans %}See how you can look for an article by using search engine and filters{% endtrans %}</a></li>
-                        <li><a href="http://doc.wallabag.org/en/v2/user/errors_during_fetching.html">{% trans %}What can I do if an article encounters errors during fetching?{% endtrans %}</a></li>
-                        <li><a href="http://doc.wallabag.org/">{% trans %}And so many other articles!{% endtrans %}</a></li>
+                        <li><a href="http://doc.wallabag.org/en/v2/user/annotations.html">{{ 'quickstart.docs.annotate'|trans }}</a></li>
+                        <li><a href="http://doc.wallabag.org/en/v2/user/download_articles.html">{{ 'quickstart.docs.export'|trans }}</a></li>
+                        <li><a href="http://doc.wallabag.org/en/v2/user/filters.html">{{ 'quickstart.docs.search_filters'|trans }}</a></li>
+                        <li><a href="http://doc.wallabag.org/en/v2/user/errors_during_fetching.html">{{ 'quickstart.docs.fetching_errors'|trans }}</a></li>
+                        <li><a href="http://doc.wallabag.org/">{{ 'quickstart.docs.all_docs'|trans }}</a></li>
                     </ul>
-                    <h4>{% trans %}Support{% endtrans %}</h4>
-                    <p>{% trans %}If you need some help, we are here for you.{% endtrans %}</p>
+
+                    <h4>{{ 'quickstart.support.title'|trans }}</h4>
+                    <p>{{ 'quickstart.support.description'|trans }}</p>
                     <ul>
-                        <li><a href="https://github.com/wallabag/wallabag/issues/">{% trans %}On GitHub{% endtrans %}</a></li>
-                        <li><a href="mailto:hello@wallabag.org">{% trans %}By email{% endtrans %}</a></li>
-                        <li><a href="https://gitter.im/wallabag/wallabag">{% trans %}On Gitter{% endtrans %}</a></li>
+                        <li><a href="https://github.com/wallabag/wallabag/issues/">{{ 'quickstart.support.github'|trans }}</a></li>
+                        <li><a href="mailto:hello@wallabag.org">{{ 'quickstart.support.email'|trans }}</a></li>
+                        <li><a href="https://gitter.im/wallabag/wallabag">{{ 'quickstart.support.gitter'|trans }}</a></li>
                     </ul>
                 </div>
 
index 793103078b485920b037f8a24f8d359915b55b71..6e552560ec14c2a491e08bcd6c3b9b071ddc5cc7 100644 (file)
@@ -9,5 +9,5 @@
 
     {{ form_widget(form.label, { 'attr': {'autocomplete': 'off'} }) }}
 
-    <div class="hidden">{{ form_rest(form) }}</div>
+    {{ form_rest(form) }}
 </form>
index 19754d415d7818a9799ccd750af982e4a99d134a..6b58368924663e51f078be35c375473200649b5c 100644 (file)
@@ -1,10 +1,10 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title "Tags" %}
+{% block title %}{{ 'tag.page_title'|trans }}{% endblock %}
 
 {% block content %}
     <div class="results clearfix">
-        <div class="nb-results left">{% transchoice tags.count %}{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.{% endtranschoice %}</div>
+        <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div>
     </div>
     <br />
     <ul class="row data">
index f5d03084d1c6f4af01070e94e6e14062b7f6954b..48eaca817b4b265b4636ef2661315544211f52a1 100644 (file)
@@ -31,7 +31,7 @@
         <ul id="slide-out" class="side-nav fixed">
             {% block logo %}
                 <li class="logo border-bottom">
-                    <a title="{% trans %}Back to unread articles{% endtrans %}" href="{{ path('unread') }}">
+                    <a title="{{ 'menu.left.back_to_unread'|trans }}" href="{{ path('unread') }}">
                         <img src="{{ asset('bundles/wallabagcore/themes/material/img/logo-square.png') }}" alt="wallabag logo" />
                     </a>
                 </li>
 
             {% set currentRoute = app.request.attributes.get('_route') %}
 
-            <li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}"><a class="waves-effect" href="{{ path('unread') }}">{% trans %}unread{% endtrans %}</a></li>
-            <li class="bold {% if currentRoute == 'starred' %}active{% endif %}"><a class="waves-effect" href="{{ path('starred') }}">{% trans %}starred{% endtrans %}</a></li>
-            <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"><a class="waves-effect" href="{{ path('archive') }}">{% trans %}archive{% endtrans %}</a></li>
-            <li class="bold border-bottom {% if currentRoute == 'all' %}active{% endif %}"><a class="waves-effect" href="{{ path('all') }}">{% trans %}all{% endtrans %}</a></li>
-            <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"><a class="waves-effect" href="{{ path('tag') }}">{% trans %}tags{% endtrans %}</a></li>
-            <li class="bold {% if currentRoute == 'config' %}active{% endif %}"><a class="waves-effect" href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li>
+            <li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}">
+                <a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }}</a>
+            </li>
+            <li class="bold {% if currentRoute == 'starred' %}active{% endif %}">
+                <a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }}</a>
+            </li>
+            <li class="bold {% if currentRoute == 'archive' %}active{% endif %}">
+                <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }}</a>
+            </li>
+            <li class="bold border-bottom {% if currentRoute == 'all' %}active{% endif %}">
+                <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }}</a>
+            </li>
+            <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}">
+                <a class="waves-effect" href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }}</a>
+            </li>
+            <li class="bold {% if currentRoute == 'config' %}active{% endif %}">
+                <a class="waves-effect" href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a>
+            </li>
             {% if is_granted('ROLE_SUPER_ADMIN') %}
-                <li class="bold border-bottom {% if currentRoute == 'craue_config_settings_modify' %}active{% endif %}"><a class="waves-effect" href="{{ path('craue_config_settings_modify') }}">{% trans %}internal settings{% endtrans %}</a></li>
+                <li class="bold border-bottom {% if currentRoute == 'craue_config_settings_modify' %}active{% endif %}">
+                    <a class="waves-effect" href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a>
+                </li>
             {% endif %}
-            <li class="bold {% if currentRoute == 'import' %}active{% endif %}"><a class="waves-effect" href="{{ path('import') }}">{% trans %}import{% endtrans %}</a></li>
-            <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"><a class="waves-effect" href="{{ path('howto') }}">{% trans %}howto{% endtrans %}</a></li>
-            <li class="bold {% if currentRoute == 'developer' %}active{% endif %}"><a class="waves-effect" href="{{ path('developer') }}">{% trans %}Developer{% endtrans %}</a></li>
-            <li class="bold"><a class="waves-effect" class="icon icon-power" href="{{ path('fos_user_security_logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
+            <li class="bold {% if currentRoute == 'import' %}active{% endif %}">
+                <a class="waves-effect" href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a>
+            </li>
+            <li class="bold {% if currentRoute == 'developer' %}active{% endif %}">
+                <a class="waves-effect" href="{{ path('developer') }}">{{ 'menu.left.developer'|trans }}</a>
+            </li>
+            <li class="bold {% if currentRoute == 'howto' %}active{% endif %}">
+                <a class="waves-effect" href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a>
+            </li>
+            <li class="bold">
+                <a class="waves-effect" class="icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a>
+            </li>
         </ul>
         <div class="nav-wrapper nav-panels">
             <a href="#" data-activates="slide-out" class="nav-panel-menu button-collapse"><i class="mdi-navigation-menu"></i></a>
             </div>
             <div class="input-field nav-panel-buttom">
                 <ul>
-                    <li class="bold"><a title="{% trans %}Add a new entry{% endtrans %}" class="waves-effect" href="{{ path('new') }}" id="nav-btn-add"><i class="mdi-content-add"></i></a></li>
-                    <li><a title="{% trans %}Search{% endtrans %}" class="waves-effect" href="javascript: void(null);" id="nav-btn-search"><i class="mdi-action-search"></i></a>
-                    <li id="button_filters"><a title="{% trans %}Filter entries{% endtrans %}" href="#" data-activates="filters" class="nav-panel-menu button-collapse-right"><i class="mdi-content-filter-list"></i></a></li>
-                    <li id="button_export"><a title="{% trans %}Export{% endtrans %}" class="nav-panel-menu button-collapse-right" href="#" data-activates="export" class="nav-panel-menu button-collapse-right"><i class="mdi-file-file-download"></i></a></li>
+                    <li class="bold">
+                        <a title="{{ 'menu.top.add_new_entry'|trans }}" class="waves-effect" href="{{ path('new') }}" id="nav-btn-add">
+                            <i class="mdi-content-add"></i>
+                        </a>
+                    </li>
+                    <li>
+                        <a title="{{ 'menu.top.search'|trans }}" class="waves-effect" href="javascript: void(null);" id="nav-btn-search">
+                            <i class="mdi-action-search"></i>
+                        </a>
+                    </li>
+                    <li id="button_filters">
+                        <a title="{{ 'menu.top.filter_entries'|trans }}" href="#" data-activates="filters" class="nav-panel-menu button-collapse-right">
+                            <i class="mdi-content-filter-list"></i>
+                        </a>
+                    </li>
+                    <li id="button_export">
+                        <a title="{{ 'menu.top.export'|trans }}" class="nav-panel-menu button-collapse-right" href="#" data-activates="export" class="nav-panel-menu button-collapse-right">
+                            <i class="mdi-file-file-download"></i>
+                        </a>
+                    </li>
                 </ul>
             </div>
             <form method="get" action="index.php">
                 <div class="input-field nav-panel-search" style="display: none">
-                    <input name="search" id="searchfield" type="search" required placeholder="{% trans %}Enter your search here{% endtrans %}">
+                    <input name="search" id="searchfield" type="search" required placeholder="{{ 'menu.search_form.input_label'|trans }}">
                     <label for="search"><i class="mdi-action-search"></i></label>
                     <i class="mdi-navigation-close"></i>
                 </div>
             </form>
             <div class="input-field nav-panel-add" style="display: none">
-                {{ render(controller( "WallabagCoreBundle:Entry:addEntryForm" )) }}
+                {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }}
                 <label for="add" class="active"><i class="mdi-content-add"></i></label>
                 <i class="mdi-navigation-close"></i>
             </div>
         <div class="container">
             <div class="row">
                 <div class="col l6 s12">
-                    <h5 class="white-text">{% trans %}Take wallabag with you{% endtrans %}</h5>
+                    <h5 class="white-text">{{ 'footer.wallabag.elsewhere'|trans }}</h5>
                     <p class="grey-text text-lighten-4">
-
-                        <a target="_blank" class="grey-text text-lighten-3" href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="android"><span class="icon-android"></span></a>
-
-                        <a target="_blank" class="grey-text text-lighten-3" href="https://itunes.apple.com/app/id828331015" title="iOS"><span class="icon-apple"></a>
-
-                        <a target="_blank" class="grey-text text-lighten-3" href="https://addons.mozilla.org/ru/firefox/addon/wallabag/" title="Firefox"><span class="icon-firefox"></span></a>
-
-                        <a target="_blank" class="grey-text text-lighten-3" href="https://chrome.google.com/webstore/detail/wallabagit/peehlcgckcnclnjlndmoddifcicdnabm" title="Chrome"><span class="icon-chrome"></a>
-
+                        <a target="_blank" class="grey-text text-lighten-3" href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="Android">
+                            <span class="icon-android"></span>
+                        </a>
+                        <a target="_blank" class="grey-text text-lighten-3" href="https://itunes.apple.com/app/id828331015" title="iOS">
+                            <span class="icon-apple"></span>
+                        </a>
+                        <a target="_blank" class="grey-text text-lighten-3" href="https://addons.mozilla.org/ru/firefox/addon/wallabag/" title="Firefox">
+                            <span class="icon-firefox"></span>
+                        </a>
+                        <a target="_blank" class="grey-text text-lighten-3" href="https://chrome.google.com/webstore/detail/wallabagit/peehlcgckcnclnjlndmoddifcicdnabm" title="Chrome">
+                            <span class="icon-chrome"></span>
+                        </a>
                     </p>
                 </div>
                 <div class="col l4 offset-l2 s12">
-                    <h5 class="white-text">{% trans %}Social{% endtrans %}</h5>
-
-                    <a target="_blank" class="grey-text text-lighten-3" href="https://twitter.com/wallabagapp" title="Twitter"><span class="icon-twitter"></span></a>
-
-                    <a target="_blank" class="grey-text text-lighten-3" href="https://plus.google.com/+WallabagOrg/posts" title="Google+"><span class="icon-google-plus2"></span></a>
-
-                    <a target="_blank" class="grey-text text-lighten-3" href="https://facebook.com/Wallabag" title="Facebook"><span class="icon-facebook2"></span></a>
-
+                    <h5 class="white-text">{{ 'footer.wallabag.social'|trans }}</h5>
+                    <a target="_blank" class="grey-text text-lighten-3" href="https://twitter.com/wallabagapp" title="Twitter">
+                        <span class="icon-twitter"></span>
+                    </a>
+                    <a target="_blank" class="grey-text text-lighten-3" href="https://plus.google.com/+WallabagOrg/posts" title="Google+">
+                        <span class="icon-google-plus2"></span>
+                    </a>
+                    <a target="_blank" class="grey-text text-lighten-3" href="https://facebook.com/Wallabag" title="Facebook">
+                        <span class="icon-facebook2"></span>
+                    </a>
                 </div>
             </div>
         </div>
         <div class="footer-copyright">
             <div class="container">
-                <p>{% trans %}powered by{% endtrans %} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
-                <a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{% trans %}About{% endtrans %}</a>
+                <p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
+                <a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a>
             </div>
         </div>
     </footer>
index 51425fe1c51ae3da4e487c9f9f24e38202ef85fe..bf455f32859c330a402d43870f13854e2f7fa602 100644 (file)
@@ -102,7 +102,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'change_passwd[new_password][first]' => '',
                     'change_passwd[new_password][second]' => '',
                 ),
-                'Wrong value for your current password',
+                'validator.password_wrong_value',
             ),
             array(
                 array(
@@ -118,7 +118,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'change_passwd[new_password][first]' => 'hop',
                     'change_passwd[new_password][second]' => '',
                 ),
-                'The password fields must match',
+                'validator.password_must_match',
             ),
             array(
                 array(
@@ -126,7 +126,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'change_passwd[new_password][first]' => 'hop',
                     'change_passwd[new_password][second]' => 'hop',
                 ),
-                'Password should by at least',
+                'validator.password_too_short',
             ),
         );
     }
@@ -188,14 +188,14 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'update_user[name]' => '',
                     'update_user[email]' => '',
                 ),
-                'Please enter an email',
+                'fos_user.email.blank',
             ),
             array(
                 array(
                     'update_user[name]' => '',
                     'update_user[email]' => 'test',
                 ),
-                'The email is not valid',
+                'fos_user.email.invalid',
             ),
         );
     }
@@ -244,7 +244,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
 
         $crawler = $client->followRedirect();
 
-        $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
+        $this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(array('_text')));
         $this->assertContains('Information updated', $alert[0]);
     }
 
@@ -258,7 +258,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'new_user[plainPassword][second]' => '',
                     'new_user[email]' => '',
                 ),
-                'Please enter a username',
+                'fos_user.username.blank',
             ),
             array(
                 array(
@@ -267,7 +267,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'new_user[plainPassword][second]' => 'mypassword',
                     'new_user[email]' => '',
                 ),
-                'The username is too short',
+                'fos_user.username.short',
             ),
             array(
                 array(
@@ -276,7 +276,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'new_user[plainPassword][second]' => 'mypassword',
                     'new_user[email]' => 'test',
                 ),
-                'The email is not valid',
+                'fos_user.email.invalid',
             ),
             array(
                 array(
@@ -285,7 +285,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'new_user[plainPassword][second]' => 'wallacewallace',
                     'new_user[email]' => 'wallace@wallace.me',
                 ),
-                'The username is already used',
+                'fos_user.username.already_used',
             ),
             array(
                 array(
@@ -294,7 +294,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'new_user[plainPassword][second]' => 'mypassword2',
                     'new_user[email]' => 'wallace@wallace.me',
                 ),
-                'The password fields must match',
+                'validator.password_must_match',
             ),
         );
     }
@@ -382,7 +382,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
 
         $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
-        $this->assertContains('You need to generate a token first.', $body[0]);
+        $this->assertContains('config.form_rss.no_token', $body[0]);
 
         $client->request('GET', '/generate-token');
         $this->assertEquals(302, $client->getResponse()->getStatusCode());
@@ -390,7 +390,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
         $crawler = $client->followRedirect();
 
         $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
-        $this->assertNotContains('You need to generate a token first.', $body[0]);
+        $this->assertNotContains('config.form_rss.no_token', $body[0]);
     }
 
     public function testGenerateTokenAjax()
@@ -454,7 +454,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                 array(
                     'rss_config[rss_limit]' => 1000000000000,
                 ),
-                'This will certainly kill the app',
+                'validator.rss_limit_too_hight',
             ),
         );
     }
index 5512d6e1bd08f80860578226efa57d6c541bc412..0fcf323cdffd57873e38a6fcd7a782842ecc04f2 100644 (file)
@@ -28,14 +28,14 @@ class EntryControllerTest extends WallabagCoreTestCase
         $client->followRedirect();
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
-        $this->assertContains('We\'ll accompany you to visit wallabag', $client->getResponse()->getContent());
+        $this->assertContains('quickstart.intro.paragraph_1', $client->getResponse()->getContent());
 
         // Test if quickstart is disabled when user has 1 entry
         $crawler = $client->request('GET', '/new');
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
 
-        $form = $crawler->filter('button[type=submit]')->form();
+        $form = $crawler->filter('form[name=entry]')->form();
 
         $data = array(
             'entry[url]' => $this->url,
@@ -46,7 +46,7 @@ class EntryControllerTest extends WallabagCoreTestCase
         $client->followRedirect();
 
         $client->request('GET', '/unread/list');
-        $this->assertContains('There is one entry.', $client->getResponse()->getContent());
+        $this->assertContains('entry.list.number_on_the_page', $client->getResponse()->getContent());
     }
 
     public function testGetNew()
@@ -59,7 +59,7 @@ class EntryControllerTest extends WallabagCoreTestCase
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
 
         $this->assertCount(1, $crawler->filter('input[type=url]'));
-        $this->assertCount(1, $crawler->filter('button[type=submit]'));
+        $this->assertCount(1, $crawler->filter('form[name=entry]'));
     }
 
     public function testPostNewViaBookmarklet()
@@ -96,7 +96,7 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
 
-        $form = $crawler->filter('button[type=submit]')->form();
+        $form = $crawler->filter('form[name=entry]')->form();
 
         $crawler = $client->submit($form);
 
@@ -117,7 +117,7 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
 
-        $form = $crawler->filter('button[type=submit]')->form();
+        $form = $crawler->filter('form[name=entry]')->form();
 
         $data = array(
             'entry[url]' => $this->url,
@@ -146,7 +146,7 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
 
-        $form = $crawler->filter('button[type=submit]')->form();
+        $form = $crawler->filter('form[name=entry]')->form();
 
         $data = array(
             'entry[url]' => $this->url,
@@ -170,7 +170,7 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
 
-        $form = $crawler->filter('button[type=submit]')->form();
+        $form = $crawler->filter('form[name=entry]')->form();
 
         $data = array(
             'entry[url]' => $url = 'https://github.com/wallabag/wallabag',
index b9f5d835589676beb6890612a2e39d6ee93e1a06..5c098cc28aa37fa6ed271b93cd68f9a8c85abfd6 100644 (file)
@@ -12,53 +12,59 @@ class SecurityControllerTest extends WallabagCoreTestCase
         $client = $this->getClient();
         $client->followRedirects();
 
-        $client->request('GET', '/config');
-        $this->assertContains('RSS', $client->getResponse()->getContent());
+        $crawler = $client->request('GET', '/config');
+        $this->assertContains('config.form_rss.description', $crawler->filter('body')->extract(array('_text'))[0]);
     }
 
     public function testLoginWith2Factor()
     {
         $client = $this->getClient();
 
-        if ($client->getContainer()->getParameter('twofactor_auth')) {
-            $client->followRedirects();
+        if (!$client->getContainer()->getParameter('twofactor_auth')) {
+            $this->markTestSkipped('twofactor_auth is not enabled.');
+            return;
+        }
 
-            $em = $client->getContainer()->get('doctrine.orm.entity_manager');
-            $user = $em
-                ->getRepository('WallabagUserBundle:User')
-                ->findOneByUsername('admin');
-            $user->setTwoFactorAuthentication(true);
-            $em->persist($user);
-            $em->flush();
+        $client->followRedirects();
 
-            $this->logInAs('admin');
-            $client->request('GET', '/config');
-            $this->assertContains('trusted computer', $client->getResponse()->getContent());
+        $em = $client->getContainer()->get('doctrine.orm.entity_manager');
+        $user = $em
+            ->getRepository('WallabagUserBundle:User')
+            ->findOneByUsername('admin');
+        $user->setTwoFactorAuthentication(true);
+        $em->persist($user);
+        $em->flush();
 
-            // restore user
-            $user = $em
-                ->getRepository('WallabagUserBundle:User')
-                ->findOneByUsername('admin');
-            $user->setTwoFactorAuthentication(false);
-            $em->persist($user);
-            $em->flush();
-        }
+        $this->logInAs('admin');
+        $crawler = $client->request('GET', '/config');
+        $this->assertContains('scheb_two_factor.trusted', $crawler->filter('body')->extract(array('_text'))[0]);
+
+        // restore user
+        $user = $em
+            ->getRepository('WallabagUserBundle:User')
+            ->findOneByUsername('admin');
+        $user->setTwoFactorAuthentication(false);
+        $em->persist($user);
+        $em->flush();
     }
 
     public function testTrustedComputer()
     {
         $client = $this->getClient();
 
-        if ($client->getContainer()->getParameter('twofactor_auth')) {
-            $em = $client->getContainer()->get('doctrine.orm.entity_manager');
-            $user = $em
-                ->getRepository('WallabagUserBundle:User')
-                ->findOneByUsername('admin');
-
-            $date = new \DateTime();
-            $user->addTrustedComputer('ABCDEF', $date->add(new \DateInterval('P1M')));
-            $this->assertTrue($user->isTrustedComputer('ABCDEF'));
-            $this->assertFalse($user->isTrustedComputer('FEDCBA'));
+        if (!$client->getContainer()->getParameter('twofactor_auth')) {
+            $this->markTestSkipped('twofactor_auth is not enabled.');
+            return;
         }
+
+        $em = $client->getContainer()->get('doctrine.orm.entity_manager');
+        $user = $em
+            ->getRepository('WallabagUserBundle:User')
+            ->findOneByUsername('admin');
+
+        $date = new \DateTime();
+        $user->addTrustedComputer('ABCDEF', $date->add(new \DateInterval('P1M')));
+        $this->assertTrue($user->isTrustedComputer('ABCDEF'));
+        $this->assertFalse($user->isTrustedComputer('FEDCBA'));
     }
 }
index d639128224f60a149cb6989ffafd1f305ea85316..338121e7e1312a13144afbd69961566aaaa13919 100644 (file)
@@ -30,7 +30,7 @@ class TagControllerTest extends WallabagCoreTestCase
 
         $crawler = $client->request('GET', '/view/'.$entry->getId());
 
-        $form = $crawler->filter('button[id=tag_save]')->form();
+        $form = $crawler->filter('form[name=tag]')->form();
 
         $data = array(
             'tag[label]' => $this->tagName,
index c88e115e4a426ae29b5da248092993c4a3db1965..7a35514baf7803584f0ba08aea509b6c80545352 100644 (file)
@@ -17,8 +17,8 @@ class PocketController extends Controller
     {
         $pocket = $this->get('wallabag_import.pocket.import');
         $form = $this->createFormBuilder($pocket)
-            ->add('read', CheckboxType::class, array(
-                'label' => 'Mark all as read',
+            ->add('mark_as_read', CheckboxType::class, array(
+                'label' => 'import.form.mark_as_read_label',
                 'required' => false,
             ))
             ->getForm();
@@ -39,7 +39,7 @@ class PocketController extends Controller
             ->getRequestToken($this->generateUrl('import', array(), UrlGeneratorInterface::ABSOLUTE_URL));
 
         $this->get('session')->set('import.pocket.code', $requestToken);
-        $this->get('session')->set('read', $request->request->get('form')['read']);
+        $this->get('session')->set('mark_as_read', $request->request->get('form')['mark_as_read']);
 
         return $this->redirect(
             'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', array(), UrlGeneratorInterface::ABSOLUTE_URL),
@@ -54,8 +54,8 @@ class PocketController extends Controller
     {
         $message = 'Import failed, please try again.';
         $pocket = $this->get('wallabag_import.pocket.import');
-        $markAsRead = $this->get('session')->get('read');
-        $this->get('session')->remove('read');
+        $markAsRead = $this->get('session')->get('mark_as_read');
+        $this->get('session')->remove('mark_as_read');
 
         // something bad happend on pocket side
         if (false === $pocket->authorize($this->get('session')->get('import.pocket.code'))) {
index 386703796bbcbc34218c25697e792b0a3daec521..e0a44c366515d8a8302375c5d7c7af44c8d092c7 100644 (file)
@@ -13,12 +13,16 @@ class UploadImportType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('file', FileType::class)
+            ->add('file', FileType::class, array(
+                'label' => 'import.form.file_label',
+            ))
             ->add('mark_as_read', CheckboxType::class, array(
-                'label' => 'Mark all as read',
+                'label' => 'import.form.mark_as_read_label',
                 'required' => false,
             ))
-            ->add('save', SubmitType::class)
+            ->add('save', SubmitType::class, array(
+                'label' => 'import.form.save_label',
+            ))
         ;
     }
 
index 238ddbd1f71548b304a24489b095a0e98f0b6fd4..4499ce6993563f41d1eccfddbf1b22f1743cb9e7 100644 (file)
@@ -60,7 +60,7 @@ class PocketImport implements ImportInterface
      */
     public function getDescription()
     {
-        return 'This importer will import all your Pocket data. Pocket doesn\'t allow us to retrieve content from their service, so the readable content of each article will be re-fetched by wallabag.';
+        return 'import.pocket.description';
     }
 
     /**
@@ -139,7 +139,7 @@ class PocketImport implements ImportInterface
     /**
      * Get whether articles must be all marked as read.
      */
-    public function getRead()
+    public function getMarkAsRead()
     {
         return $this->markAsRead;
     }
index 1d773d3bb58e2094ac057c490121c5dc9883479d..173a587f1cd6ea4c472f6ce78ff4112e50da493b 100644 (file)
@@ -67,7 +67,7 @@ class WallabagV1Import implements ImportInterface
      */
     public function getDescription()
     {
-        return 'This importer will import all your wallabag v1 articles. On your config page, click on "JSON export" in the "Export your wallabag data" section. You will have a "wallabag-export-1-xxxx-xx-xx.json" file.';
+        return 'import.wallabag_v1.description';
     }
 
     /**
index c4bac561580b8338220a268156f3da01bb49364f..0a32864eb04ae16a7efaa0c188fe860343f6d3e3 100644 (file)
@@ -27,7 +27,7 @@ class WallabagV2Import extends WallabagV1Import implements ImportInterface
      */
     public function getDescription()
     {
-        return 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.';
+        return 'import.wallabag_v2.description';
     }
 
     /**
index 8c300624d34912d4ddd1c9f486106006e694aabc..aebbfa208391d8787896269177c66cb5f457523f 100644 (file)
@@ -1,17 +1,18 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
-{% block title %}{% trans %}Import{% endtrans %}{% endblock %}
+
+{% block title %}{{ 'import.page_title'|trans }}{% endblock %}
 
 {% block content %}
 <div class="row">
     <div class="col s12">
         <div class="card-panel settings">
-            {% trans %}Welcome to wallabag importer. Please select your previous service that you want to migrate.{% endtrans %}
+            {{ 'import.page_description'|trans }}
             <ul>
                 {% for import in imports %}
                     <li>
                         <h5>{{ import.name }}</h5>
                         <blockquote>{{ import.description|trans }}</blockquote>
-                        <p><a class="waves-effect waves-light btn" href="{{ path(import.url) }}">{% trans %}Import contents{% endtrans %}</a></p>
+                        <p><a class="waves-effect waves-light btn" href="{{ path(import.url) }}">{{ 'import.action.import_contents'|trans }}</a></p>
                     </li>
                 {% endfor %}
             </ul>
index 3365fc6af1abe0a4ee455254ddaaceb433e4b6dd..401dbd33ada03a5f0651c4cb81f32c4565c13f6f 100644 (file)
@@ -1,5 +1,6 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
-{% block title %}{% trans %}Import > Pocket{% endtrans %}{% endblock %}
+
+{% block title %}{{ 'import.pocket.page_title'|trans }}{% endblock %}
 
 {% block content %}
 <div class="row">
@@ -7,27 +8,29 @@
         <div class="card-panel settings">
             {% if not has_consumer_key %}
                 <div class="card-panel red darken-1">
-                    {% trans %}Pocket import isn't configured.{% endtrans %}
+                    {{ 'import.pocket.config_missing.description'|trans }}
+
                     {% if is_granted('ROLE_SUPER_ADMIN') %}
-                        {% trans with {'%keyurls%': '<a href="' ~ path('craue_config_settings_modify') ~ '#set-import">', '%keyurle%':'</a>'} %}You need to define %keyurls% a pocket_consumer_key %keyurle%.{% endtrans %}
+                        {{ 'import.pocket.config_missing.admin_message'|trans({'%keyurls%': '<a href="' ~ path('craue_config_settings_modify') ~ '#set-import">', '%keyurle%':'</a>'})|raw }}
                     {% else %}
-                        {% trans %}Your server admin needs to define an API Key for Pocket.{% endtrans %}
+                        {{ 'import.pocket.config_missing.user_message'|trans }}
                     {% endif %}
                 </div>
             {% endif %}
 
             <blockquote>{{ import.description|trans }}</blockquote>
-            <p>{% trans %}You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.{% endtrans %}</p>
+            <p>{{ 'import.pocket.authorize_message'|trans }}</p>
+
             <form method="post" action="{{ path('import_pocket_auth') }}">
-            <div class="row">
-                <div class="input-field col s6 with-checkbox">
-                    <h6>{% trans %}Mark all as read ?{% endtrans %}</h6>
-                        {{ form_widget(form.read) }}
-                    <label for="form_read">{% trans %}Mark all imported entries as read{% endtrans %}</label>
+                <div class="row">
+                    <div class="input-field col s6 with-checkbox">
+                        <h6>{{ 'import.form.mark_as_read_title'|trans }}</h6>
+                        {{ form_widget(form.mark_as_read) }}
+                        {{ form_label(form.mark_as_read) }}
+                    </div>
                 </div>
-            </div>
                 <button class="btn waves-effect waves-light" type="submit" name="action">
-                    {% trans %}Connect to Pocket and import data{% endtrans %}
+                    {{ 'import.pocket.connect_to_pocket'|trans }}
                 </button>
             </form>
         </div>
index a418ed1c5585fbe6478c570926b9ac2bc4386de5..13e24c8cf288691849fae482da374796edbfeff2 100644 (file)
@@ -1,5 +1,6 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
-{% block title %}{% trans %}Import > Wallabag v1{% endtrans %}{% endblock %}
+
+{% block title %}{{ 'import.wallabag_v1.page_title'|trans }}{% endblock %}
 
 {% block content %}
 <div class="row">
@@ -7,7 +8,8 @@
         <div class="card-panel settings">
             <div class="row">
                 <blockquote>{{ import.description|trans }}</blockquote>
-                <p>{% trans %}Please select your wallabag export and click on the below button to upload and import it.{% endtrans %}</p>
+                <p>{{ 'import.wallabag_v1.how_to'|trans }}</p>
+
                 <div class="col s12">
                     {{ form_start(form, {'method': 'POST'}) }}
                         {{ form_errors(form) }}
@@ -15,7 +17,7 @@
                             <div class="file-field input-field col s12">
                                 {{ form_errors(form.file) }}
                                 <div class="btn">
-                                    <span>{% trans %}File{% endtrans %}</span>
+                                    <span>{{ form.file.vars.label|trans }}</span>
                                     {{ form_widget(form.file) }}
                                 </div>
                                 <div class="file-path-wrapper">
                                 </div>
                             </div>
                             <div class="input-field col s6 with-checkbox">
-                                <h6>{% trans %}Mark all as read ?{% endtrans %}</h6>
+                                <h6>{{ 'import.form.mark_as_read_title'|trans }}</h6>
                                 {{ form_widget(form.mark_as_read) }}
-                                <label for="upload_import_file_mark_as_read">{% trans %}Mark all imported entries as read{% endtrans %}</label>
+                                {{ form_label(form.mark_as_read) }}
                             </div>
                         </div>
-                        <div class="hidden">{{ form_rest(form) }}</div>
-                        <button class="btn waves-effect waves-light" type="submit" name="action">
-                            {% trans %}Upload file{% endtrans %}
-                        </button>
+
+                        {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }}
+
+                        {{ form_rest(form) }}
                     </form>
                 </div>
             </div>
index 78fe67e4621111c22e18d1e97e0be027cff0e0eb..c2905fc6461cf9c36054770d649205bd5995dca3 100644 (file)
@@ -1,2 +1,3 @@
 {% extends "WallabagImportBundle:WallabagV1:index.html.twig" %}
-{% block title %}{% trans %}Import > Wallabag v2{% endtrans %}{% endblock %}
+
+{% block title %}{{ 'import.wallabag_v2.page_title'|trans }}{% endblock %}
index 7f97b0f5522719505d75e323296cda498e5f6837..6c876b3b419eeea6a2e7e2da60b815af4905aac0 100644 (file)
@@ -54,8 +54,8 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
 
         $this->assertTrue($content->getTags()->contains($tag));
 
-        $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
-        $this->assertContains('Import summary', $alert[0]);
+        $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
+        $this->assertContains('Import summary', $body[0]);
     }
 
     public function testImportWallabagWithFileAndMarkAllAsRead()
@@ -99,7 +99,8 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
 
         $this->assertTrue($content2->isArchived());
 
-        $this->assertContains('Import summary', $client->getResponse()->getContent());
+        $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
+        $this->assertContains('Import summary', $body[0]);
     }
 
     public function testImportWallabagWithEmptyFile()
@@ -122,7 +123,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
 
         $crawler = $client->followRedirect();
 
-        $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
-        $this->assertContains('Import failed, please try again', $alert[0]);
+        $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
+        $this->assertContains('Import failed, please try again', $body[0]);
     }
 }
index 617c0517797702d88728f53e422ebff5eedbc994..58baa8360cb3af0af413c0f2cdc4a5fc6415af46 100644 (file)
@@ -39,8 +39,8 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
 
         $crawler = $client->followRedirect();
 
-        $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
-        $this->assertContains('Import summary', $alert[0]);
+        $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
+        $this->assertContains('Import summary', $body[0]);
 
         $content = $client->getContainer()
             ->get('doctrine.orm.entity_manager')
@@ -87,7 +87,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
 
         $crawler = $client->followRedirect();
 
-        $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
-        $this->assertContains('Import failed, please try again', $alert[0]);
+        $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
+        $this->assertContains('Import failed, please try again', $body[0]);
     }
 }
index 450cdc9533724f98301348b6c68ccc52cbdbb21d..43b60ec3eac0b5404d24150001a32017caa14166 100644 (file)
@@ -85,7 +85,7 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals('Pocket', $pocketImport->getName());
         $this->assertNotEmpty($pocketImport->getUrl());
-        $this->assertContains('This importer will import all your Pocket data.', $pocketImport->getDescription());
+        $this->assertEquals('import.pocket.description', $pocketImport->getDescription());
     }
 
     public function testOAuthRequest()
index 8ab7e83012b7298d138aa0ef998c88522d2d525b..496cf2d37dc23d44235297686eaf7cce8e70ab5c 100644 (file)
@@ -45,7 +45,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals('wallabag v1', $wallabagV1Import->getName());
         $this->assertNotEmpty($wallabagV1Import->getUrl());
-        $this->assertContains('This importer will import all your wallabag v1 articles.', $wallabagV1Import->getDescription());
+        $this->assertEquals('import.wallabag_v1.description', $wallabagV1Import->getDescription());
     }
 
     public function testImport()
index 2b642d2743af6b3803aef221887610e43a5a99e4..341b107620a619f9878a14f9f93a5b6c2ab69267 100644 (file)
@@ -45,7 +45,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals('wallabag v2', $wallabagV2Import->getName());
         $this->assertNotEmpty($wallabagV2Import->getUrl());
-        $this->assertContains('This importer will import all your wallabag v2 articles.', $wallabagV2Import->getDescription());
+        $this->assertEquals('import.wallabag_v2.description', $wallabagV2Import->getDescription());
     }
 
     public function testImport()
index 4da6075f414c4cb7f62145ade18e386ea970a088..85f2ea9cc5fdf7769dd848a54d2afc02fd850ab2 100644 (file)
@@ -1,7 +1,11 @@
 # Two factor mail
-auth_code.mailer.subject: 'Wallabag authentication Code'
-auth_code.mailer.body.hello: "Hi %user%,"
-auth_code.mailer.body.first_para: "Since you enable two factor authentication on your wallabag account and you just logged in from a new device (computer, phone, etc.), we send you a code to validate your connection."
-auth_code.mailer.body.second_para: "Here is the code:"
-auth_code.mailer.body.support: "Please don't hesitate to contact us if you have any problems:"
-auth_code.mailer.body.signature: "The wallabag team"
+auth_code:
+    on: 'on'
+    mailer:
+        subject: 'Wallabag authentication Code'
+        body:
+            hello: "Hi %user%,"
+            first_para: "Since you enable two factor authentication on your wallabag account and you just logged in from a new device (computer, phone, etc.), we send you a code to validate your connection."
+            second_para: "Here is the code:"
+            support: "Please don't hesitate to contact us if you have any problems:"
+            signature: "The wallabag team"
index b4448d3a4eeba9658f2b9a43c87b5b50110f22bd..30ab5dd9ecf96ade89ca24e3c7d1a173753084ef 100644 (file)
@@ -1,7 +1,11 @@
 # Two factor mail
-auth_code.mailer.subject: "Code d'authentification wallabag"
-auth_code.mailer.body.hello: "Bonjour %user%,"
-auth_code.mailer.body.first_para: "Comme vous avez activé la double authentification sur votre compte wallabag et que vous venez de vous connecter depuis un nouvel appareil (ordinateur, téléphone, etc.), nous vous envoyons un code pour valider votre connexion."
-auth_code.mailer.body.second_para: "Voici le code Ã  renseigner :"
-auth_code.mailer.body.support: "Si vous avez un problème de connexion, n'hésitez pas Ã  contacter le support :"
-auth_code.mailer.body.signature: "L'équipe wallabag"
+auth_code:
+    on: 'sur'
+    mailer:
+        subject: "Code d'authentification wallabag"
+        body:
+            hello: "Bonjour %user%,"
+            first_para: "Comme vous avez activé la double authentification sur votre compte wallabag et que vous venez de vous connecter depuis un nouvel appareil (ordinateur, téléphone, etc.), nous vous envoyons un code pour valider votre connexion."
+            second_para: "Voici le code Ã  renseigner :"
+            support: "Si vous avez un problème de connexion, n'hésitez pas Ã  contacter le support :"
+            signature: "L'équipe wallabag"
index d1fcb0e03865a9a20988c658ef63d689b18e97a7..706463553af68a024290843b4d32f92b3e9890e3 100644 (file)
@@ -1,7 +1,11 @@
 # Two factor mail
-auth_code.mailer.subject: 'Wallabag DoÄŸrulama Kodu'
-auth_code.mailer.body.hello: "Merhaba %user%,"
-auth_code.mailer.body.first_para: "wallabag hesabınızda iki adımlı doÄŸrulamayı etkinleÅŸtirdiÄŸinizde ve bu yeni cihaz olduÄŸunda (bilgisayar, telefon, vs.), biz size bu iÅŸlemi doÄŸrulamak için bir kod göndeririz."
-auth_code.mailer.body.second_para: "Bu iÅŸlem için doÄŸrulama kodunuz:"
-auth_code.mailer.body.support: "EÄŸer herhangi bir soru/sorununuz varsa, bizimle iletiÅŸime geçmekten Ã§ekinmeyin:"
-auth_code.mailer.body.signature: "wallabag ekibi"
+auth_code:
+    on: 'on'
+    mailer:
+        subject: 'Wallabag DoÄŸrulama Kodu'
+        body:
+            hello: "Merhaba %user%,"
+            first_para: "wallabag hesabınızda iki adımlı doÄŸrulamayı etkinleÅŸtirdiÄŸinizde ve bu yeni cihaz olduÄŸunda (bilgisayar, telefon, vs.), biz size bu iÅŸlemi doÄŸrulamak için bir kod göndeririz."
+            second_para: "Bu iÅŸlem için doÄŸrulama kodunuz:"
+            support: "EÄŸer herhangi bir soru/sorununuz varsa, bizimle iletiÅŸime geçmekten Ã§ekinmeyin:"
+            signature: "wallabag ekibi"
similarity index 96%
rename from src/Wallabag/UserBundle/Resources/views/themes/material/Authentication/form.html.twig
rename to src/Wallabag/UserBundle/Resources/views/Authentication/form.html.twig
index fa0e3dc1bba9eb2961e8750bbce9301e9386ad2a..acf69196bb8d79cc5191846763bf818f862491cc 100644 (file)
@@ -23,7 +23,7 @@
         </div>
     </div>
     <div class="card-action center">
-        <a href="{{ path('fos_user_security_logout') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Cancel{% endtrans %}</a>
+        <a href="{{ path('fos_user_security_logout') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {{ 'security.login.cancel'|trans }}</a>
         <button class="btn waves-effect waves-light" type="submit" name="send">
             {{ "scheb_two_factor.login"|trans }}
             <i class="mdi-content-send right"></i>
similarity index 84%
rename from src/Wallabag/UserBundle/Resources/views/themes/material/Registration/confirmed.html.twig
rename to src/Wallabag/UserBundle/Resources/views/Registration/confirmed.html.twig
index c6d4d3d210f99205a918f398c38d9bc2c0a34cec..674eb217efad519d4ab012766f0524654630e955 100644 (file)
@@ -11,7 +11,7 @@
         {% endif %}
     </div>
     <div class="card-action center">
-        <a href="{{ path('homepage') }}" class="waves-effect waves-light btn"><i class="material-icons left"></i> {% trans %}Go to your account{% endtrans %}</a>
+        <a href="{{ path('homepage') }}" class="waves-effect waves-light btn"><i class="material-icons left"></i> {{ 'security.register.go_to_account'|trans }}</a>
     </div>
 </div>
 {% endblock fos_user_content %}
similarity index 97%
rename from src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig
rename to src/Wallabag/UserBundle/Resources/views/Registration/register_content.html.twig
index e92b515e34d6baa8fc3a18620dda6892393f4fe5..7d2b45d4bb0ed49ef4db86315654e8d840d6b930 100644 (file)
@@ -36,7 +36,7 @@
         </div>
     </div>
     <div class="card-action center">
-        <a href="{{ path('fos_user_security_login') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Login{% endtrans %}</a>
+        <a href="{{ path('fos_user_security_login') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {{ 'security.login.submit'|trans }}</a>
         <button class="btn waves-effect waves-light" type="submit" name="send">
             {{ 'registration.submit'|trans({}, 'FOSUserBundle') }}
             <i class="mdi-content-send right"></i>
similarity index 82%
rename from src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/request_content.html.twig
rename to src/Wallabag/UserBundle/Resources/views/Resetting/request_content.html.twig
index e871d7bebd2584a477e0d5403978af4561de0cff..7a5ac83836c421478d6c2f469a16f70f58fb5d11 100644 (file)
@@ -1,8 +1,10 @@
 {% trans_default_domain 'FOSUserBundle' %}
+
 <form action="{{ path('fos_user_resetting_send_email') }}" method="POST" class="fos_user_resetting_request">
     <div class="card-content">
         <div class="row">
-        <p>{% trans %}Enter your email address below and we'll send you password reset instructions.{% endtrans %}</p>
+            <p>{{ 'security.resetting.description'|trans({}, "messages") }}</p>
+
             {% for flashMessage in app.session.flashbag.get('notice') %}
                 <span class="black-text"><p>{{ flashMessage }}</p></span>
             {% endfor %}
@@ -18,7 +20,9 @@
         </div>
     </div>
     <div class="card-action center">
-        <a href="{{ path('fos_user_security_login') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Login{% endtrans %}</a>
+        <a href="{{ path('fos_user_security_login') }}" class="waves-effect waves-light grey btn">
+            <i class="material-icons left"></i> {{ 'security.login.submit'|trans({}, "messages") }}
+        </a>
         <button class="btn waves-effect waves-light" type="submit" name="send">
             {{ 'resetting.request.submit'|trans }}
         </button>
similarity index 75%
rename from src/Wallabag/UserBundle/Resources/views/themes/material/Security/login.html.twig
rename to src/Wallabag/UserBundle/Resources/views/Security/login.html.twig
index 6bf99bf88ab351e2e1514f6f2f02970d222287a3..982a33b28f953be743ed098b680b141e382d7ccd 100644 (file)
         <div class="row">
 
             <div class="input-field col s12">
-                <label for="username">{% trans %}Username{% endtrans %}</label>
+                <label for="username">{{ 'security.login.username'|trans }}</label>
                 <input type="text" id="username" name="_username" value="{{ last_username }}" />
             </div>
 
             <div class="input-field col s12">
-                <label for="password">{% trans %}Password{% endtrans %}</label>
+                <label for="password">{{ 'security.login.password'|trans }}</label>
                 <input type="password" id="password" name="_password" />
             </div>
 
             <div class="input-field col s12">
                 <input type="checkbox" id="remember_me" name="_remember_me" checked />
-                <label for="remember_me">{% trans %}Keep me logged in{% endtrans %}</label>
+                <label for="remember_me">{{ 'security.login.keep_logged_in'|trans }}</label>
             </div>
 
         </div>
     </div>
     <div class="card-action center">
         <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
-        <a href="{{ path('fos_user_registration_register') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Register{% endtrans %}</a>
+        <a href="{{ path('fos_user_registration_register') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {{ 'security.login.register'|trans }}</a>
         <button class="btn waves-effect waves-light" type="submit" name="send">
-            {% trans %}Login{% endtrans %}
+            {{ 'security.login.submit'|trans }}
             <i class="mdi-content-send right"></i>
         </button>
     </div>
     <div class="center">
-        <a href="{{ path('fos_user_resetting_request') }}">{% trans %}Forgot your password?{% endtrans %}</a>
+        <a href="{{ path('fos_user_resetting_request') }}">{{ 'security.login.forgot_password'|trans }}</a>
     </div>
 </form>
 {% endblock fos_user_content %}
index 69d231600e7acb7d26c543ebe171e19f6a898ac4..c44fcfb774f128f5001190f3aa36b9b7b631316f 100644 (file)
@@ -77,7 +77,7 @@
                         <td style="padding: 20px;" width="96px" valign="top"><img class="image_fix" src="{{ wallabag_url }}/themes/material/img/logo-other_themes.png" alt="logo" title="{{ wallabag_url }}" style="width: 96px; height: 96px;" /></td>
                         <td style="padding: 20px; padding-left: 0;" valign="top" id="cell_desc">
                             <h1>wallabag</h1>
-                            <h5>{% trans %}on{% endtrans %} {{ wallabag_url }}</h5>
+                            <h5>{{ "auth_code.on"|trans({}, 'wallabag_user') }} {{ wallabag_url }}</h5>
                         </td>
                     </tr>
                     <tr><td colspan="2" style="padding: 0;"><div style="height: 0; border-top: 1px solid #c5c5c5;">&nbsp;</div></td></tr>
similarity index 88%
rename from src/Wallabag/UserBundle/Resources/views/themes/material/layout.html.twig
rename to src/Wallabag/UserBundle/Resources/views/layout.html.twig
index cbdc1da205e281cf0d891418ee2f3b133882a3f1..1d0189ca78f24ec3597fdc2971f79c78ec5ad5a7 100644 (file)
@@ -1,6 +1,6 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}Welcome to wallabag!{% endtrans %}{% endblock %}
+{% block title %}{{ 'security.login.page_title'|trans }}{% endblock %}
 
 {% block body_class %}login{% endblock %}
 
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Authentication/form.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Authentication/form.html.twig
deleted file mode 100644 (file)
index 5bb9108..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-{% extends "WallabagUserBundle::layout.html.twig" %}
-
-{% block fos_user_content %}
-<form class="form" action="" method="post">
-    <fieldset class="w500p center">
-        {% for flashMessage in app.session.flashbag.get("two_factor") %}
-        <p class="error">{{ flashMessage|trans }}</p>
-        {% endfor %}
-
-        <div class="row">
-            <label for="_auth_code">{{ "scheb_two_factor.auth_code"|trans }}</label>
-            <input id="_auth_code" type="text" autocomplete="off" name="_auth_code" />
-        </div>
-
-        {% if useTrustedOption %}
-        <div class="row">
-            <input id="_trusted" type="checkbox" name="_trusted" />
-            <label for="_trusted">{{ "scheb_two_factor.trusted"|trans }}</label>
-        </div>
-        {% endif %}
-
-        <div class="row mts txtcenter">
-            <a href="{{ path('fos_user_security_logout') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Cancel{% endtrans %}</a>
-            <button type="submit" name="send">
-                {{ "scheb_two_factor.login"|trans }}
-                <i class="mdi-content-send right"></i>
-            </button>
-        </div>
-    </fieldset>
-
-</form>
-{% endblock %}
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig
deleted file mode 100644 (file)
index 2713bf4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends "WallabagCoreBundle::layout.html.twig" %}
-
-{% block title %}{% trans %}create an account{% endtrans %}{% endblock %}
-
-{% block body_class %}login{% endblock %}
-
-{% block menu %}{% endblock %}
-{% block messages %}{% endblock %}
-
-{% block content %}
-    {{ form_start(form) }}
-        <fieldset class="w500p center">
-            <h2 class="mbs txtcenter">{% trans %}create an account{% endtrans %}</h2>
-        {% include "FOSUserBundle:Registration:register_content.html.twig" %}
-        </fieldset>
-    </form>
-{% endblock %}
-
-{% block footer %}
-{% endblock %}
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register_content.html.twig
deleted file mode 100644 (file)
index 41f9400..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-{% trans_default_domain 'FOSUserBundle' %}
-
-{{ form_widget(form._token) }}
-
-{% for flashMessage in app.session.flashbag.get('notice') %}
-    <span><p>{{ flashMessage }}</p></span>
-{% endfor %}
-
-<div class="row">
-    {{ form_errors(form.email) }}
-    {{ form_label(form.email) }}
-    {{ form_widget(form.email) }}
-</div>
-
-<div class="row">
-    {{ form_errors(form.username) }}
-    {{ form_label(form.username) }}
-    {{ form_widget(form.username) }}
-</div>
-
-<div class="row">
-    {{ form_errors(form.plainPassword.first) }}
-    {{ form_label(form.plainPassword.first) }}
-    {{ form_widget(form.plainPassword.first) }}
-</div>
-
-<div class="row">
-    {{ form_errors(form.plainPassword.second) }}
-    {{ form_label(form.plainPassword.second) }}
-    {{ form_widget(form.plainPassword.second) }}
-</div>
-
-
-<div class="row mts txtcenter">
-    <button type="submit">{{ 'registration.submit'|trans({}, 'FOSUserBundle') }}</button>
-    <a href="{{ path('fos_user_security_login') }}" class="button">{% trans %}Login{% endtrans %}</a>
-</div>
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/checkEmail.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/checkEmail.html.twig
deleted file mode 100644 (file)
index 056d65b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "WallabagCoreBundle::layout.html.twig" %}
-
-{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %}
-
-{% block body_class %}login{% endblock %}
-
-{% block menu %}{% endblock %}
-
-{% block content %}
-    <form>
-        <fieldset class="w500p center">
-            <h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2>
-
-            <p>{{ 'An email has been sent to %email%. It contains a link you must click to reset your password.'|trans({'%email%': email}) }}</p>
-        </fieldset>
-    </form>
-{% endblock %}
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request.html.twig
deleted file mode 100644 (file)
index 10094e8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends "WallabagCoreBundle::layout.html.twig" %}
-
-{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %}
-
-{% block body_class %}login{% endblock %}
-
-{% block menu %}{% endblock %}
-{% block messages %}{% endblock %}
-
-{% block content %}
-        <form action="{{ path('fos_user_resetting_send_email') }}" method="post" name="forgotPasswordform">
-            <fieldset class="w500p center">
-                <h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2>
-                {% include "FOSUserBundle:Resetting:request_content.html.twig" %}
-            </fieldset>
-        </form>
-{% endblock %}
-
-{% block footer %}
-{% endblock %}
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request_content.html.twig
deleted file mode 100644 (file)
index 1f8da8d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{% trans_default_domain 'FOSUserBundle' %}
-
-{% trans %}Enter your email address below and we'll send you password reset instructions.{% endtrans %}
-
-{% if invalid_username is defined %}
-    <p>{{ 'resetting.request.invalid_username'|trans({'%username%': invalid_username}) }}</p>
-{% endif %}
-
-<div class="row">
-    <label for="username">{{ 'resetting.request.username'|trans }}</label>
-    <input type="text" id="username" name="username" required="required" />
-</div>
-
-<div class="row mts txtcenter">
-    <button type="submit">{{ 'resetting.request.submit'|trans }}</button>
-    <a href="{{ path('fos_user_security_login') }}" class="button">{% trans %}Login{% endtrans %}</a>
-</div>
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Security/login.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Security/login.html.twig
deleted file mode 100644 (file)
index d52c366..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-{% extends "FOSUserBundle::layout.html.twig" %}
-
-{% block fos_user_content %}
-        <form action="{{ path('fos_user_security_check') }}" method="post" name="loginform">
-            <fieldset class="w500p center">
-                <h2 class="mbs txtcenter">{% trans %}Login to wallabag{% endtrans %}</h2>
-                {% if error %}
-                    <div>{{ error.message }}</div>
-                {% endif %}
-
-                {% for flashMessage in app.session.flashbag.get('notice') %}
-                    <p>{{ flashMessage }}</p>
-                {% endfor %}
-
-                <div class="row">
-                    <label class="col w150p" for="username">{% trans %}Username{% endtrans %}</label>
-                    <input type="text" id="username" name="_username" value="{{ last_username }}" />
-                </div>
-
-                <div class="row">
-                    <label class="col w150p" for="password">{% trans %}Password{% endtrans %}</label>
-                    <input type="password" id="password" name="_password" />
-                </div>
-
-                <div class="row mts txtcenter">
-                    <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
-                    <button type="submit">Login</button>
-                    <a href="{{ path('fos_user_registration_register') }}" class="button">{% trans %}Register{% endtrans %}</a>
-                    <a href="{{ path('fos_user_resetting_request') }}" class="small">Forgot your password?</a>
-                </div>
-            </fieldset>
-        </form>
-{% endblock %}
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/layout.html.twig
deleted file mode 100644 (file)
index 60b321b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{% extends "WallabagCoreBundle::layout.html.twig" %}
-
-{% block title %}{% trans %}Welcome to wallabag!{% endtrans %}{% endblock %}
-
-{% block body_class %}login{% endblock %}
-
-{% block menu %}{% endblock %}
-{% block messages %}{% endblock %}
-
-{% block content %}
-    {% block fos_user_content %}
-    {% endblock fos_user_content %}
-{% endblock %}
-
-{% block footer %}
-{% endblock %}