From 0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 9 Mar 2016 08:59:08 +0100 Subject: Convert english translation file - convert english translation to translate key - remove baggy template for login (never used since user isn't logged in and it'll use the default theme: material) - fix tests about text in response (now checking translation key instead of translated text) - remove all ugly `` --- src/Wallabag/CoreBundle/Entity/Config.php | 4 +- .../CoreBundle/Form/Type/ChangePasswordType.php | 16 +- src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 11 +- .../CoreBundle/Form/Type/EditEntryType.php | 19 +- .../CoreBundle/Form/Type/EntryFilterType.php | 16 +- src/Wallabag/CoreBundle/Form/Type/NewEntryType.php | 7 +- src/Wallabag/CoreBundle/Form/Type/NewTagType.php | 2 - src/Wallabag/CoreBundle/Form/Type/NewUserType.php | 22 +- src/Wallabag/CoreBundle/Form/Type/RssType.php | 8 +- .../CoreBundle/Form/Type/TaggingRuleType.php | 13 +- .../CoreBundle/Form/Type/UserInformationType.php | 17 +- .../Resources/translations/messages.en.yml | 334 +++++++++++++++++++++ .../Resources/translations/messages.fr.yml | 19 +- .../views/themes/baggy/Config/index.html.twig | 53 ++-- .../views/themes/baggy/Entry/edit.html.twig | 2 +- .../views/themes/baggy/Entry/entries.html.twig | 105 +++---- .../views/themes/baggy/Entry/entries.xml.twig | 4 +- .../views/themes/baggy/Entry/entry.html.twig | 32 +- .../views/themes/baggy/Entry/new.html.twig | 2 +- .../views/themes/baggy/Entry/new_form.html.twig | 4 +- .../views/themes/baggy/Static/about.html.twig | 52 ++-- .../views/themes/baggy/Static/howto.html.twig | 26 +- .../views/themes/baggy/Static/quickstart.html.twig | 83 ++--- .../views/themes/baggy/Tag/new_form.html.twig | 3 +- .../views/themes/baggy/Tag/tags.html.twig | 18 +- .../Resources/views/themes/baggy/layout.html.twig | 36 +-- .../views/themes/material/Config/index.html.twig | 163 +++++----- .../views/themes/material/Entry/edit.html.twig | 16 +- .../views/themes/material/Entry/entries.html.twig | 65 ++-- .../views/themes/material/Entry/entries.xml.twig | 4 +- .../views/themes/material/Entry/entry.html.twig | 57 ++-- .../views/themes/material/Entry/new.html.twig | 2 +- .../views/themes/material/Entry/new_form.html.twig | 4 +- .../views/themes/material/Static/about.html.twig | 50 +-- .../views/themes/material/Static/howto.html.twig | 36 +-- .../themes/material/Static/quickstart.html.twig | 79 ++--- .../views/themes/material/Tag/new_form.html.twig | 2 +- .../views/themes/material/Tag/tags.html.twig | 4 +- .../views/themes/material/layout.html.twig | 119 +++++--- .../Tests/Controller/ConfigControllerTest.php | 28 +- .../Tests/Controller/EntryControllerTest.php | 16 +- .../Tests/Controller/SecurityControllerTest.php | 70 +++-- .../Tests/Controller/TagControllerTest.php | 2 +- .../ImportBundle/Controller/PocketController.php | 10 +- .../ImportBundle/Form/Type/UploadImportType.php | 10 +- src/Wallabag/ImportBundle/Import/PocketImport.php | 4 +- .../ImportBundle/Import/WallabagV1Import.php | 2 +- .../ImportBundle/Import/WallabagV2Import.php | 2 +- .../Resources/views/Import/index.html.twig | 7 +- .../Resources/views/Pocket/index.html.twig | 27 +- .../Resources/views/WallabagV1/index.html.twig | 20 +- .../Resources/views/WallabagV2/index.html.twig | 3 +- .../Tests/Controller/WallabagV1ControllerTest.php | 11 +- .../Tests/Controller/WallabagV2ControllerTest.php | 8 +- .../ImportBundle/Tests/Import/PocketImportTest.php | 2 +- .../Tests/Import/WallabagV1ImportTest.php | 2 +- .../Tests/Import/WallabagV2ImportTest.php | 2 +- .../Resources/translations/wallabag_user.en.yml | 16 +- .../Resources/translations/wallabag_user.fr.yml | 16 +- .../Resources/translations/wallabag_user.tr.yml | 16 +- .../Resources/views/Authentication/form.html.twig | 33 ++ .../changePassword_content.html.twig | 12 + .../views/Registration/checkEmail.html.twig | 11 + .../views/Registration/confirmed.html.twig | 17 ++ .../views/Registration/register_content.html.twig | 45 +++ .../Resources/views/Resetting/checkEmail.html.twig | 11 + .../Resetting/passwordAlreadyRequested.html.twig | 11 + .../views/Resetting/request_content.html.twig | 30 ++ .../views/Resetting/reset_content.html.twig | 15 + .../Resources/views/Security/login.html.twig | 46 +++ .../views/TwoFactor/email_auth_code.html.twig | 2 +- .../UserBundle/Resources/views/layout.html.twig | 23 ++ .../themes/baggy/Authentication/form.html.twig | 32 -- .../themes/baggy/Registration/register.html.twig | 20 -- .../baggy/Registration/register_content.html.twig | 37 --- .../themes/baggy/Resetting/checkEmail.html.twig | 17 -- .../views/themes/baggy/Resetting/request.html.twig | 20 -- .../baggy/Resetting/request_content.html.twig | 17 -- .../views/themes/baggy/Security/login.html.twig | 33 -- .../Resources/views/themes/baggy/layout.html.twig | 16 - .../themes/material/Authentication/form.html.twig | 33 -- .../changePassword_content.html.twig | 12 - .../material/Registration/checkEmail.html.twig | 11 - .../material/Registration/confirmed.html.twig | 17 -- .../Registration/register_content.html.twig | 45 --- .../themes/material/Resetting/checkEmail.html.twig | 11 - .../Resetting/passwordAlreadyRequested.html.twig | 11 - .../material/Resetting/request_content.html.twig | 26 -- .../material/Resetting/reset_content.html.twig | 15 - .../views/themes/material/Security/login.html.twig | 46 --- .../views/themes/material/layout.html.twig | 23 -- 91 files changed, 1379 insertions(+), 1102 deletions(-) create mode 100644 src/Wallabag/CoreBundle/Resources/translations/messages.en.yml create mode 100644 src/Wallabag/UserBundle/Resources/views/Authentication/form.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/ChangePassword/changePassword_content.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/Registration/checkEmail.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/Registration/confirmed.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/Registration/register_content.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/Resetting/checkEmail.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/Resetting/passwordAlreadyRequested.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/Resetting/request_content.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/Resetting/reset_content.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/Security/login.html.twig create mode 100644 src/Wallabag/UserBundle/Resources/views/layout.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/baggy/Authentication/form.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register_content.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/checkEmail.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request_content.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/baggy/Security/login.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/baggy/layout.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/Authentication/form.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/ChangePassword/changePassword_content.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/Registration/checkEmail.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/Registration/confirmed.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/checkEmail.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/passwordAlreadyRequested.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/request_content.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/reset_content.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/Security/login.html.twig delete mode 100644 src/Wallabag/UserBundle/Resources/views/themes/material/layout.html.twig diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php index e18b543b..a25656d3 100644 --- a/src/Wallabag/CoreBundle/Entity/Config.php +++ b/src/Wallabag/CoreBundle/Entity/Config.php @@ -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; diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php index 7d05a5d8..841af51e 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php @@ -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) ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 0a5ea6cc..25ea9efa 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -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) ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php index 2b1e1ef4..23d7b239 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php @@ -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', + )) ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index ee10bc8b..ec36503b 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php @@ -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', )) ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php index fbce13f1..69fab6fb 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php @@ -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', + )) ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php index 0f559031..c7568de7 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php @@ -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) ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 6eb0e63f..60fcc20c 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php @@ -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) ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/RssType.php b/src/Wallabag/CoreBundle/Form/Type/RssType.php index def8782c..a9f68e54 100644 --- a/src/Wallabag/CoreBundle/Form/Type/RssType.php +++ b/src/Wallabag/CoreBundle/Form/Type/RssType.php @@ -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', + )) ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php index 5815b8c6..cfee21f1 100644 --- a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php +++ b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php @@ -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); diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php index f491b0ae..799ea39e 100644 --- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php @@ -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 index 00000000..22039de3 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -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.
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 « short reading » when the reading time is inferior to 3 minutes.
In that case, you should put « readingTime <= 3 » in the Rule field and « short reading » in the Tags field.
Several tags can added simultaneously by separating them by a comma: « short reading, must read »
Complex rules can be written by using predefined operators: if « readingTime >= 5 AND domainName = "github.com" » then tag as « long reading, github »' + 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 subject is matches a search (case-insensitive).
Example: title matches "football"' + 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: < 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 ♥ on Github' + on_github: 'on GitHub' + project_website: 'Project website' + license: 'License' + version: 'Version' + getting_help: + documentation: 'Documentation' + bug_reports: 'Bug reports' + support: 'On our support website or on GitHub' + 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' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 7c6ad07e..ddc453d0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -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" diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index 54faa788..721948ef 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -1,9 +1,9 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{% trans %}Config{% endtrans %}{% endblock %} +{% block title %}{{ 'config.page_title'|trans }}{% endblock %} {% block content %} -

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

+

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

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

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

+

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

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

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

+

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

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

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

+

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

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

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

+

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

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

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

+

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

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

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

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

{{ entry.title|raw }}

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

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

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

{{ entry.title|raw }}

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

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

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

{{ entry.title|raw }}

+

{{ entry.title|raw }}

{% set nbAnnotations = entry.annotations | length %} - {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %} + {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}
- - - + {{ form_widget(form.new_user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} + {{ form_rest(form.new_user) }}
{% endif %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig index c002c4c3..1c5e2aab 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/edit.html.twig @@ -1,6 +1,6 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{% trans %}Edit an entry{% endtrans %}{% endblock %} +{% block title %}{{ 'entry.edit.page_title'|trans }}{% endblock %} {% block content %} @@ -10,7 +10,6 @@
- {% if form_errors(form) %} {{ form_errors(form) }} {% endif %} @@ -24,17 +23,20 @@ {{ form_widget(form.title) }}
+
+ {{ form_label(form.url) }} + {{ form_widget(form.url) }} +
+
{{ form_widget(form.is_public) }} {{ form_label(form.is_public) }}

- + + {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} - + {{ form_rest(form) }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index 371992df..433b1cae 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig @@ -4,13 +4,13 @@ {% 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 %}
-
{% transchoice entries.count %}{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.{% endtranschoice %}
+
+ {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} +
    {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
  • @@ -52,9 +54,9 @@ {% 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%': '<'} %}estimated reading time: %inferior% 1 min{% endtrans %} + {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} {% endif %}
@@ -72,7 +74,7 @@
- {% trans %}estimated reading time{% endtrans %}: + {{ 'entry.list.reading_time'|trans }} {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}< 1{% endif %} min
@@ -82,13 +84,15 @@ {% endif %} @@ -103,7 +107,7 @@ {% if currentRoute == 'homepage' %} {% set currentRoute = 'unread' %} {% endif %} -

{% trans %}Export{% endtrans %}

+

{{ 'entry.list.export_title'|trans }}