git ssb

2+

mixmix / ticktack



Commit d12d963d1dc2340bf7726e17d111c407fda58c7d

strings, prep for translations, attn: @mixmix

Dominic Tarr committed on 8/11/2017, 8:53:22 AM
Parent: 06176b2a556059bf16c62b812c8f7945dbb692cf

Files changed

app/page/home.jschanged
index.jschanged
translations/sync.jsadded
app/page/home.jsView
@@ -18,18 +18,12 @@
1818 'sbot.pull.log': 'first',
1919 'history.sync.push': 'first',
2020 'keys.sync.id': 'first',
2121 'message.sync.unbox': 'first',
22- 'message.html.markdown': 'first'
22+ 'message.html.markdown': 'first',
23+ 'translations.sync.strings': 'first'
2324 })
2425
25-var strings = {
26- showMore: "Show More",
27- channels: "Channels",
28- directMessages: "Direct Messages",
29- replySymbol: "> "
30-}
31-
3226 function firstLine (text) {
3327 if(text.length < 80 && !~text.indexOf('\n')) return text
3428
3529 var line = ''
@@ -59,8 +53,9 @@
5953 }
6054
6155 exports.create = (api) => {
6256 return nest('app.page.home', function (location) {
57+ var strings = api.translations.sync.strings()
6358 // location here can expected to be: { page: 'home' }
6459
6560 var container = h('div.container', [])
6661
index.jsView
@@ -1,8 +1,9 @@
11 const ticktack = {
22 app: require('./app'),
33 blob: require('./blob'),
44 router: require('./router'),
5- styles: require('./styles')
5+ styles: require('./styles'),
6+ translations: require('./translations/sync')
67 }
78
89 module.exports = ticktack
translations/sync.jsView
@@ -1,0 +1,13 @@
1+
2+exports.gives = {translations: {sync: {strings: true}}}
3+
4+exports.create = function () {
5+ return {translations: {sync: {strings: function () {
6+ return {
7+ showMore: "Show More",
8+ channels: "Channels",
9+ directMessages: "Direct Messages",
10+ replySymbol: "> "
11+ }
12+ }}}}
13+}

Built with git-ssb-web