Commit 1c8a7369d59dfeb814f9d7c13340ff287340e963
tweak i18n for summaries (and add missing actions)
Matt McKegg committed on 7/6/2018, 2:44:27 PMParent: d4bc094e28986d19bbf9d6595fdfb78367794373
Files changed
locales/en.json | changed |
modules/feed/html/meta-summary.js | changed |
locales/en.json | ||
---|---|---|
@@ -209,42 +209,24 @@ | ||
209 | 209 | "Update Profile": "Update Profile", |
210 | 210 | "OK": "OK", |
211 | 211 | "You have not made any changes.": "You have not made any changes.", |
212 | 212 | "Nothing to publish": "Nothing to publish", |
213 | - "Edit": "Edit", | |
213 | + "Edit Gathering": "Edit Gathering", | |
214 | 214 | "Only visible to you and people that have been mentioned": "Only visible to you and people that have been mentioned", |
215 | 215 | "Only visible to you and other thread participants": "Only visible to you and other thread participants", |
216 | 216 | "This message will be public and cannot be edited or deleted": "This message will be public and cannot be edited or deleted", |
217 | 217 | "This message will be public and can be edited by anyone": "This message will be public and can be edited by anyone", |
218 | 218 | "Show details": "Show details", |
219 | 219 | "Hide details": "Hide details", |
220 | - "followed %s people": { | |
221 | - "one": "followed %s person", | |
222 | - "other": "followed %s people" | |
220 | + "%s people": { | |
221 | + "one": "%s person", | |
222 | + "other": "%s people" | |
223 | 223 | }, |
224 | - "identified %s people": { | |
225 | - "one": "identified %s person", | |
226 | - "other": "identified %s people" | |
227 | - }, | |
228 | - "subscribed to %s channels": { | |
229 | - "one": "subscribed to %s channel", | |
230 | - "other": "subscribed to %s channels" | |
231 | - }, | |
232 | - "%s people followed": { | |
233 | - "one": "%s person followed", | |
234 | - "other": "%s people followed" | |
235 | - }, | |
236 | - "%s people identified": { | |
237 | - "one": "%s person identified", | |
238 | - "other": "%s people identified" | |
239 | - }, | |
240 | - "%s people subscribed to": { | |
241 | - "one": "%s person subscribed to", | |
242 | - "other": "%s people subscribed to" | |
243 | - }, | |
244 | 224 | "identified": "identified", |
245 | 225 | "followed": "followed", |
226 | + "unfollowed": "unfollowed", | |
246 | 227 | "subscribed to": "subscribed to", |
228 | + "unsubscribed from": "unsubscribed from", | |
247 | 229 | "updated their profile": "updated their profile", |
248 | - "unfollowed": "unfollowed", | |
249 | - "Edit Gathering": "Edit Gathering" | |
230 | + "blocked": "blocked", | |
231 | + "unblocked": "unblocked" | |
250 | 232 | } |
modules/feed/html/meta-summary.js | ||
---|---|---|
@@ -13,29 +13,15 @@ | ||
13 | 13 | 'feed.html.metaSummary': true |
14 | 14 | }) |
15 | 15 | |
16 | 16 | var i18nActions = { |
17 | - from: { | |
18 | - followed: 'followed %s people', | |
19 | - unfollowed: 'unfollowed %s people', | |
20 | - subscribed: 'subscribed to %s channels', | |
21 | - unsubscribed: 'unsubscribed from %s channels', | |
22 | - identified: 'identified %s people' | |
23 | - }, | |
24 | - to: { | |
25 | - followed: '%s people followed', | |
26 | - unfollowed: '%s people unfollowed', | |
27 | - subscribed: '%s people subscribed to', | |
28 | - unsubscribed: '%s unsubscribed from', | |
29 | - identified: '%s people identified' | |
30 | - }, | |
31 | - one: { | |
32 | - followed: 'followed', | |
33 | - unfollowed: 'unfollowed', | |
34 | - subscribed: 'subscribed to', | |
35 | - unsubscribed: 'unsubscribed from', | |
36 | - identified: 'identified' | |
37 | - } | |
17 | + followed: 'followed', | |
18 | + unfollowed: 'unfollowed', | |
19 | + subscribed: 'subscribed to', | |
20 | + unsubscribed: 'unsubscribed from', | |
21 | + identified: 'identified', | |
22 | + blocked: 'blocked', | |
23 | + unblocked: 'unblocked' | |
38 | 24 | } |
39 | 25 | |
40 | 26 | exports.create = function (api) { |
41 | 27 | const i18n = api.intl.sync.i18n |
@@ -100,17 +86,17 @@ | ||
100 | 86 | return computed([ |
101 | 87 | getName(item.from[0]), |
102 | 88 | getName(item.to[0]) |
103 | 89 | ], (a, b) => { |
104 | - return a + ' ' + i18n(i18nActions.one[item.action]) + ' ' + b | |
90 | + return a + ' ' + i18n(i18nActions[item.action]) + ' ' + b | |
105 | 91 | }) |
106 | 92 | } |
107 | 93 | } else if (item.from.length < item.to.length) { |
108 | 94 | let name = getName(item.from[0]) |
109 | - return computed([name, item.to.length], (name, count) => name + ' ' + plural(i18nActions.from[item.action], count)) | |
95 | + return computed([name, item.to.length], (name, count) => name + ' ' + i18n(i18nActions[item.action]) + ' ' + plural('%s people', count)) | |
110 | 96 | } else { |
111 | 97 | let name = getName(item.to[0]) |
112 | - return computed([name, item.from.length], (name, count) => plural(i18nActions.to[item.action], count) + ' ' + name) | |
98 | + return computed([name, item.from.length], (name, count) => plural('%s people', count) + ' ' + i18n(i18nActions[item.action]) + ' ' + name) | |
113 | 99 | } |
114 | 100 | } |
115 | 101 | |
116 | 102 | function getName (id) { |
Built with git-ssb-web