From 8839139a7245babfd9133b01d054a4dd17e9ebc4 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Wed, 27 Jul 2022 02:06:42 +0200 Subject: [PATCH] Add new translations for list management modal --- app/views/modal/_list.haml | 30 +++++++++++++++--------------- config/locales/views.en.yml | 9 +++++++++ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/app/views/modal/_list.haml b/app/views/modal/_list.haml index 0e1b7d2a..5cf1d966 100644 --- a/app/views/modal/_list.haml +++ b/app/views/modal/_list.haml @@ -1,28 +1,28 @@ -.modal.fade#modal-list-memberships{ aria: { hidden: true, labelledby: 'modal-list-memberships-label' }, role: :dialog, tabindex: -1 } +.modal.fade#modal-list-memberships{ aria: { hidden: true, labelledby: "modal-list-memberships-label" }, role: :dialog, tabindex: -1 } .modal-dialog .modal-content .modal-header - %h5.modal-title#modal-list-memberships-label= t 'views.modal.list.title' + %h5.modal-title#modal-list-memberships-label= t(".title") %button.close{ data: { dismiss: :modal }, type: :button } %span{ aria: { hidden: true } } × - %span.sr-only= t 'views.actions.close' + %span.sr-only= t("voc.close") %div{ role: :tabpanel } %ul.nav.nav-tabs.mt-1{ role: :tablist } - %li.nav-item{ role: 'presentation' } - %a.nav-link.active{ href: '#lists-list', aria: { controls: 'lists-list' }, data: { toggle: :tab }, role: :tab } - = t 'views.modal.list.tabs.main' - %li.nav-item{ role: 'presentation' } - %a.nav-link{ href: '#create', aria: { controls: 'create' }, data: { toggle: :tab }, role: :tab } - = t 'views.modal.list.tabs.create' + %li.nav-item{ role: "presentation" } + %a.nav-link.active{ href: "#lists-list", aria: { controls: "lists-list" }, data: { toggle: :tab }, role: :tab } + = t(".tab.list.title") + %li.nav-item{ role: "presentation" } + %a.nav-link{ href: "#create", aria: { controls: "create" }, data: { toggle: :tab }, role: :tab } + = t(".tab.create.title") .tab-content - .tab-pane.active{ role: :tabpanel, id: 'lists-list' } + .tab-pane.active{ role: :tabpanel, id: "lists-list" } %ul.list-group - current_user.lists.each do |list| - = render 'modal/list/item', list: list, user: user - .tab-pane{ role: :tabpanel, id: 'create' } + = render "modal/list/item", list: list, user: user + .tab-pane{ role: :tabpanel, id: "create" } .modal-body - %input.form-control#new-list-name{ type: :text, placeholder: t('views.modal.list.name') } - %button.btn.btn-primary#create-list{ type: :button, data: { user: user.screen_name } }= t('views.modal.list.create') + %input.form-control#new-list-name{ type: :text, placeholder: t(".tab.create.placeholder") } + %button.btn.btn-primary#create-list{ type: :button, data: { user: user.screen_name } }= t(".tab.create.action") .modal-footer - %button.btn.btn-primary{ name: 'gm-save', type: :button, data: { dismiss: :modal } }= t 'views.actions.done' + %button.btn.btn-primary{ name: "gm-save", type: :button, data: { dismiss: :modal } }= t("voc.close") diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index 5d78469f..59eae301 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -159,6 +159,15 @@ en: comment_smiles: title: "People who smiled this comment" none: "No one smiled this comment, yet!" + list: + title: "Manage list memberships" + tab: + list: + title: "Lists" + create: + title: "Create new list" + action: "Create list" + placeholder: "List name" password: title: "Save account changes" ban: