Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
262 changes: 106 additions & 156 deletions locales/en.json
Original file line number Diff line number Diff line change
@@ -1,201 +1,151 @@
{
"$name": "English",
"es": "Spanish",
"ki": "Kashmiri",
"Patchwork": "Patchwork",
"Public": "Public",
"Private": "Private",
"Write a public message": "Write a public message",
"Active Channels": "Active Channels",
"Loading": "Loading",
"Local": "Local",
"Connected Pubs": "Connected Pubs",
"Who to follow": "Who to follow",
"Unsubscribe": "Unsubscribe",
"Subscribe": "Subscribe",
"Publishing...": "Publishing...",
"Publish Privately": "Publish Privately",
"Publish": "Publish",
"Show ": "Show ",
"Welcome to Patchwork": "Welcome to Patchwork",
"You may not be able to see new content until you follow some users or pubs.": "You may not be able to see new content until you follow some users or pubs.",
"For help, see the 'Getting Started' guide at ": "For help, see the 'Getting Started' guide at ",
"update": "update",
"updates": "updates",
"+ Join Pub": "+ Join Pub",
"word, @key, #channel": "word, @key, #channel",
"Profile": "Profile",
"Mentions": "Mentions",
" liked this message": " liked this message",
"View full thread": "View full thread",
" replied": " replied",
" replied to ": " replied to ",
"like": "like",
" and ": " and ",
" followed ": " followed ",
" subscribed to ": " subscribed to ",
"likes": "likes",
" others": " others",
"Write a private reply": "Write a private reply",
"Write a public reply": "Write a public reply",
"Active Channels": "Active Channels",
"More Channels...": "More Channels...",
"Cannot display message.": "Cannot display message.",
"All Posts from Your ": "All Posts from Your ",
"Click to unsubscribe": "Click to unsubscribe",
"Subscribed": "Subscribed",
"Write a message in this channel": "Write a message in this channel\n\n\n\nPeople who follow you or subscribe to this channel will also see this message in their main feed.\n\nTo create a new channel, type the channel name (preceded by a #) into the search box above. e.g #cat-pics",
"liked this message": "liked this message",
"replied to this message": "replied to this message",
"added changes": "added changes",
"mentioned you": "mentioned you",
"mentioned this channel": "mentioned this channel",
"Write a private message": "Write a private message \n\n\n\nThis can only be read by yourself and people you have @mentioned.",
"Local": "Local",
"Connected Pubs": "Connected Pubs",
"Who to follow": "Who to follow",
"Write a private message": "Write a private message",
"Edit Your Profile": "Edit Your Profile",
"Click to unfollow": "Click to unfollow",
"Public key for this profile": "Public key for this profile",
"This person is blocked by %s of your friends.": {
"one": "This person is blocked by %s of your friends.",
"other": "This person is blocked by %s of your friends."
},
"You don't follow anyone who follows this person": "You don't follow anyone who follows this person",
"You might not be seeing their latest messages. You could try joining a pub that they are a member of.": "You might not be seeing their latest messages. You could try joining a pub that they are a member of.",
"However, since they follow someone that follows you, they should be able to see your posts.": "However, since they follow someone that follows you, they should be able to see your posts.",
"They might not be able to see your posts either.": "They might not be able to see your posts either.",
"This person does not follow anyone that follows you": "This person does not follow anyone that follows you",
"They might not receive your private messages or replies. You could try joining a pub that they are a member of.": "They might not receive your private messages or replies. You could try joining a pub that they are a member of.",
"However, since you follow someone that follows them, you should be able to see their latest posts.": "However, since you follow someone that follows them, you should be able to see their latest posts.",
"Mutual Friends": "Mutual Friends",
"You share %s mutual friends with this person.": {
"one": "You share %s mutual friends with this person.",
"other": "You share %s mutual friends with this person."
},
"Followed by": "Followed by",
"You follow %s people that follow this person.": {
"one": "You follow %s people that follow this person.",
"other": "You follow %s people that follow this person."
},
"Send Private Message": "Send Private Message",
"Friends": "Friends",
"Following": "Following",
"Follow Back": "Follow Back",
"Follow": "Follow",
"Followers": "Followers",
"Following": "Following",
"Blocked by": "Blocked by",
"Public": "Public",
"Private": "Private",
"More": "More",
"Gatherings": "Gatherings",
"Extended Network": "Extended Network",
"Settings": "Settings",
"Patchwork": "Patchwork",
"Upgrading database": "Upgrading database",
"Downloading new messages": "Downloading new messages",
"Indexing database": "Indexing database",
"Scuttling...": "Scuttling...",
"word, @key, #channel": "word, @key, #channel",
"Profile": "Profile",
"Mentions": "Mentions",
" has been released.": " has been released.",
" Click here to download and view more info!": " Click here to download and view more info!",
"Self Assigned": "Self Assigned",
"Assigned By": "Assigned By",
"self assigned a description": "self assigned a description",
"in reply to ": "in reply to ",
"subscribed to ": "subscribed to ",
"followed ": "followed ",
"identifies ": "identifies ",
" as \"": " as \"",
"paste invite code here": "paste invite code here",
"By default, Patchwork will only see other users that are on the same local area network as you.": "By default, Patchwork will only see other users that are on the same local area network as you.",
"In order to share with users on the internet, you need to be invited to a pub server.": "In order to share with users on the internet, you need to be invited to a pub server.",
"Redeem Invite": "Redeem Invite",
"Cancel": "Cancel",
"Channels": "Channels",
"Browse All": "Browse All",
" from your extended network": " from your extended network",
"+ Add Gathering": "+ Add Gathering",
" referenced this message:": " referenced this message:",
"Create": "Create",
" Gathering": " Gathering",
"Choose a title": "Choose a title",
"Choose date and time": "Choose date and time",
"Choose Banner Image...": "Choose Banner Image...",
"Describe the gathering (if you want)": "Describe the gathering (if you want)",
"Edit": "Edit",
"identified ": "identified ",
"self identifies as ": "self identifies as ",
"from now": "from now",
"ago": "ago",
"years": "years",
"months": "months",
"weeks": "weeks",
"days": "days",
"hours": "hours",
"minutes": "mins",
"seconds": "secs",
"minutes": "minutes",
"seconds": "seconds",
"year": "year",
"month": "month",
"week": "week",
"day": "day",
"hour": "hour",
"minute": "min",
"second": "sec",
"assigned a display image to ": "assigned a display image to ",
"Theme": "Theme",
"Language": "Language",
"Filters": "Filters",
"Hide following messages": "Hide following messages",
"Cannot display message": "Cannot display message",
"Search Results:": "Search Results:",
"Search completed.": "Search completed.",
"result found": "result found",
"results found": "results found",
" forked this discussion:": " forked this discussion:",
"Your Profile": "Your Profile",
"Choose Profile Image...": "Choose Profile Image...",
"Choose a name": "Choose a name",
"Describe yourself (if you want)": "Describe yourself (if you want)",
"What would you like to call ": "What would you like to call ",
"Confirm": "Confirm",
"self assigned a display image": "self assigned a display image",
"Like": "Like",
"minute": "minute",
"second": "second",
"Reply": "Reply",
"View full thread": "View full thread",
"Unsubscribe": "Unsubscribe",
"Subscribe": "Subscribe",
"Force Disconnect": "Force Disconnect",
"(you)": "(you)",
"in reply to ": "in reply to ",
"See less": "See less",
"See more": "See more",
"mentioned you": "mentioned you",
" and ": " and ",
"Liked by": "Liked by",
"likes": "likes",
"liked this message": "liked this message",
"like": "like",
"replied to this message": "replied to this message",
"unfollowed ": "unfollowed ",
"Untitled Gathering": "Untitled Gathering",
"Error": "Error",
"An error occurred while attempting to publish gathering.": "An error occurred while attempting to publish gathering.",
"An error occurred while attempting to redeem invite.": "An error occurred while attempting to redeem invite.",
"OK": "OK",
"Close": "Close",
" others": " others",
"Write a public message": "Write a public message",
"New Message": "New Message",
"unsubscribed from ": "unsubscribed from ",
"%s people from your network replied to this message on ": {
"one": "%s people from your network replied to this message on ",
"other": "%s people from your network replied to this message on "
},
"mentioned in your network": "mentioned in your network",
"Channels": "Channels",
"Browse All": "Browse All",
"$name": "$name",
"Theme": "Theme",
"Language": "Language",
"Default": "Default",
"de": "de",
"en": "en",
"on ": "on ",
"de": "German",
"Private Message": "Private Message",
"Send Private Message": "Send Private Message",
"Publish Privately": "Publish Privately",
"Block": "Block",
"es": "es",
"ki": "ki",
"pt": "pt",
"pt-BR": "pt-BR",
"Font Size": "Font Size",
"Public Feed Options": "Public Feed Options",
"Hide following messages": "Hide following messages",
"Only include posts from subscribed channels": "Only include posts from subscribed channels",
"Information": "Information",
"This is you.": "This is you.",
"Click to unblock": "Click to unblock",
"Blocked": "Blocked",
"pt": "pt",
"blocked ": "blocked ",
"unblocked ": "unblocked ",
"Click to unfollow": "Click to unfollow",
"Follow Back": "Follow Back",
"Follow": "Follow",
"Click to block syncing with this person and hide their posts": "Click to block syncing with this person and hide their posts",
"Public key for this profile": "Public key for this profile",
"Liked by": "Liked by",
"You don't follow anyone who follows this person": "You don't follow anyone who follows this person",
"You might not be seeing their latest messages. You could try joining a pub that they are a member of.": "You might not be seeing their latest messages. You could try joining a pub that they are a member of.",
"Mutual Friends": "Mutual Friends",
"You share %s mutual friends with this person.": {
"one": "You share %s mutual friend with this person.",
"other": "You share %s mutual friends with this person."
},
"This person does not follow anyone that follows you": "This person does not follow anyone that follows you",
"They might not receive your private messages or replies. You could try joining a pub that they are a member of.": "They might not receive your private messages or replies. You could try joining a pub that they are a member of.",
"Block": "Block",
"Write a private reply": "Write a private reply",
"Write a public reply": "Write a public reply",
"External Link": "External Link",
"This is you.": "This is you.",
"This person is blocked by %s of your friends.": {
"one": "This person is blocked by %s of your friends.",
"other": "This person is blocked by %s of your friends."
},
"Blocked by": "Blocked by",
"However, this person should be able to see your posts.": "However, this person should be able to see your posts.",
"However, since they follow someone that follows you, they should be able to see your posts.": "However, since they follow someone that follows you, they should be able to see your posts.",
"They might not be able to see your posts either.": "They might not be able to see your posts either.",
"However, since you follow someone that follows them, you should be able to see their latest posts.": "However, since you follow someone that follows them, you should be able to see their latest posts.",
"An error occured while publishing your message.": "An error occured while publishing your message.",
"Missing message": "Missing message",
" via ": " via ",
"Cannot load thread": "Cannot load thread",
"The author of this message could be outside of your follow range or they may be blocked.": "The author of this message could be outside of your follow range or they may be blocked.",
"You follow %s people that follow this person.": {
"one": "You follow someone that follows this person.",
"other": "You follow %s people that follow this person."
},
"Followed by": "Followed by",
"pt-BR": "Brazillian Portuguese",
"See less": "See less",
"See more": "See more",
"(missing message)": "(missing message)",
"assigned a description to ": "assigned a description to ",
"subscribed to ": "subscribed to ",
"unsubscribed from ": "unsubscribed from ",
"Click to unsubscribe": "Click to unsubscribe",
"Subscribed": "Subscribed",
"Write a message in this channel": "Write a message in this channel",
"mentioned this channel": "mentioned this channel",
"You may not be able to see new channel content until you follow some users or pubs.": "You may not be able to see new channel content until you follow some users or pubs.",
"Search Results:": "Search Results:",
"Search completed.": "Search completed.",
"result found": "result found",
"results found": "results found",
"blocked ": "blocked ",
"Confirm": "Confirm",
"Cancel": "Cancel",
"Unread Message": "Unread Message",
"Font Size": "Font Size",
"Public Feed Options": "Public Feed Options",
"Only include posts from subscribed channels": "Only include posts from subscribed channels",
"Default": "Default",
"Force Disconnect": "Force Disconnect",
"mentioned in your network": "mentioned in your network",
"%s people from your network replied to this message on ": {
"one": "%s person from your network replied to this message on ",
"other": "%s people from your network replied to this message on "
},
"(you)": "(you)",
"Information": "Information"
" forked this discussion:": " forked this discussion:",
"You are not following anyone": "You are not following anyone",
"For help getting started, see the guide at ": "For help getting started, see the guide at "
}
27 changes: 27 additions & 0 deletions modules/feed/html/follow-warning.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
var nest = require('depnest')
var { when } = require('mutant')

exports.needs = nest({
'intl.sync.i18n': 'first'
})

exports.gives = nest({
'feed.html.followWarning': true
});

exports.create = function(api) {
const i18n = api.intl.sync.i18n
return nest('feed.html.followWarning', function warning (condition, explanation) {
var content =
h('div', {classList: 'NotFollowingAnyoneWarning'}, h('section -notFollowingAnyoneWarning', [
h('h1', i18n('You are not following anyone')),
h('p', explanation),
h('p', [i18n('For help getting started, see the guide at '),
h('a', {href: 'https://scuttlebutt.nz/getting-started.html'}, 'https://scuttlebutt.nz/getting-started.html')]
),
]))

return when(condition, content);
});

}
19 changes: 16 additions & 3 deletions modules/page/html/render/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ exports.needs = nest({
'message.html.compose': 'first',
'channel.sync.normalize': 'first',
'feed.html.rollup': 'first',
'feed.html.followWarning': 'first',
'feed.pull.channel': 'first',
'sbot.pull.log': 'first',
'message.async.publish': 'first',
'keys.sync.id': 'first',
'intl.sync.i18n': 'first'
'intl.sync.i18n': 'first',
'profile.obs.contact': 'first'
})

exports.gives = nest('page.html.render')
Expand All @@ -20,8 +22,12 @@ exports.create = function (api) {
return nest('page.html.render', function channel (path) {
if (path[0] !== '#') return

var id = api.keys.sync.id()

var channel = api.channel.sync.normalize(path.substr(1))
var subscribedChannels = api.channel.obs.subscribed(api.keys.sync.id())
var subscribedChannels = api.channel.obs.subscribed(id)

var contact = api.profile.obs.contact(id)

var prepend = [
h('PageHeading', [
Expand All @@ -43,7 +49,8 @@ exports.create = function (api) {
api.message.html.compose({
meta: {type: 'post', channel},
placeholder: i18n('Write a message in this channel')
})
}),
noVisibleNewPostsWarning()
]

return api.feed.html.rollup(api.feed.pull.channel(channel), {
Expand All @@ -70,6 +77,12 @@ exports.create = function (api) {
return `#${api.channel.sync.normalize(link.slice(1))}`
}
}

function noVisibleNewPostsWarning() {
var warning = i18n('You may not be able to see new channel content until you follow some users or pubs.')
return api.feed.html.followWarning(contact.isNotFollowingAnybody, warning);
}

})

function subscribe (id) {
Expand Down
Loading