Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
add heading and i18n to editTags
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckegg committed Sep 14, 2018
1 parent c629be3 commit 51a77d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion locales/en.json
Expand Up @@ -252,5 +252,7 @@
"Applied Tags": "Applied Tags",
"View Taggers": "View Taggers",
" Taggers": " Taggers",
"Back": "Back"
"Back": "Back",
"Add tags here": "Add tags here",
"Add/Edit Tags": "Add/Edit Tags"
}
15 changes: 12 additions & 3 deletions modules/sheet/editTags.js
Expand Up @@ -15,10 +15,12 @@ exports.needs = nest({
'sbot.obs.connection': 'first',
'sheet.display': 'first',
'tag.async.suggest': 'first',
'tag.html.tag': 'first'
'tag.html.tag': 'first',
'intl.sync.i18n': 'first'
})

exports.create = function (api) {
const i18n = api.intl.sync.i18n
return nest({ 'sheet.editTags': editTags })

function editTags ({ msgId }, callback) {
Expand All @@ -31,7 +33,14 @@ exports.create = function (api) {
const { content, onMount, onSave } = edit({ msgId })

return {
content,
content: [
h('div', [
h('h2', {
style: { 'font-weight': 'normal', 'text-align': 'center' }
}, i18n('Add/Edit Tags')),
content
])
],
footer: [
h('button.save', { 'ev-click': publish }, 'Save'),
h('button.cancel', { 'ev-click': close }, 'Cancel')
Expand Down Expand Up @@ -66,7 +75,7 @@ exports.create = function (api) {
h('StagedTags', concat(a, [b, c])))

const input = h('input.tags', {
placeholder: 'Add tags here',
placeholder: i18n('Add tags here'),
'ev-keyup': onInput,
value: tagsInput()
})
Expand Down

0 comments on commit 51a77d0

Please sign in to comment.