git ssb

2+

mixmix / ticktack



Commit 337ff74d31eddc3a716cc478e7e24a48610eb10f

add missing translation for comments

mix irving committed on 12/8/2017, 6:40:37 AM
Parent: cbd6bae4225830b0dd2604e026bd6eda962d043e

Files changed

app/html/comments.jschanged
app/page/blogShow.jschanged
translations/en.jschanged
translations/zh.jschanged
app/html/comments.jsView
@@ -14,18 +14,19 @@
1414 'message.html.timeago': 'first',
1515 'message.html.likes': 'first',
1616 'unread.sync.markRead': 'first',
1717 'unread.sync.isUnread': 'first',
18+ 'translations.sync.strings': 'first',
1819 })
1920
2021 exports.create = (api) => {
2122 return nest('app.html.comments', comments)
2223
2324 function comments (root) {
2425 const { messages, channel, lastId: branch } = api.feed.obs.thread(root)
26+ const strings = api.translations.sync.strings()
2527
2628 // TODO - move this up into Patchcore
27- var debouncer = null
2829 const messagesTree = computed(throttle(messages, 200), msgs => {
2930 return msgs
3031 .filter(msg => forkOf(msg) === undefined)
3132 .map(threadMsg => {
@@ -49,13 +50,14 @@
4950
5051 return h('Comments', [
5152 // when(twoComposers, compose({ meta, shrink: true, canAttach: false })),
5253 map(messagesTree, msg => Comment(msg, root, branch)),
53- compose({ meta, shrink: false, canAttach: false }),
54+ compose({ meta, shrink: false, canAttach: false, placeholder: strings.writeComment }),
5455 ])
5556 }
5657
5758 function Comment (msgObs, root, branch) {
59+ const strings = api.translations.sync.strings()
5860 const msg = resolve(msgObs)
5961
6062 const raw = get(msg, 'value.content.text')
6163 var className = api.unread.sync.isUnread(msg) ? ' -unread' : ' -read'
@@ -86,9 +88,10 @@
8688 channel: content.channel
8789 },
8890 shrink: false,
8991 canAttach: false,
90- canPreview: false
92+ canPreview: false,
93+ placeholder: strings.writeComment
9194 }, toggleCompose)
9295
9396 return h('Comment', { className }, [
9497 h('div.left', api.about.html.avatar(author, 'tiny')),
app/page/blogShow.jsView
@@ -17,12 +17,10 @@
1717 'message.html.likes': 'first',
1818 'message.html.markdown': 'first',
1919 'message.html.timeago': 'first',
2020 'feed.obs.thread': 'first',
21-
2221 'blog.html.title': 'first',
2322 'blog.html.content': 'first',
24-
2523 })
2624
2725 exports.create = (api) => {
2826 return nest('app.page.blogShow', blogShow)
translations/en.jsView
@@ -20,8 +20,9 @@
2020 channel: 'Channel',
2121 loading: 'Loading...',
2222 optionalField: 'optional',
2323 writeMessage: 'Write a message',
24+ writeComment: 'Write a comment',
2425 peopleNearby: 'People nearby',
2526 sendMessage: 'Send',
2627 showMore: 'Show More',
2728 directMessages: 'Direct Messages',
translations/zh.jsView
@@ -10,8 +10,9 @@
1010 error: '错误',
1111 errorNotFound: '找不到此页面',
1212 groupNew: '新建群组',
1313 writeMessage: '发私信',
14+ writeComment: '留言',
1415 peopleNearby: '附件的朋友',
1516 blogIndex: {
1617 title: '发现'
1718 },

Built with git-ssb-web