From 9a34cd7ea6d92bd79a3d393775cb67f3400f0001 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 22 Jan 2016 21:41:37 +0100 Subject: [PATCH 001/120] two more japanese translation --- locale/ja.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/locale/ja.json b/locale/ja.json index 59482fe..bcdd8e2 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -161,5 +161,7 @@ "addEditLanguageLink":"{site-title}を他の言語に翻訳するのを手伝ってください", "onlyPartlyTranslated":"{site-title}は{language-name}へ部分的({percent}%)にしか翻訳されていません。Qvitterのリポジトリホームページにて翻訳を手伝うことができます。", "startRant":"連投する", - "continueRant":"連投を続ける" + "continueRant":"連投を続ける", + "hideEmbeddedInTimeline":"Hide embedded content in this timeline", + "hideQuotesInTimeline":"Hide quotes in this timeline" } From 7293db4dc2cc8443ae04610329b134ead420d0fc Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 22 Jan 2016 21:45:44 +0100 Subject: [PATCH 002/120] two last japanese strings --- locale/ja.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/ja.json b/locale/ja.json index bcdd8e2..90fb27a 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -162,6 +162,6 @@ "onlyPartlyTranslated":"{site-title}は{language-name}へ部分的({percent}%)にしか翻訳されていません。Qvitterのリポジトリホームページにて翻訳を手伝うことができます。", "startRant":"連投する", "continueRant":"連投を続ける", - "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideEmbeddedInTimeline":"タイムライン上の埋め込まれたコンテンツを隠す", + "hideQuotesInTimeline":"タイムライン上の引用を隠す" } From 938c2d4082acc6772d1e3be8b65dd2a7a4583979 Mon Sep 17 00:00:00 2001 From: Akio Nishimura Date: Sat, 23 Jan 2016 06:34:52 +0900 Subject: [PATCH 003/120] Some minor fixes on Japanese translation. --- locale/ja.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/ja.json b/locale/ja.json index 90fb27a..fd45688 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -84,15 +84,15 @@ "userUnfollow": "アンフォロー", "joinGroup": "参加する", "joinExternalGroup": "リモートで参加する", - "isMemberOfGroup": "メンバー", + "isMemberOfGroup": "参加中", "leaveGroup": "脱退する", - "memberCount": "人のメンバー", + "memberCount": "参加者数", "adminCount": "管理者", "settings": "設定", "saveChanges": "変更を保存", "linkColor": "リンクの色", "backgroundColor": "背景の色", - "newToQuitter": "{site-title}に参加したばかりですか?", + "newToQuitter": "{site-title}に参加しますか?", "signUp": "サインアップ", "signUpFullName": "フルネーム", "signUpEmail": "メールアドレス", From 8168f4076458204745eeed4fa11c10dbc3ba2dce Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 22 Jan 2016 23:02:15 +0100 Subject: [PATCH 004/120] duplicate pt-br to pt --- locale/pt.json | 167 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 locale/pt.json diff --git a/locale/pt.json b/locale/pt.json new file mode 100644 index 0000000..45580e9 --- /dev/null +++ b/locale/pt.json @@ -0,0 +1,167 @@ +{ + "directionality":"ltr", + "languageName": "Português-Brasil", + "loginUsername": "Nome de usuário ou e-mail", + "loginPassword": "Senha", + "loginSignIn": "Iniciar sessão", + "loginRememberMe": "Lembrar meu login", + "loginForgotPassword": "Esqueceu sua senha?", + "notices": "Queets", + "followers": "Seguidores", + "following": "Seguindo", + "groups": "Grupos", + "compose": "Escrever um novo Queet...", + "queetVerb": "Quittear", + "queetsNounPlural": "Queets", + "logout": "Fechar sessão", + "languageSelected": "Idioma:", + "viewMyProfilePage": "Ver minha página de perfil", + "expand": "Expandir", + "collapse": "Reduzir", + "details": "Detalhes", + "expandFullConversation": "Expandir toda a conversa", + "replyVerb": "Responder", + "requeetVerb": "Requittear", + "favoriteVerb": "Favorito", + "requeetedVerb": "Requitteado", + "favoritedVerb": "Marcado como favorito", + "replyTo": "Responder para", + "requeetedBy": "Requitteado por {requeeted-by}", + "favoriteNoun": "Favorito", + "favoritesNoun": "Favoritos", + "requeetNoun": "Requeet", + "requeetsNoun": "Requeets", + "newQueet": "{new-notice-count} novo Queet", + "newQueets": "{new-notice-count} novos Queets", + "longmonthsJanuary": "janeiro", + "longmonthsFebruary": "fevereiro", + "longmonthsMars": "março", + "longmonthsApril": "abril", + "longmonthsMay": "maio", + "longmonthsJune": "junho", + "longmonthsJuly": "julho", + "longmonthsAugust": "agosto", + "longmonthsSeptember": "setembro", + "longmonthsOctober": "outubro", + "longmonthsNovember": "novembro", + "longmonthsDecember": "dezembro", + "shortmonthsJanuary": "janeiro", + "shortmonthsFebruary": "fev", + "shortmonthsMars": "março", + "shortmonthsApril": "abr", + "shortmonthsMay": "maio", + "shortmonthsJune": "jun", + "shortmonthsJuly": "jul", + "shortmonthsAugust": "agosto", + "shortmonthsSeptember": "set", + "shortmonthsOctober": "out", + "shortmonthsNovember": "nov", + "shortmonthsDecember": "dez", + "time12am": "{time} AM", + "time12pm": "{time} PM", + "longDateFormat": "{time24} - {day} {month} {year}", + "shortDateFormatSeconds": "{seconds}s", + "shortDateFormatMinutes": "{minutes}min", + "shortDateFormatHours": "{hours}h", + "shortDateFormatDate": "{day} {month}", + "shortDateFormatDateAndY": "{day} {month} {year}", + "now": "agora", + "posting": "publicando", + "viewMoreInConvBefore": "← Ver mais na conversa", + "viewMoreInConvAfter": "Ver mais na conversa →", + "mentions": "Menções", + "timeline": "Linha de tempo", + "publicTimeline": "Linha de tempo pública", + "publicAndExtTimeline": "Toda a rede conhecida", + "searchVerb": "Buscar", + "deleteVerb": "Apagar", + "cancelVerb": "Cancelar", + "deleteConfirmation": "Tem certeza que quer apagar este queet?", + "userExternalFollow": "Seguir remotamente", + "userExternalFollowHelp": "Identificador de sua conta (ex.: usuario@rainbowdash.net)", + "userFollow": "Seguir", + "userFollowing": "Seguindo", + "userUnfollow": "Deixar de seguir", + "joinGroup": "Participar", + "joinExternalGroup": "Participar remotamente", + "isMemberOfGroup": "Membro", + "leaveGroup": "Abandonar", + "memberCount": "Membros", + "adminCount": "Administradores", + "settings": "Configurações", + "saveChanges": "Salvar mudanças", + "linkColor": "Cor do link", + "backgroundColor": "Cor de fundo", + "newToQuitter": "Você é novo no {site-title}?", + "signUp": "Registre-se", + "signUpFullName": "Nome completo", + "signUpEmail": "E-mail", + "signUpButtonText": "Registre-se no {site-title}", + "welcomeHeading": "Bem-vindo ao {site-title}.", + "welcomeText": "Somos uma
« Federação » significa que você não deve ter uma conta do {site-title} para seguir seus usuários, ser seguido por eles ou se comunicar com eles. Você pode se registrar em qualquer servidor StatusNet ou GNU social, ou em qualquer serviço utilizando o protocolo OStatus! Também não deve se registrar em qualquer serviço para participar - simplesmente instale o software GNU social em seu próprio servidor. (:
federação
de microblogueiros que, como você, estão motivados pela ética e solidaridade, e querem abandonar os serviços centralizados capitalistas. Estamos aqui desde 2010 e sempre vamos ser non-profit.", + "registerNickname": "Nome de usuário", + "registerHomepage": "Site web", + "registerBio": "Biografia", + "registerLocation": "Localização", + "registerRepeatPassword": "Repetir senha", + "moreSettings": "Mais configurações", + "otherServers": "De manera alternativa, você pode criar uma conta em outro servidor da rede GNU social. Comparativo", + "editMyProfile": "Editar perfil", + "notifications": "Notificações", + "xFavedYourQueet": "curtiu seu Queet", + "xRepeatedYourQueet": "requeetou você", + "xStartedFollowingYou": "seguiu você", + "followsYou": "segue você", + "FAQ": "FAQ", + "inviteAFriend": "Convide seus amigos!", + "goToExternalProfile": "Ir para o perfil completo", + "cropAndSave": "Crop and save", + "showTerms": "Read our Terms of Use", + "ellipsisMore": "More", + "blockUser": "Block {username}", + "goToOriginalNotice": "Go to original notice", + "goToTheUsersRemoteProfile": "Go to the user's remote profile", + "clickToDrag":"Click to drag", + "keyboardShortcuts":"Keyboard shortcuts", + "classicInterface":"Classic {site-title}", + "accessibilityToggleLink":"For better accessibility, click this link to switch to the classic interface", + "tooltipBookmarkStream":"Add this stream to your bookmarks", + "tooltipTopMenu":"Menu and settings", + "tooltipAttachImage":"Attach an image", + "tooltipShortenUrls":"Shorten all URLs in the Queet", + "tooltipReloadStream":"Refresh this stream", + "tooltipRemoveBookmark":"Remove this bookmark", + "clearHistory":"Clear browsing history", + "ERRORsomethingWentWrong":"Something went wrong.", + "ERRORmustBeLoggedIn":"You must be logged in to view this stream.", + "ERRORcouldNotFindUserWithNickname":"Could not find a user with nickname \"{nickname}\" on this server", + "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", + "ERRORcouldNotFindPage":"Could not find that page.", + "ERRORnoticeRemoved": "This notice has been removed.", + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large.", + "hideRepliesToPeopleIDoNotFollow":"Hide replies to people I don't follow", + "markAllNotificationsAsSeen":"Mark all notifications as seen", + "notifyRepliesAndMentions":"Mentions and replies", + "notifyFavs":"Favorites", + "notifyRepeats":"Requeets", + "notifyFollows":"New followers", + "timelineOptions":"Timeline options", + "ERRORfailedSavingYourSetting":"Failed saving your setting", + "ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.", + "newNotification": "{new-notice-count} new notification", + "newNotifications": "{new-notice-count} new notifications", + "thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it.", + "nicknamesListWithListName":"{nickname}’s list: {list-name}", + "myListWithListName":"My list: {list-name}", + "listMembers":"Members", + "listSubscribers":"Subscribers", + "ERRORcouldNotFindList":"There is no such list.", + "emailAlreadyInUse":"Already in use", + "addEditLanguageLink":"Help translate {site-title} to another language", + "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", + "startRant":"Start a rant", + "continueRant":"Continue the rant", + "hideEmbeddedInTimeline":"Hide embedded content in this timeline", + "hideQuotesInTimeline":"Hide quotes in this timeline" +} From b7bdb7335a114007452ce77c25371847244eb4ec Mon Sep 17 00:00:00 2001 From: Akio Nishimura Date: Sat, 23 Jan 2016 07:16:25 +0900 Subject: [PATCH 005/120] A minor fix on Japanese translation about signUp. --- locale/ja.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/ja.json b/locale/ja.json index fd45688..97486b5 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -92,8 +92,8 @@ "saveChanges": "変更を保存", "linkColor": "リンクの色", "backgroundColor": "背景の色", - "newToQuitter": "{site-title}に参加しますか?", - "signUp": "サインアップ", + "newToQuitter": "{site-title}は初めてですか?", + "signUp": "サインアップしましょう", "signUpFullName": "フルネーム", "signUpEmail": "メールアドレス", "signUpButtonText": "{site-title}にサインアップする", From 93f0413669a229fb397c0159c490d856f06a6858 Mon Sep 17 00:00:00 2001 From: Akio Nishimura Date: Sat, 23 Jan 2016 08:01:21 +0900 Subject: [PATCH 006/120] Some minor fixes on Japanese translation. --- locale/ja.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/ja.json b/locale/ja.json index 97486b5..32272e8 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -31,8 +31,8 @@ "favoritesNoun": "お気に入り", "requeetNoun": "リクイート", "requeetsNoun": "リクイート", - "newQueet": "{new-notice-count} 個の新しいクイート", - "newQueets": "{new-notice-count} 個の新しいクイート", + "newQueet": "{new-notice-count} 件の新着クイートを表示", + "newQueets": "{new-notice-count} 件の新着クイートを表示", "longmonthsJanuary": "1月", "longmonthsFebruary": "2月", "longmonthsMars": "3月", @@ -149,8 +149,8 @@ "timelineOptions":"タイムラインの設定", "ERRORfailedSavingYourSetting":"設定の保存に失敗しました。", "ERRORfailedMarkingAllNotificationsAsRead":"全てのお知らせを既読にすることに失敗しました。", - "newNotification": "{new-notice-count}個の新しいお知らせ", - "newNotifications": "{new-notice-count}個の新しいお知らせ", + "newNotification": "{new-notice-count}件の新しいお知らせ", + "newNotifications": "{new-notice-count}件の新しいお知らせ", "thisIsANoticeFromABlockedUser":"警告: これはあなたがブロックしているユーザーからのクイートです。表示するにはクリックしてください。", "nicknamesListWithListName":"{nickname}のリスト: {list-name}", "myListWithListName":"マイリスト: {list-name}", From 5101cf22b25aba394b5c436ad6c63b005dbdaff0 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 00:31:13 +0100 Subject: [PATCH 007/120] convert single quotes also (escaped by js later, this avoids double escaping) --- QvitterPlugin.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 96a6102..7e6c362 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -528,15 +528,17 @@ class QvitterPlugin extends Plugin { $oembed->title = $twitter_username; } $oembed_html = str_replace('…','...',$oembed_html); // ellipsis is sometimes stored as html in db, for some reason - $oembed_html = trim(strip_tags(html_entity_decode($oembed_html))); // sometimes we have html charachters that we want to decode and then strip - $oembed_title = trim(strip_tags(html_entity_decode($oembed->title))); + $oembed_html = substr(trim(strip_tags(html_entity_decode($oembed_html,ENT_QUOTES))),0,250); // sometimes we have html charachters that we want to decode and then strip + $oembed_title = trim(strip_tags(html_entity_decode($oembed->title,ENT_QUOTES))); + $oembed_provider = trim(strip_tags(html_entity_decode($oembed->provider,ENT_QUOTES))); + $oembed_author_name = trim(strip_tags(html_entity_decode($oembed->author_name,ENT_QUOTES))); $attachment_url_to_id[$enclosure_o->url]['oembed'] = array( 'type'=> $oembed->type, - 'provider'=> $oembed->provider, + 'provider'=> $oembed_provider, 'provider_url'=> $oembed->provider_url, 'oembedHTML'=> $oembed_html, 'title'=> $oembed_title, - 'author_name'=> $oembed->author_name, + 'author_name'=> $oembed_author_name, 'author_url'=> $oembed->author_url ); } else { From b6213f356c676b64282f247f1bd68256380a5dd2 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 01:39:19 +0100 Subject: [PATCH 008/120] =?UTF-8?q?updated=20Portugu=C3=AAs-Brasil=20trans?= =?UTF-8?q?lation=20by=20@thiagozoroastro@quitter.se?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/pt_br.json | 120 +++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/locale/pt_br.json b/locale/pt_br.json index 45580e9..010d238 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -3,7 +3,7 @@ "languageName": "Português-Brasil", "loginUsername": "Nome de usuário ou e-mail", "loginPassword": "Senha", - "loginSignIn": "Iniciar sessão", + "loginSignIn": "Entrar", "loginRememberMe": "Lembrar meu login", "loginForgotPassword": "Esqueceu sua senha?", "notices": "Queets", @@ -13,7 +13,7 @@ "compose": "Escrever um novo Queet...", "queetVerb": "Quittear", "queetsNounPlural": "Queets", - "logout": "Fechar sessão", + "logout": "Sair", "languageSelected": "Idioma:", "viewMyProfilePage": "Ver minha página de perfil", "expand": "Expandir", @@ -45,15 +45,15 @@ "longmonthsOctober": "outubro", "longmonthsNovember": "novembro", "longmonthsDecember": "dezembro", - "shortmonthsJanuary": "janeiro", + "shortmonthsJanuary": "jan", "shortmonthsFebruary": "fev", - "shortmonthsMars": "março", + "shortmonthsMars": "mar", "shortmonthsApril": "abr", - "shortmonthsMay": "maio", + "shortmonthsMay": "mai", "shortmonthsJune": "jun", "shortmonthsJuly": "jul", - "shortmonthsAugust": "agosto", - "shortmonthsSeptember": "set", + "shortmonthsAugust": "ago", + "shortmonthsSeptember": "selint", "shortmonthsOctober": "out", "shortmonthsNovember": "nov", "shortmonthsDecember": "dez", @@ -70,8 +70,8 @@ "viewMoreInConvBefore": "← Ver mais na conversa", "viewMoreInConvAfter": "Ver mais na conversa →", "mentions": "Menções", - "timeline": "Linha de tempo", - "publicTimeline": "Linha de tempo pública", + "timeline": "Linha do tempo", + "publicTimeline": "Linha do tempo pública", "publicAndExtTimeline": "Toda a rede conhecida", "searchVerb": "Buscar", "deleteVerb": "Apagar", @@ -85,7 +85,7 @@ "joinGroup": "Participar", "joinExternalGroup": "Participar remotamente", "isMemberOfGroup": "Membro", - "leaveGroup": "Abandonar", + "leaveGroup": "Deixar", "memberCount": "Membros", "adminCount": "Administradores", "settings": "Configurações", @@ -100,7 +100,7 @@ "welcomeHeading": "Bem-vindo ao {site-title}.", "welcomeText": "Somos uma
« Federação » significa que você não deve ter uma conta do {site-title} para seguir seus usuários, ser seguido por eles ou se comunicar com eles. Você pode se registrar em qualquer servidor StatusNet ou GNU social, ou em qualquer serviço utilizando o protocolo OStatus! Também não deve se registrar em qualquer serviço para participar - simplesmente instale o software GNU social em seu próprio servidor. (:
federação
de microblogueiros que, como você, estão motivados pela ética e solidaridade, e querem abandonar os serviços centralizados capitalistas. Estamos aqui desde 2010 e sempre vamos ser non-profit.", "registerNickname": "Nome de usuário", - "registerHomepage": "Site web", + "registerHomepage": "Website", "registerBio": "Biografia", "registerLocation": "Localização", "registerRepeatPassword": "Repetir senha", @@ -115,53 +115,53 @@ "FAQ": "FAQ", "inviteAFriend": "Convide seus amigos!", "goToExternalProfile": "Ir para o perfil completo", - "cropAndSave": "Crop and save", - "showTerms": "Read our Terms of Use", - "ellipsisMore": "More", - "blockUser": "Block {username}", - "goToOriginalNotice": "Go to original notice", - "goToTheUsersRemoteProfile": "Go to the user's remote profile", - "clickToDrag":"Click to drag", - "keyboardShortcuts":"Keyboard shortcuts", - "classicInterface":"Classic {site-title}", - "accessibilityToggleLink":"For better accessibility, click this link to switch to the classic interface", - "tooltipBookmarkStream":"Add this stream to your bookmarks", - "tooltipTopMenu":"Menu and settings", - "tooltipAttachImage":"Attach an image", - "tooltipShortenUrls":"Shorten all URLs in the Queet", - "tooltipReloadStream":"Refresh this stream", - "tooltipRemoveBookmark":"Remove this bookmark", - "clearHistory":"Clear browsing history", - "ERRORsomethingWentWrong":"Something went wrong.", - "ERRORmustBeLoggedIn":"You must be logged in to view this stream.", - "ERRORcouldNotFindUserWithNickname":"Could not find a user with nickname \"{nickname}\" on this server", - "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", - "ERRORcouldNotFindPage":"Could not find that page.", - "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", - "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large.", - "hideRepliesToPeopleIDoNotFollow":"Hide replies to people I don't follow", - "markAllNotificationsAsSeen":"Mark all notifications as seen", - "notifyRepliesAndMentions":"Mentions and replies", - "notifyFavs":"Favorites", + "cropAndSave": "Cortar e salvar", + "showTerms": "Leia nossos Termos de Uso", + "ellipsisMore": "Mais", + "blockUser": "Bloquear {username}", + "goToOriginalNotice": "Ir para aviso original", + "goToTheUsersRemoteProfile": "Ir para o profile do usuário", + "clickToDrag":"Clique para arrastar", + "keyboardShortcuts":"Atalhos de teclado", + "classicInterface":"Interface clássica {site-title}", + "accessibilityToggleLink":"Para melhor acessibilidade, clique nesse link para substituir para a interface clássica", + "tooltipBookmarkStream":"Adicione esse stream para seu marcador", + "tooltipTopMenu":"Menu e configurações", + "tooltipAttachImage":"Anexar uma imagem", + "tooltipShortenUrls":"Todas URLs curtas no Queet", + "tooltipReloadStream":"Atualizar esse stream", + "tooltipRemoveBookmark":"Remover esse marcador", + "clearHistory":"Limpar histórico de navegação", + "ERRORsomethingWentWrong":"Alguma coisa errada aconteceu.", + "ERRORmustBeLoggedIn":"Você deve estar logado para ver esse stream.", + "ERRORcouldNotFindUserWithNickname":"Não pôde encontrar um usuário com este nickname \"{nickname}\" sobre esse servidor", + "ERRORcouldNotFindGroupWithNickname":"Não pôde encontrar um grupo com este nome \"{nickname}\" sobre esse servidor", + "ERRORcouldNotFindPage":"Não pôde encontrar aquela página.", + "ERRORnoticeRemoved": "Este aviso foi removido.", + "ERRORnoContactWithServer": "Não pôde estabelecer uma conexão para o servidor. O servidor poderia estar sobrecarregado, ou poderia ser um problema com sua conexão de internet. Por favor tente novamente mais tarde!", + "ERRORattachmentUploadFailed": "O upload falhou. O formato poderia não ser suportado ou o tamanho é muito grande.", + "hideRepliesToPeopleIDoNotFollow":"Ocultar respostas para pessoas que eu não sigo", + "markAllNotificationsAsSeen":"Marcar todas notificações como vistas", + "notifyRepliesAndMentions":"Menções e respostas", + "notifyFavs":"Favoritos", "notifyRepeats":"Requeets", - "notifyFollows":"New followers", - "timelineOptions":"Timeline options", - "ERRORfailedSavingYourSetting":"Failed saving your setting", - "ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.", - "newNotification": "{new-notice-count} new notification", - "newNotifications": "{new-notice-count} new notifications", - "thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it.", - "nicknamesListWithListName":"{nickname}’s list: {list-name}", - "myListWithListName":"My list: {list-name}", - "listMembers":"Members", - "listSubscribers":"Subscribers", - "ERRORcouldNotFindList":"There is no such list.", - "emailAlreadyInUse":"Already in use", - "addEditLanguageLink":"Help translate {site-title} to another language", - "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", - "startRant":"Start a rant", - "continueRant":"Continue the rant", - "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" -} + "notifyFollows":"Novos seguidores", + "timelineOptions":"Opções de linha do tempo", + "ERRORfailedSavingYourSetting":"Houve falha ao salvar suas configurações", + "ERRORfailedMarkingAllNotificationsAsRead":"Houve falha ao marcar todas notificações como vistas.", + "newNotification": "{new-notice-count} nova notificação", + "newNotifications": "{new-notice-count} novas notificações", + "thisIsANoticeFromABlockedUser":"Advertência: Esta é um aviso de um usuário você bloqueou. Clique para mostrar isto.", + "nicknamesListWithListName":"Lista de {nickname}: {list-name}", + "myListWithListName":"Minha lista: {list-name}", + "listMembers":"Membros", + "listSubscribers":"Assinantes", + "ERRORcouldNotFindList":"Não existe tal lista.", + "emailAlreadyInUse":"Já em uso", + "addEditLanguageLink":"Ajude a traduzir {site-title} para outro idioma", + "onlyPartlyTranslated":"{site-title} está somente parcialmente traduzido para {language-name} ({percent}%). Você pode ajudar a completar a tradução na página principal de repositório do Qvitter", + "startRant":"Iniciar um debate", + "continueRant":"Continuar o debate", + "hideEmbeddedInTimeline":"Ocultar conteúdo incorporado nessa linha do tempo", + "hideQuotesInTimeline":"Ocultar citações nesta linha do tempo" +} \ No newline at end of file From 49a453b6318b1066b75571dfffa832f6a5c1af35 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 01:40:24 +0100 Subject: [PATCH 009/120] =?UTF-8?q?Portugu=C3=AAs=20is=20not=20Portugu?= =?UTF-8?q?=C3=AAs-Brasil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/pt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/pt.json b/locale/pt.json index 45580e9..4e59803 100644 --- a/locale/pt.json +++ b/locale/pt.json @@ -1,6 +1,6 @@ { "directionality":"ltr", - "languageName": "Português-Brasil", + "languageName": "Português", "loginUsername": "Nome de usuário ou e-mail", "loginPassword": "Senha", "loginSignIn": "Iniciar sessão", From 2348f803f212f5972fdd0daa753a7f8656d0f08c Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 01:50:00 +0100 Subject: [PATCH 010/120] fixes --- actions/apiqvitteroembednotice.php | 2 +- actions/qvitter.php | 2 -- locale/fa.json | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/actions/apiqvitteroembednotice.php b/actions/apiqvitteroembednotice.php index 15f0c85..92de1cf 100644 --- a/actions/apiqvitteroembednotice.php +++ b/actions/apiqvitteroembednotice.php @@ -127,7 +127,7 @@ class ApiQvitterOembedNoticeAction extends ApiAction } catch (ServerException $e) { // } - if(method_exists('File_thumbnail','url')) { + if(!empty($thumb) && method_exists('File_thumbnail','url')) { try { $thumb_url = File_thumbnail::url($thumb->filename); $oembed['thumbnail_url'] = $thumb_url; diff --git a/actions/qvitter.php b/actions/qvitter.php index ff5334b..5eb6b15 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -446,8 +446,6 @@ class QvitterAction extends ApiAction } ?> - -
  • diff --git a/locale/fa.json b/locale/fa.json index 5c0578c..58bae9b 100644 --- a/locale/fa.json +++ b/locale/fa.json @@ -1,5 +1,4 @@ -, -"addEditLanguageLink":"Help translate {site-title} to your language"{ +{ "directionality":"rtl", "languageName": "فارسی", "loginUsername": "شناسه یا ایمیل", From 0383ca698a0be871767c617b72b7fe5967d65c08 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 15:28:28 +0100 Subject: [PATCH 011/120] don't mess upp unicode strings..... --- QvitterPlugin.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 7e6c362..028abff 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -486,7 +486,6 @@ class QvitterPlugin extends Plugin { function onNoticeSimpleStatusArray($notice, &$twitter_status, $scoped) { - // groups $notice_groups = $notice->getGroups(); $group_addressees = false; @@ -528,7 +527,7 @@ class QvitterPlugin extends Plugin { $oembed->title = $twitter_username; } $oembed_html = str_replace('…','...',$oembed_html); // ellipsis is sometimes stored as html in db, for some reason - $oembed_html = substr(trim(strip_tags(html_entity_decode($oembed_html,ENT_QUOTES))),0,250); // sometimes we have html charachters that we want to decode and then strip + $oembed_html = mb_substr(trim(strip_tags(html_entity_decode($oembed_html,ENT_QUOTES))),0,250); // sometimes we have html charachters that we want to decode and then strip $oembed_title = trim(strip_tags(html_entity_decode($oembed->title,ENT_QUOTES))); $oembed_provider = trim(strip_tags(html_entity_decode($oembed->provider,ENT_QUOTES))); $oembed_author_name = trim(strip_tags(html_entity_decode($oembed->author_name,ENT_QUOTES))); From 2a9d45dba38e6dcb55d2a5e3bbb5295eddb82989 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 16:20:57 +0100 Subject: [PATCH 012/120] galician translation --- locale/gl.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/gl.json b/locale/gl.json index bcb2247..488410c 100644 --- a/locale/gl.json +++ b/locale/gl.json @@ -162,6 +162,6 @@ "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", "startRant":"Start a rant", "continueRant":"Continue the rant", - "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideEmbeddedInTimeline":"Ocultar contido incrustado nesta liña temporal", + "hideQuotesInTimeline":"Ocultar citas nesta liña temporal" } From 31bd84305dc82a9e8b86a317849cbfcf77bb7921 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 17:12:24 +0100 Subject: [PATCH 013/120] safari and chrome fixes --- js/qvitter.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/qvitter.js b/js/qvitter.js index fc96e16..a8fe4b5 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -481,8 +481,8 @@ $('body').on('mouseleave','#what-is-federation',function(){ · · · · · · · · · · · · · · */ $('body').on('click','.global-nav',function(e) { - if($(e.target).is('.global-nav')) { - $('html').scrollTop(0); + if($(e.target).hasClass('global-nav')) { + $(window).scrollTop(0); } }); @@ -2895,7 +2895,10 @@ $('body').on('keyup paste input', 'div.queet-box-syntax', function() { } }); - currentVal = currentVal.replace(/  Date: Sat, 23 Jan 2016 19:24:18 +0300 Subject: [PATCH 014/120] Added russian translation --- locale/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en.json b/locale/en.json index 23777b9..f5e7acc 100644 --- a/locale/en.json +++ b/locale/en.json @@ -138,7 +138,7 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connection. Please try again later!", "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large.", "hideRepliesToPeopleIDoNotFollow":"Hide replies to people I don't follow", "markAllNotificationsAsSeen":"Mark all notifications as seen", From e897cb5cb812072120be4716ebadb83b0ab31331 Mon Sep 17 00:00:00 2001 From: proninyaroslav Date: Sat, 23 Jan 2016 19:24:40 +0300 Subject: [PATCH 015/120] Added russian translation --- locale/ru.json | 165 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 locale/ru.json diff --git a/locale/ru.json b/locale/ru.json new file mode 100644 index 0000000..f842932 --- /dev/null +++ b/locale/ru.json @@ -0,0 +1,165 @@ +{ + "directionality":"ltr", + "languageName": "Русский", + "loginUsername": "Имя пользователя или e-mail", + "loginPassword": "Пароль", + "loginSignIn": "Войти", + "loginRememberMe": "Запомнить меня", + "loginForgotPassword": "Забыли пароль?", + "notices": "Твиты", + "followers": "Читатели", + "following": "Читаемые", + "groups": "Группы", + "compose": "Написать новый твит...", + "queetVerb": "Отправить", + "queetsNounPlural": "Твиты", + "logout": "Выйти", + "languageSelected": "Язык:", + "viewMyProfilePage": "Просмотр моего профиля", + "expand": "Развернуть", + "collapse": "Свернуть", + "details": "Подробно", + "expandFullConversation": "Развернуть беседу", + "replyVerb": "Ответить", + "requeetVerb": "Ретвитнуть", + "favoriteVerb": "Избранное", + "requeetedVerb": "Ретвитнул", + "favoritedVerb": "В избранное", + "replyTo": "Ответить на", + "requeetedBy": "{requeeted-by} ретвитнул", + "favoriteNoun": "Избранное", + "favoritesNoun": "Избранные", + "requeetNoun": "Ретвит", + "requeetsNoun": "Ретвиты", + "newQueet": "{new-notice-count} новый твит", + "newQueets": "{new-notice-count} новых твитов", + "longmonthsJanuary": "Январь", + "longmonthsFebruary": "Февраль", + "longmonthsMars": "Март", + "longmonthsApril": "Апрель", + "longmonthsMay": "Май", + "longmonthsJune": "Июнь", + "longmonthsJuly": "Июль", + "longmonthsAugust": "Август", + "longmonthsSeptember": "Сентябрь", + "longmonthsOctober": "Октябрь", + "longmonthsNovember": "Ноябрь", + "longmonthsDecember": "Декабрь", + "shortmonthsJanuary": "янв", + "shortmonthsFebruary": "фев", + "shortmonthsMars": "мар", + "shortmonthsApril": "апр", + "shortmonthsMay": "май", + "shortmonthsJune": "июн", + "shortmonthsJuly": "июл", + "shortmonthsAugust": "авг", + "shortmonthsSeptember": "сен", + "shortmonthsOctober": "окт", + "shortmonthsNovember": "ноя", + "shortmonthsDecember": "дек", + "time12am": "{time} AM", + "time12pm": "{time} PM", + "longDateFormat": "{time12} - {day} {month} {year}", + "shortDateFormatSeconds": "{seconds} сек", + "shortDateFormatMinutes": "{minutes} мин", + "shortDateFormatHours": "{hours} ч", + "shortDateFormatDate": "{day} {month}.", + "shortDateFormatDateAndY": "{day} {month}. {year}", + "now": "сейчас", + "posting": "отправка", + "viewMoreInConvBefore": "← Смотреть больше в беседе", + "viewMoreInConvAfter": "Смотреть больше в беседе →", + "mentions": "Упоминания", + "timeline": "Лента", + "publicTimeline": "Публичная лента", + "publicAndExtTimeline": "Вся известная сеть", + "searchVerb": "Поиск", + "deleteVerb": "Удалить", + "cancelVerb": "Отменить", + "deleteConfirmation": "Вы уверены, что ходите удалить этот твит?", + "userExternalFollow": "Читать удалённо", + "userExternalFollowHelp": "Ваш ID аккаунта (напр. user@rainbowdash.net).", + "userFollow": "Читать", + "userFollowing": "Читаю", + "userUnfollow": "Отмена", + "joinGroup": "Вступить", + "joinExternalGroup": "Вступить удалённо", + "isMemberOfGroup": "Участник", + "leaveGroup": "Покинуть", + "memberCount": "Участники", + "adminCount": "Администраторы", + "settings": "Настройки", + "saveChanges": "Сохранить изменения", + "linkColor": "Цвет ссылок", + "backgroundColor": "Цвет фона", + "newToQuitter": "Новый в {site-title}?", + "signUp": "Регистрация", + "signUpFullName": "Полное имя", + "signUpEmail": "E-mail", + "signUpButtonText": "Регистрация в {site-title}", + "welcomeHeading": "Добро пожаловать в {site-title}.", + "welcomeText": "Мы
    \"Федерация\" и это означает, что вам не нужен {site-title} аккаунт чтобы иметь возможность читать, быть читаемым или взаимодействовать с {site-title} пользователями. Вы можете зарегистрироваться на любом StatusNet или GNU social server или любом сервисе, основанном на протоколе Ostatus! Вы даже не должны присоединиться к сервису – попробуйте установить прекрасное ПО GNU social на свой сервер! :)
    Федерация
    микроблоггеров, которые заботятся об этике и солидарности и хотят бросить централизованные коммерческие услуги.", + "registerNickname": "Никнейм", + "registerHomepage": "Домашняя страница", + "registerBio": "Обо мне", + "registerLocation": "Местоположение", + "registerRepeatPassword": "Повторите пароль", + "moreSettings": "Больше настроек", + "otherServers": "В качестве альтернативы вы можете зарегистрироваться на другом сервере сети GNU social. Сравнение", + "editMyProfile": "Редактировать профиль", + "notifications": "Уведомления", + "xFavedYourQueet": "ваши твиты, добавленные в избранное", + "xRepeatedYourQueet": "ретвитнули", + "xStartedFollowingYou": "читают", + "followsYou": "читают", + "FAQ": "FAQ", + "inviteAFriend": "Пригласите друзей!", + "goToExternalProfile": "Перейти к полному профилю", + "cropAndSave": "Обрезать и сохранить", + "showTerms": "Прочтите наши Условия использования", + "ellipsisMore": "Больше", + "blockUser": "Заблокировать {username}", + "goToOriginalNotice": "Перейти к оригинальному твиту", + "goToTheUsersRemoteProfile": "Перейти к удалённому профилю пользователя", + "clickToDrag":"Нажмите для перетаскивания", + "keyboardShortcuts":"Горячие клавиши", + "classicInterface":"Классический {site-title}", + "accessibilityToggleLink":"Для большего удобства, нажмите на эту ссылку, чтобы переключиться на классический интерфейс", + "tooltipBookmarkStream":"Добавить эту ленту в закладки", + "tooltipTopMenu":"Меню и настройки", + "tooltipAttachImage":"Прикрепить изображение", + "tooltipShortenUrls":"Сократить все URL в твите", + "tooltipReloadStream":"Обновить ленту", + "tooltipRemoveBookmark":"Удалить закладку", + "clearHistory":"Удалить историю посещений", + "ERRORsomethingWentWrong":"Что-то пошло не так.", + "ERRORmustBeLoggedIn":"Вы должны войти в систему для просмотра этой ленты.", + "ERRORcouldNotFindUserWithNickname":"Не удалось найти пользователя с ником \"{nickname}\" на этом сервере", + "ERRORcouldNotFindGroupWithNickname":"Не удалось найти группу с ником \"{nickname}\" на этом сервере", + "ERRORcouldNotFindPage":"Не удалось найти страницу.", + "ERRORnoticeRemoved": "Этот твит был удалён.", + "ERRORnoContactWithServer": "Не удается установить соединение с сервером. Сервер перегружен или проблема с доступом в Интернет. Пожалуйста, повторите попытку позже!", + "ERRORattachmentUploadFailed": "Загрузка не удалась. Неподдерживаемый формат или слишком большой размер", + "hideRepliesToPeopleIDoNotFollow":"Скрыть ответы для людей, которых я не читаю", + "markAllNotificationsAsSeen":"Отметить уведомления как прочитанные", + "notifyRepliesAndMentions":"Упоминания и ответы", + "notifyFavs":"Избранные", + "notifyRepeats":"Ретвиты", + "notifyFollows":"Новые читатели", + "timelineOptions":"Опции ленты", + "ERRORfailedSavingYourSetting":"Не удалось сохранить ваши настройки", + "ERRORfailedMarkingAllNotificationsAsRead":"Не удалось отметить уведомления как прочитанные.", + "newNotification": "{new-notice-count} новое уведомление", + "newNotifications": "{new-notice-count} новых уведомлений", + "thisIsANoticeFromABlockedUser":"Внимание: Это уведомление от пользователя, которого вы заблокировали. Нажмите, чтобы показать его.", + "nicknamesListWithListName":"Список {nickname}'a: {list-name}", + "myListWithListName":"Мой список: {list-name}", + "listMembers":"Участники", + "listSubscribers":"Подписчики", + "ERRORcouldNotFindList":"Нет такого списка.", + "emailAlreadyInUse":"Уже используется", + "addEditLanguageLink":"Помогите перевести {site-title} на другой язык", + "onlyPartlyTranslated":"{site-title} только частично переведён на {language-name} ({percent}%). Вы можете помочь завершить перевод на на домашней странице репозитория Qvitter", + "startRant":"Начать декламацию", + "continueRant":"Продолжить декламацию" +} From 1b722228d26b36f190c731e09f2464f6294054af Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 17:27:36 +0100 Subject: [PATCH 016/120] makes image upload previews work in chrome --- js/qvitter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/qvitter.js b/js/qvitter.js index a8fe4b5..ef5c216 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -3874,10 +3874,10 @@ function uploadAttachment(e, thisUploadButton) { if (rsp.attr('stat') == 'ok') { // maybe add thumbnail below queet box - if($(data).find('atom\\:link').length>0) { - var mimeType = $(data).find('atom\\:link').attr('type'); + if($(data).find('atom\\:link,link').length>0) { + var mimeType = $(data).find('atom\\:link,link').attr('type'); if(mimeType.indexOf('image/') == 0) { - var imgUrl = $(data).find('atom\\:link').attr('href'); + var imgUrl = $(data).find('atom\\:link,link').attr('href'); thisUploadButton.closest('.queet-toolbar').before(''); } } From fd2d7555b3f3456218ad3e5c1a2b4d8f945887bd Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 18:10:09 +0100 Subject: [PATCH 017/120] fixes issue #6 --- js/dom-functions.js | 5 +---- js/misc-functions.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/js/dom-functions.js b/js/dom-functions.js index 95076e5..4ffab10 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -1155,10 +1155,7 @@ function expand_queet(q,doScrolling) { if(q.children('.queet').find('.queet-thumbs.thumb-num-1').children('.thumb-container.play-button.youtube').length == 1) { var youtubeURL = q.children('.queet').find('.queet-thumbs.thumb-num-1').children('.thumb-container.play-button.youtube').children('.attachment-thumb').attr('data-full-image-url'); if(q.children('.queet').find('.expanded-content').children('.media').children('iframe[src="' + youTubeEmbedLinkFromURL(youtubeURL) + '"]').length < 1) { // not if already showed - // hide video thumbnail if it's the only one - if(q.children('.queet').find('.queet-thumbs').children('.thumb-container').length < 2) { - q.children('.queet').find('.queet-thumbs').addClass('hide-thumbs'); - } + q.children('.queet').find('.queet-thumbs').addClass('hide-thumbs'); // show video q.children('.queet').find('.expanded-content').prepend('
    '); } diff --git a/js/misc-functions.js b/js/misc-functions.js index bc60b06..e67c256 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -833,6 +833,7 @@ function updateUserDataInStream() { window.knownDeletedNotices = new Object(); function searchForUpdatedNoticeData(obj) { + var streamItemsUpdated = false; for (var property in obj) { if (obj.hasOwnProperty(property)) { if (typeof obj[property] == "object") { @@ -849,12 +850,14 @@ function searchForUpdatedNoticeData(obj) { window.knownDeletedNotices[uriToHide] = true; var streamItemToHide = $('.stream-item[data-uri="' + uriToHide + '"]'); slideUpAndRemoveStreamItem(streamItemToHide); + streamItemsUpdated = true; } // if this is not a delete notice it means the notice exists and is not deleted, // correct any notices that are marked as unrepeated, they might have // been marked like that by mistake (i.e. a bug...) else if(streamItemFoundInFeed.hasClass('unrepeated')) { streamItemFoundInFeed.removeClass('unrepeated always-hidden'); + streamItemsUpdated = true; } // ordinary notices @@ -868,6 +871,7 @@ function searchForUpdatedNoticeData(obj) { // we first got them if(obj.is_post_verb === false) { streamItemFoundInFeed.addClass('activity always-hidden'); + streamItemsUpdated = true; } // update the avatar row if the queet is expanded and the numbers are not the same @@ -888,6 +892,10 @@ function searchForUpdatedNoticeData(obj) { queetFoundInFeed.children('script.attachment-json').text(JSON.stringify(obj.attachments)); } var attachmentsHTMLBuild = buildAttachmentHTML(obj.attachments); + var thumbsIsHidden = false; + if(queetFoundInFeed.find('.queet-thumbs').hasClass('hide-thumbs')) { + var thumbsIsHidden = true; + } queetFoundInFeed.find('.queet-thumbs').remove(); queetFoundInFeed.find('.oembed-data').remove(); placeQuotedNoticesInQueetText(attachmentsHTMLBuild.quotedNotices,queetFoundInFeed.find('.queet-text')); @@ -899,6 +907,10 @@ function searchForUpdatedNoticeData(obj) { } }); queetFoundInFeed.find('.queet-text').after(attachmentsHTMLBuild.html); + if(thumbsIsHidden) { + queetFoundInFeed.find('.queet-thumbs').addClass('hide-thumbs'); + } + streamItemsUpdated = true; } // set favorite data @@ -908,11 +920,13 @@ function searchForUpdatedNoticeData(obj) { streamItemFoundInFeed.addClass('favorited'); queetFoundInFeed.find('.action-fav-container').children('.with-icn').addClass('done'); queetFoundInFeed.find('.action-fav-container').find('.icon.sm-fav').attr('data-tooltip',window.sL.favoritedVerb); + streamItemsUpdated = true; } else { streamItemFoundInFeed.removeClass('favorited'); queetFoundInFeed.find('.action-fav-container').children('.with-icn').removeClass('done'); queetFoundInFeed.find('.action-fav-container').find('.icon.sm-fav').attr('data-tooltip',window.sL.favoriteVerb); + streamItemsUpdated = true; } // set repeat data @@ -923,17 +937,22 @@ function searchForUpdatedNoticeData(obj) { queetFoundInFeed.find('.action-rt-container').children('.with-icn').addClass('done'); queetFoundInFeed.find('.action-rt-container').find('.icon.sm-rt').attr('data-tooltip',window.sL.requeetedVerb); streamItemFoundInFeed.attr('data-requeeted-by-me-id',obj.repeated_id); + streamItemsUpdated = true; } else { streamItemFoundInFeed.removeClass('requeeted'); queetFoundInFeed.find('.action-rt-container').children('.with-icn').removeClass('done'); queetFoundInFeed.find('.action-rt-container').find('.icon.sm-rt').attr('data-tooltip',window.sL.requeetVerb); streamItemFoundInFeed.removeAttr('data-requeeted-by-me-id'); + streamItemsUpdated = true; } } } } } + if(streamItemsUpdated) { + rememberStreamStateInLocalStorage(); + } } From 94d00b7a86865b8f1fd7f1537ad18117f2d183bd Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 21:04:14 +0100 Subject: [PATCH 018/120] that made streams change very slow --- js/misc-functions.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/misc-functions.js b/js/misc-functions.js index e67c256..3361188 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -951,7 +951,10 @@ function searchForUpdatedNoticeData(obj) { } } if(streamItemsUpdated) { - rememberStreamStateInLocalStorage(); + // TODO, create a queue that runs with setInterval instead, say every 5 s, + // that way we can run rememberStreamStateInLocalStorage() in the background, + // and don't slow down stream change etc + // rememberStreamStateInLocalStorage(); } } From 889305d8eba10bcbbc11e13fb53185766d5b2d3a Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 23 Jan 2016 21:12:21 +0100 Subject: [PATCH 019/120] dutch translation --- locale/nl.json | 167 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 locale/nl.json diff --git a/locale/nl.json b/locale/nl.json new file mode 100644 index 0000000..a8e9742 --- /dev/null +++ b/locale/nl.json @@ -0,0 +1,167 @@ +{ + "directionality":"ltr", + "languageName": "Nederlands", + "loginUsername": "Gebruikersnaam of e-mail", + "loginPassword": "Wachtwoord", + "loginSignIn": "Inloggen", + "loginRememberMe": "Ingelogd blijven", + "loginForgotPassword": "Wachtwoord vergeten?", + "notices": "Queets", + "followers": "Volgelingen", + "following": "Volgt", + "groups": "Groepen", + "compose": "Stel een nieuwe Queet op...", + "queetVerb": "Verstuur", + "queetsNounPlural": "Queets", + "logout": "Uitloggen", + "languageSelected": "Taal:", + "viewMyProfilePage": "Mijn profiel bekijken", + "expand": "Openen", + "collapse": "Sluiten", + "details": "Details", + "expandFullConversation": "Open volledig gesprek", + "replyVerb": "Antwoorden", + "requeetVerb": "Requeeten", + "favoriteVerb": "Favoriseren", + "requeetedVerb": "Gerequeet", + "favoritedVerb": "Gefavoriseerd", + "replyTo": "Antwoord aan", + "requeetedBy": "Requeeted door {requeeted-by}", + "favoriteNoun": "Favoriseren", + "favoritesNoun": "Favorieten", + "requeetNoun": "Requeet", + "requeetsNoun": "Requeets", + "newQueet": "{new-notice-count} nieuwe Queet", + "newQueets": "{new-notice-count} nieuwe Queets", + "longmonthsJanuary": "Januari", + "longmonthsFebruary": "Februari", + "longmonthsMars": "Maart", + "longmonthsApril": "April", + "longmonthsMay": "Mei", + "longmonthsJune": "Juni", + "longmonthsJuly": "Juli", + "longmonthsAugust": "Augustus", + "longmonthsSeptember": "September", + "longmonthsOctober": "Oktober", + "longmonthsNovember": "November", + "longmonthsDecember": "December", + "shortmonthsJanuary": "jan", + "shortmonthsFebruary": "feb", + "shortmonthsMars": "maa", + "shortmonthsApril": "apr", + "shortmonthsMay": "mei", + "shortmonthsJune": "jun", + "shortmonthsJuly": "jul", + "shortmonthsAugust": "aug", + "shortmonthsSeptember": "sep", + "shortmonthsOctober": "okt", + "shortmonthsNovember": "nov", + "shortmonthsDecember": "dec", + "time12am": "{time} AM", + "time12pm": "{time} PM", + "longDateFormat": "{time12} - {day} {month} {year}", + "shortDateFormatSeconds": "{seconds} Sec", + "shortDateFormatMinutes": "{minutes} Min", + "shortDateFormatHours": "{hours} Uren", + "shortDateFormatDate": "{day} {month}", + "shortDateFormatDateAndY": "{day} {month} {year}", + "now": "nu", + "posting": "aan het versturen", + "viewMoreInConvBefore": "← Bekijk meer van het gesprek", + "viewMoreInConvAfter": "Bekijk meer van het gesprek →", + "mentions": "Vermeldingen", + "timeline": "Tijdlijn", + "publicTimeline": "Publieke tijdlijn", + "publicAndExtTimeline": "Het gehele bekende netwerk", + "searchVerb": "Zoek", + "deleteVerb": "Verwijder", + "cancelVerb": "Annuleer", + "deleteConfirmation": "Ben je er zeker van dat je deze Queet wil verwijderen?", + "userExternalFollow": "Op afstand volgen", + "userExternalFollowHelp": "Jouw identificatiebewijs (bijv. user@rainbowdash.net).", + "userFollow": "Volgen", + "userFollowing": "Volg ik", + "userUnfollow": "Niet meer volgen", + "joinGroup": "Deelnemen", + "joinExternalGroup": "Op afstand deelnemen", + "isMemberOfGroup": "Lid", + "leaveGroup": "Verlaat", + "memberCount": "Leden", + "adminCount": "Beheerders", + "settings": "Instellingen", + "saveChanges": "Bewaar veranderingen", + "linkColor": "Linkkleur", + "backgroundColor": "Achtergrondkleur", + "newToQuitter": "Nieuw op {site-title}?", + "signUp": "Registreer je", + "signUpFullName": "Volledige naam", + "signUpEmail": "E-mail", + "signUpButtonText": "Registreer je bij {site-title}", + "welcomeHeading": "Welkom op {site-title}.", + "welcomeText": "We zijn een
    \"Federatie\" en dat betekent dat je geen {site-title} account nodig hebt om te volgen, gevolgd te worden, of interactie te hebben met {site-title} gebruikers. Je kan je registreren op iedere StatusNet of GNU social-server of op iedere dienst gebaseerd op het Ostatus protocol! Je hoeft niet eens deel te nemen aan een dienst – probeer de prachtige GNU social-software op jouw eigen server! :)
    federatie
    van microbloggers die zich bezighouden met ethiek en solidariteit en die willen stoppen met het gebruikmaken van gecentraliseerde kapitalistische diensten.", + "registerNickname": "Alias", + "registerHomepage": "Home", + "registerBio": "Bio", + "registerLocation": "Locatie", + "registerRepeatPassword": "Herhaal wachtwoord", + "moreSettings": "Meer instellingen", + "otherServers": "Je kan bij wijze van alternatief ook een account aanmaken op een andere server van het GNU sociale netwerk. Vergelijking", + "editMyProfile": "Bewerk profiel", + "notifications": "Mededelingen", + "xFavedYourQueet": "favoriseerde jouw Queet", + "xRepeatedYourQueet": "requeete jou", + "xStartedFollowingYou": "volgde jou", + "followsYou": "volgt jou", + "FAQ": "Veelgestelde vragen", + "inviteAFriend": "Nodig een vriend uit!", + "goToExternalProfile": "Ga naar volledig profiel", + "cropAndSave": "Knip en bewaar", + "showTerms": "Lees onze gebruiksvoorwaarden", + "ellipsisMore": "Meer", + "blockUser": "Blokkeer {username}", + "goToOriginalNotice": "Ga naar originele notitie", + "goToTheUsersRemoteProfile": "Ga naar het profiel op afstand van de gebruiker", + "clickToDrag":"Klik om te slepen", + "keyboardShortcuts":"Toetsenbordsneltoetsen", + "classicInterface":"Klassiek {site-title}", + "accessibilityToggleLink":"Klik voor betere toegankelijkheid op deze link om over te stappen naar de klassieke interface", + "tooltipBookmarkStream":"Voeg deze datastroom toe aan jouw bookmarks", + "tooltipTopMenu":"Menu en instellingen", + "tooltipAttachImage":"Voeg een afbeelding toe", + "tooltipShortenUrls":"Verkort alle URL's in de Queet", + "tooltipReloadStream":"Ververs deze datastroom", + "tooltipRemoveBookmark":"Verwijder deze bookmark", + "clearHistory":"Verwijder zoekgeschiedenis", + "ERRORsomethingWentWrong":"Er ging iets mis.", + "ERRORmustBeLoggedIn":"Je moet ingelogd zijn om deze datastroom te zien.", + "ERRORcouldNotFindUserWithNickname":"Kon geen gebruiker met alias \"{nickname}\" vinden op deze server", + "ERRORcouldNotFindGroupWithNickname":"Kon geen groep met alias \"{nickname}\" vinden op deze server", + "ERRORcouldNotFindPage":"Kon die pagina niet vinden.", + "ERRORnoticeRemoved": "Deze notitie is verwijderd.", + "ERRORnoContactWithServer": "Kan geen verbinding met de server tot stand brengen. De server zou overbelast kunnen zijn of er zou een probleem kunnen zijn met jouw internetverbinding. Probeer het later alsjeblieft nog eens!", + "ERRORattachmentUploadFailed": "De upload is niet gelukt. Het zou kunnen zijn dat het gaat om een niet-ondersteund formaat of dat het formaat te groot is.", + "hideRepliesToPeopleIDoNotFollow":"Verberg antwoorden aan mensen die ik niet volg", + "markAllNotificationsAsSeen":"Markeer alle mededelingen als gezien", + "notifyRepliesAndMentions":"Vermeldingen en antwoorden", + "notifyFavs":"Favorieten", + "notifyRepeats":"Requeets", + "notifyFollows":"Nieuwe volgelingen", + "timelineOptions":"Tijdlijn-opties", + "ERRORfailedSavingYourSetting":"Niet gelukt om jouw instelling op te slaan", + "ERRORfailedMarkingAllNotificationsAsRead":"Niet gelukt om alle mededelingen te markeren als gezien.", + "newNotification": "{new-notice-count} nieuwe mededeling", + "newNotifications": "{new-notice-count} nieuwe mededelingen", + "thisIsANoticeFromABlockedUser":"Waarschuwing: Dit is een notitie van een gebruiker die je hebt geblokkeerd. Klik om deze te laten zien.", + "nicknamesListWithListName":"{nickname}’s lijst: {list-name}", + "myListWithListName":"Mijn lijst: {list-name}", + "listMembers":"Leden", + "listSubscribers":"Abonnees", + "ERRORcouldNotFindList":"Deze lijst bestaat niet.", + "emailAlreadyInUse":"Al in gebruik", + "addEditLanguageLink":"Help translate {site-title} to another language", + "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", + "startRant":"Start a rant", + "continueRant":"Continue the rant", + "hideEmbeddedInTimeline":"Hide embedded content in this timeline", + "hideQuotesInTimeline":"Hide quotes in this timeline" +} From a47ea60100345ed00c5dd4ccb6a118523c02aa1e Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sun, 24 Jan 2016 13:58:57 +0100 Subject: [PATCH 020/120] fixes issue #4 --- actions/apiexternalusershow.php | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/actions/apiexternalusershow.php b/actions/apiexternalusershow.php index 81fc790..9eed117 100644 --- a/actions/apiexternalusershow.php +++ b/actions/apiexternalusershow.php @@ -119,24 +119,6 @@ class ApiExternalUserShowAction extends ApiPrivateAuthAction return true; } - // if we don't know about this user, or the user has changed nickname - // if profile url ends with '/' this is probably an unknown single user instance - if(substr($profileurl, -1)==='/') { - $instanceurl = $profileurl; - $user_id_or_nickname = 1; - } - - // multi user instance - else { - $user_id_or_nickname = substr($profileurl, strrpos($profileurl, '/')+1); - $instanceurl = substr($profileurl, 0, strrpos($profileurl, '/')); - } - $external_profile = $this->getProfileFromExternalInstance($instanceurl,$user_id_or_nickname); - if(!isset($external_profile->statusnet_profile_url)) { - return true; - } - $this->profile->external = $external_profile; - return true; } @@ -154,9 +136,13 @@ class ApiExternalUserShowAction extends ApiPrivateAuthAction { parent::handle(); - $this->initDocument('json'); - $this->showJsonObjects($this->profile); - $this->endDocument('json'); + if(is_null($this->profile->local) && is_null($this->profile->external)) { + $this->clientError(_('List not found.'), 404); + } else { + $this->initDocument('json'); + $this->showJsonObjects($this->profile); + $this->endDocument('json'); + } } /** From 087ef6cf95488458bf60330d9e6e77f9d8c10502 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sun, 24 Jan 2016 14:02:50 +0100 Subject: [PATCH 021/120] fixes issue #5 --- js/misc-functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/misc-functions.js b/js/misc-functions.js index 3361188..f2e978e 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -802,7 +802,7 @@ function updateUserDataInStream() { // cover photos $.each($('.profile-header-inner[data-user-id="' + userArray.local.id + '"]'),function(){ - if($(this).css('background-image') != 'url("' + userArray.local.cover_photo + '")') { + if($(this).css('background-image') != 'url("' + userArray.local.cover_photo + '")' && userArray.local.cover_photo != false) { $(this).css('background-image','url("' + userArray.local.cover_photo + '")'); } }); From c2ff567339177119a61d63df299995a9a8006051 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sun, 24 Jan 2016 22:02:43 +0100 Subject: [PATCH 022/120] show embedded content in tooltips and when notice is expanded, if user opt-out:ed --- css/qvitter.css | 50 ++++++++++++++++++++++++++++++++++++-------- js/dom-functions.js | 12 +++++++---- js/misc-functions.js | 2 +- js/qvitter.js | 37 +++++++++++++++++++++++++++++++- 4 files changed, 86 insertions(+), 15 deletions(-) diff --git a/css/qvitter.css b/css/qvitter.css index aa474ec..6664bfb 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -1446,6 +1446,15 @@ body.rtl #history-container.menu-container a .chev-right { hyphens: auto; word-wrap: break-word; } +.tooltip.oembed { + border-radius: 3px; + max-width:400px; + } +.tooltip.quote { + padding:10px 20px; + border-radius: 3px; + max-width:400px; + } .tooltip-caret { z-index: 10000; display:block; @@ -1453,7 +1462,7 @@ body.rtl #history-container.menu-container a .chev-right { position:absolute; width:0; height:0; - border:5px solid #333; + border:6px solid #333; border-top:0 none; border-left-color: transparent; border-right-color: transparent; @@ -1464,7 +1473,7 @@ body.rtl #history-container.menu-container a .chev-right { transition-delay: 0.6s; } .tooltip-caret.bottom { - border-top:5px solid #333; + border-top:6px solid #333; border-bottom:0 none; } @@ -1495,14 +1504,14 @@ body.rtl #history-container.menu-container a .chev-right { position:absolute; width:0; height:0; - border:5px solid #fff; + border:6px solid #fff; border-top:0 none; border-left-color: transparent; border-right-color: transparent; transition: opacity 0.1s ease-in 0; } .hover-card-caret.bottom { - border-top:5px solid #fff; + border-top:6px solid #fff; border-bottom:0 none; } @@ -2090,6 +2099,9 @@ body.rtl .queet.rtl .expanded-content { margin:0 10px 0 0; float: left; } +.tooltip .oembed-img-container { + margin:5px 10px 5px 0; + } .quoted-notice-attachments-num-1 .quoted-notice-img-container { height: 100%; @@ -2195,7 +2207,8 @@ body.rtl .queet.rtl .expanded-content { display:block; } -.queet .thumb-container { +.queet .thumb-container, +.tooltip .thumb-container { display: inline-block; overflow: hidden; position: relative; @@ -2214,6 +2227,17 @@ body.rtl .queet.rtl .expanded-content { height:250px; } +.tooltip .thumb-container { + max-width:300px; + min-height:0; + max-height:200px; + margin:5px 0 0 0; + } +.tooltip .thumb-container img { + max-width:100%; + opacity:0; + } + .stream-item:not(.expanded) .queet .queet-thumbs.thumb-num-1 .thumb-container.play-button:before, .queet .queet-thumbs:not(.thumb-num-1) .thumb-container.play-button:before, .modal-content .queet .thumb-container.play-button:before { @@ -2452,17 +2476,25 @@ body.rtl .queet.rtl .expanded-content { } -#feed-body.embedded-content-hidden-by-user .queet-content > .oembed-data, -#feed-body.embedded-content-hidden-by-user .queet-content > .queet-thumbs, -#feed-body.quotes-hidden-by-user .queet-text .quote-link-container, +#feed-body.embedded-content-hidden-by-user .stream-item:not(.expanded) > .queet .queet-content > .oembed-data, +#feed-body.embedded-content-hidden-by-user .stream-item:not(.expanded) > .queet .queet-content > .queet-thumbs, +#feed-body.quotes-hidden-by-user .stream-item:not(.expanded) > .queet .queet-text .quote-link-container, .queet-text a.hidden-embedded-link-in-queet-text, .queet-text a.hidden-quote-link-in-queet-text { display:none; } +#feed-body.embedded-content-hidden-by-user .stream-item.collapsing > .queet .queet-content > .oembed-data, +#feed-body.embedded-content-hidden-by-user .stream-item.collapsing > .queet .queet-content > .queet-thumbs, +#feed-body.quotes-hidden-by-user .stream-item.collapsing > .queet .queet-text .quote-link-container { + display:none !important; + } #feed-body.embedded-content-hidden-by-user .queet-text a.hidden-embedded-link-in-queet-text, -#feed-body.quotes-hidden-by-user .queet-text a.hidden-quote-link-in-queet-text { +#feed-body.quotes-hidden-by-user .stream-item:not(.expanded) > .queet .queet-text a.hidden-quote-link-in-queet-text { display:inline; } +#feed-body.quotes-hidden-by-user .stream-item.collapsing > .queet .queet-text a.hidden-quote-link-in-queet-text { + display:inline !important; + } .stream-item.activity .created-at a { diff --git a/js/dom-functions.js b/js/dom-functions.js index 4ffab10..2d2d538 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -2145,6 +2145,7 @@ function placeQuotedNoticesInQueetText(quotedNotices,queetText) { if($(this).next().is('.quote-link-container')) { $(this).addClass('hidden-quote-link-in-queet-text'); $(this).attr('data-quote-url',qoutedNotice.url); + $(this).next().attr('data-quote-url',qoutedNotice.url); $(this).next().addClass(qoutedNotice.class); $(this).next().attr('href',qoutedNotice.href); $(this).next().html(qoutedNotice.html); @@ -2370,13 +2371,16 @@ function buildAttachmentHTML(attachments){ var img_url = this.thumb_url; } - attachmentHTML += ''; - urlsToHide.push(window.siteInstanceURL + 'attachment/' + this.id); // hide this attachment url from the queet text + var urlToHide = window.siteInstanceURL + 'attachment/' + this.id; + + attachmentHTML += ''; + urlsToHide.push(urlToHide); // hide this attachment url from the queet text attachmentNum++; } else if (this.mimetype == 'image/svg+xml') { - attachmentHTML += ''; - urlsToHide.push(window.siteInstanceURL + 'attachment/' + this.id); // hide this attachment url from the queet text + var urlToHide = window.siteInstanceURL + 'attachment/' + this.id; + attachmentHTML += ''; + urlsToHide.push(urlToHide); // hide this attachment url from the queet text attachmentNum++; } }); diff --git a/js/misc-functions.js b/js/misc-functions.js index f2e978e..f859576 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -404,7 +404,7 @@ function alignTooltipTohoveredElement(tooltipElement,tooltipCaret,hovered) { // tooltip at top else { var tooltipCaretPosX = targetPosX+targetWidth/2-5; - var tooltipCaretPosY = targetPosY-7; + var tooltipCaretPosY = targetPosY-8; // caret always directly on top of element tooltipCaret.css('left',tooltipCaretPosX + 'px'); diff --git a/js/qvitter.js b/js/qvitter.js index ef5c216..d5e73ff 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -138,8 +138,43 @@ $('body').on({ // regular tooltips if($(e.target).is('[data-tooltip]')) { + + var tooltipClass = ''; + tooltip_data = $(e.target).attr('data-tooltip'); - var tooltipElement = $('
    ' + tooltip_data + '
    '); + + // if embedded content is hidden, we show it in tooltips + if($('#feed-body').hasClass('embedded-content-hidden-by-user') + && !$(e.target).is('.oembed-item') + && $(e.target).closest('.queet').length > 0 + && $(e.target).closest('.queet').find('.oembed-item[href="' + $(e.target).attr('href') + '"]').length > 0) { + tooltip_data = $(e.target).closest('.queet').find('.oembed-item[href="' + $(e.target).attr('href') + '"]').html(); + tooltipClass = 'oembed'; + } + else if($('#feed-body').hasClass('embedded-content-hidden-by-user') + && !$(e.target).is('.attachment-thumb') + && $(e.target).closest('.queet').length > 0 + && $(e.target).text().indexOf('/attachment/') > -1) { + // local attachments has /attachment/-url in its href attribute + if($(e.target).closest('.queet').find('.thumb-container[data-local-attachment-url="' + $(e.target).attr('href') + '"]').length>0) { + tooltip_data = $(e.target).closest('.queet').find('.thumb-container[data-local-attachment-url="' + $(e.target).attr('href') + '"]').outerHTML(); + tooltipClass = 'thumb'; + } + // remote attachments are identified by full url + else if($(e.target).closest('.queet').find('.thumb-container[href="' + $(e.target).attr('data-tooltip') + '"]').length>0) { + tooltip_data = $(e.target).closest('.queet').find('.thumb-container[href="' + $(e.target).attr('data-tooltip') + '"]').outerHTML(); + tooltipClass = 'thumb'; + } + } + else if($('#feed-body').hasClass('quotes-hidden-by-user') + && !$(e.target).is('.quote-link-container') + && $(e.target).is('[data-quote-url]') + && $(e.target).closest('.queet-text').find('.quote-link-container[data-quote-url="' + $(e.target).attr('data-quote-url') + '"]').length > 0) { + tooltip_data = $(e.target).closest('.queet-text').find('.quote-link-container[data-quote-url="' + $(e.target).attr('data-quote-url') + '"]').html(); + tooltipClass = 'quote'; + } + + var tooltipElement = $('
    ' + tooltip_data + '
    '); var tooltipCaret = $('
    '); $('body').prepend(tooltipElement); $('body').prepend(tooltipCaret); From ed3d8af57b4fe173e38593631a2cdf38449efd92 Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Tue, 26 Jan 2016 06:58:41 +0000 Subject: [PATCH 023/120] updated zh_cn translations --- locale/zh_cn.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/locale/zh_cn.json b/locale/zh_cn.json index c7fa0b2..6b82016 100644 --- a/locale/zh_cn.json +++ b/locale/zh_cn.json @@ -115,19 +115,19 @@ "FAQ": "FAQ", "inviteAFriend": "邀请好友", "goToExternalProfile": "前往完整的个人档案", - "cropAndSave": "Crop and save", - "showTerms": "Read our Terms of Use", - "ellipsisMore": "More", - "blockUser": "Block {username}", + "cropAndSave": "裁剪并保存", + "showTerms": "查看我们的使用条例", + "ellipsisMore": "更多", + "blockUser": "屏蔽 {username}", "goToOriginalNotice": "Go to original notice", "goToTheUsersRemoteProfile": "Go to the user's remote profile", "clickToDrag":"Click to drag", - "keyboardShortcuts":"Keyboard shortcuts", + "keyboardShortcuts":"键盘快捷键", "classicInterface":"Classic {site-title}", "accessibilityToggleLink":"For better accessibility, click this link to switch to the classic interface", "tooltipBookmarkStream":"Add this stream to your bookmarks", "tooltipTopMenu":"Menu and settings", - "tooltipAttachImage":"Attach an image", + "tooltipAttachImage":"附加一张图片", "tooltipShortenUrls":"Shorten all URLs in the Queet", "tooltipReloadStream":"Refresh this stream", "tooltipRemoveBookmark":"Remove this bookmark", @@ -142,25 +142,25 @@ "hideRepliesToPeopleIDoNotFollow":"Hide replies to people I don't follow", "markAllNotificationsAsSeen":"Mark all notifications as seen", "notifyRepliesAndMentions":"Mentions and replies", - "notifyFavs":"Favorites", - "notifyRepeats":"Requeets", - "notifyFollows":"New followers", - "timelineOptions":"Timeline options", + "notifyFavs":"收藏", + "notifyRepeats":"转推", + "notifyFollows":"新的关注者", + "timelineOptions":"时间轴选项", "ERRORfailedSavingYourSetting":"Failed saving your setting", "ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.", - "newNotification": "{new-notice-count} new notification", - "newNotifications": "{new-notice-count} new notifications", - "thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it.", - "nicknamesListWithListName":"{nickname}’s list: {list-name}", - "myListWithListName":"My list: {list-name}", - "listMembers":"Members", - "listSubscribers":"Subscribers", - "ERRORcouldNotFindList":"There is no such list.", - "emailAlreadyInUse":"Already in use", - "addEditLanguageLink":"Help translate {site-title} to another language", + "newNotification": "{new-notice-count} 新通知", + "newNotifications": "{new-notice-count} 新通知", + "thisIsANoticeFromABlockedUser":"注意:这是一条来自你屏蔽的用户的推文。点击以查看。", + "nicknamesListWithListName":"{nickname}的列表: {list-name}", + "myListWithListName":"我的列表: {list-name}", + "listMembers":"成员", + "listSubscribers":"订阅者", + "ERRORcouldNotFindList":"找不到这个列表", + "emailAlreadyInUse":"已经被使用了", + "addEditLanguageLink":"帮助翻译 {site-title} 到其他语言", "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", "hideQuotesInTimeline":"Hide quotes in this timeline" -} +} \ No newline at end of file From 0353003038509a56dfd3d59c1ffd1a06b432628c Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 26 Jan 2016 11:44:42 +0100 Subject: [PATCH 024/120] bugfix --- QvitterPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 028abff..0522859 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -578,7 +578,7 @@ class QvitterPlugin extends Plugin { } // this applies to older versions of gnu social, i think - } catch (ServerException $e) { + } catch (Exception $e) { $thumb = File_thumbnail::getKV('file_id', $attachment->id); if ($thumb instanceof File_thumbnail) { $thumb_url = $thumb->getUrl(); From 19db6dd8fe6760bd84c8d8856f029a4ad201e544 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 27 Jan 2016 13:58:36 +0100 Subject: [PATCH 025/120] esperanto by Nicolas Maia --- locale/eo.json | 88 +++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/locale/eo.json b/locale/eo.json index 7be1137..9bd2a9c 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -120,48 +120,48 @@ "ellipsisMore": "Pli", "blockUser": "Bloki {username}", "goToOriginalNotice": "Iri al origina pepo", - "goToTheUsersRemoteProfile": "Go to the user's remote profile", - "clickToDrag":"Click to drag", - "keyboardShortcuts":"Keyboard shortcuts", - "classicInterface":"Classic {site-title}", - "accessibilityToggleLink":"For better accessibility, click this link to switch to the classic interface", - "tooltipBookmarkStream":"Add this stream to your bookmarks", - "tooltipTopMenu":"Menu and settings", - "tooltipAttachImage":"Attach an image", - "tooltipShortenUrls":"Shorten all URLs in the Queet", - "tooltipReloadStream":"Refresh this stream", - "tooltipRemoveBookmark":"Remove this bookmark", - "clearHistory":"Clear browsing history", - "ERRORsomethingWentWrong":"Something went wrong.", - "ERRORmustBeLoggedIn":"You must be logged in to view this stream.", - "ERRORcouldNotFindUserWithNickname":"Could not find a user with nickname \"{nickname}\" on this server", - "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", - "ERRORcouldNotFindPage":"Could not find that page.", - "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", - "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large.", - "hideRepliesToPeopleIDoNotFollow":"Hide replies to people I don't follow", - "markAllNotificationsAsSeen":"Mark all notifications as seen", - "notifyRepliesAndMentions":"Mentions and replies", - "notifyFavs":"Favorites", - "notifyRepeats":"Requeets", - "notifyFollows":"New followers", - "timelineOptions":"Timeline options", - "ERRORfailedSavingYourSetting":"Failed saving your setting", - "ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.", - "newNotification": "{new-notice-count} new notification", - "newNotifications": "{new-notice-count} new notifications", - "thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it.", - "nicknamesListWithListName":"{nickname}’s list: {list-name}", - "myListWithListName":"My list: {list-name}", - "listMembers":"Members", - "listSubscribers":"Subscribers", - "ERRORcouldNotFindList":"There is no such list.", - "emailAlreadyInUse":"Already in use", - "addEditLanguageLink":"Help translate {site-title} to another language", - "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", - "startRant":"Start a rant", - "continueRant":"Continue the rant", - "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "goToTheUsersRemoteProfile": "Iri al la uzanta fora profilo", + "clickToDrag":"Alklaku por treni", + "keyboardShortcuts":"Fulmoklava menuo", + "classicInterface":"Klasika {site-title}", + "accessibilityToggleLink":"Por pli bona alirebleco, alklaku ĉi tiun ligilon por ŝanĝi al la klasika fasado", + "tooltipBookmarkStream":"Aldoni ĉi tiun fluon al viaj legosignoj", + "tooltipTopMenu":"Menuo kaj agordoj", + "tooltipAttachImage":"Kunligi bildon", + "tooltipShortenUrls":"Mallongigi ĉiuj URL-ojn en la pepo", + "tooltipReloadStream":"Aktualigi ĉi tiun fluon", + "tooltipRemoveBookmark":"Forviŝi ĉi tiun legosigno", + "clearHistory":"Forviŝi retumadan historion", + "ERRORsomethingWentWrong":"Io malĝusta okazis.", + "ERRORmustBeLoggedIn":"Vi bezonas esti ensalutinta por vidi ĉi tiun fluon.", + "ERRORcouldNotFindUserWithNickname":"Ne eblis trovi uzanton kun la nomo \"{nickname}\" en ĉi tiu servilo", + "ERRORcouldNotFindGroupWithNickname":"Ne eblis trovi grupon kun la nomo \"{nickname}\" en ĉi tiu servilo", + "ERRORcouldNotFindPage":"Ne eblis trovi tiu paĝo.", + "ERRORnoticeRemoved": "Ĉi tiu pepo estis forigita.", + "ERRORnoContactWithServer": "Ne eblas konektadi al la servilo. Eble la servilo estas superŝarĝita, aŭ estas problemo kun via interreta konekto. Bonvole reprovu poste!", + "ERRORattachmentUploadFailed": "La alŝutado malsukcesis. La dosierformo eble ne estas subtenata aŭ ĝi tro grandas.", + "hideRepliesToPeopleIDoNotFollow":"Kaŝi respondoj al homoj kiuj mi ne sekvas", + "markAllNotificationsAsSeen":"Marki ĉiujn sciigojn kiel viditaj", + "notifyRepliesAndMentions":"Mencioj kaj respondoj", + "notifyFavs":"Stelsignitaj", + "notifyRepeats":"Repepoj", + "notifyFollows":"Novaj sekvantoj", + "timelineOptions":"Tempoliniaj agordoj", + "ERRORfailedSavingYourSetting":"Malsukcesis savi vian agordon", + "ERRORfailedMarkingAllNotificationsAsRead":"Malsukcesis marki ĉiujn sciigojn kiel viditaj.", + "newNotification": "{new-notice-count} nova sciigo", + "newNotifications": "{new-notice-count} novaj sciigoj", + "thisIsANoticeFromABlockedUser":"Averto: Ĉi tiu estas pepo de uzanto, kiu vi blokis. Alklaku por montri ĝin.", + "nicknamesListWithListName":"Listo de {nickname}: {list-name}", + "myListWithListName":"Mia listo: {list-name}", + "listMembers":"Membroj", + "listSubscribers":"Abonantoj", + "ERRORcouldNotFindList":"Ne estas tia listo.", + "emailAlreadyInUse":"Iu jam uzas ĝin", + "addEditLanguageLink":"Helpu traduki {site-title} al alia lingvo", + "onlyPartlyTranslated":"{site-title} estas nur parte tradukita al {language-name} ({percent}%). Vi povas kompletigi la tradukon ĉe la deponejo de Qvitter", + "startRant":"Eki plendon", + "continueRant":"Daŭrigi la plendon", + "hideEmbeddedInTimeline":"Kaŝi enkorpigitajn enhavojn en ĉi tiu tempolinio", + "hideQuotesInTimeline":"Kaŝi citaĵoj en ĉi tiu tempolinio" } From 094ed63c172d49cf9bd50fabafed7b5ccf2297b0 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 27 Jan 2016 13:59:23 +0100 Subject: [PATCH 026/120] better parsing of twitter's oembed data --- QvitterPlugin.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 0522859..b0d176a 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -519,9 +519,10 @@ class QvitterPlugin extends Plugin { $oembed = File_oembed::getKV('file_id',$attachment->id); if($oembed instanceof File_oembed) { $oembed_html = str_replace('<!--//-->','',$oembed->html); // trash left of wordpress' javascript after htmLawed removed the tags - if($oembed->provider == 'Twitter' && strstr($oembed_html, '
    —')) { - $oembed_html = substr($oembed_html,0,strpos($oembed_html, '
    —')); // remove user data from twitter oembed html (we have it in ) - $twitter_username = substr($oembed->html,strpos($oembed->html, '
    —')+12); +error_log('$oembed_html: '.$oembed_html); + if($oembed->provider == 'Twitter' && strstr($oembed_html, '>— '.$oembed->author_name)) { + $oembed_html = substr($oembed_html,0,strpos($oembed_html, '>— '.$oembed->author_name)+1); // remove user data from twitter oembed html (we have it in ) + $twitter_username = substr($oembed->html,strpos($oembed->html, '>— '.$oembed->author_name)+strlen('>— '.$oembed->author_name)); $twitter_username = substr($twitter_username, strpos($twitter_username,'(@')+1); $twitter_username = substr($twitter_username, 0,strpos($twitter_username,')')); $oembed->title = $twitter_username; From f6fbda7b811cfe6c3b768035fec0e61faf640eda Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 27 Jan 2016 16:20:16 +0100 Subject: [PATCH 027/120] Updating the WelcomeText in pt and pt-BR by Nicolas Maia --- locale/pt.json | 2 +- locale/pt_br.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/pt.json b/locale/pt.json index 4e59803..c4c95c2 100644 --- a/locale/pt.json +++ b/locale/pt.json @@ -98,7 +98,7 @@ "signUpEmail": "E-mail", "signUpButtonText": "Registre-se no {site-title}", "welcomeHeading": "Bem-vindo ao {site-title}.", - "welcomeText": "Somos uma
    « Federação » significa que você não deve ter uma conta do {site-title} para seguir seus usuários, ser seguido por eles ou se comunicar com eles. Você pode se registrar em qualquer servidor StatusNet ou GNU social, ou em qualquer serviço utilizando o protocolo OStatus! Também não deve se registrar em qualquer serviço para participar - simplesmente instale o software GNU social em seu próprio servidor. (:
    federação
    de microblogueiros que, como você, estão motivados pela ética e solidaridade, e querem abandonar os serviços centralizados capitalistas. Estamos aqui desde 2010 e sempre vamos ser non-profit.", + "welcomeText": "Somos uma
    « Federação » significa que você não deve ter uma conta do {site-title} para seguir seus usuários, ser seguido por eles ou se comunicar com eles. Você pode se registrar em qualquer servidor StatusNet ou GNU social, ou em qualquer serviço utilizando o protocolo OStatus! Também não deve se registrar em qualquer serviço para participar - simplesmente instale o software GNU social em seu próprio servidor. (:
    federação
    de microblogueiros que, como você, estão motivados pela ética e solidaridade, e querem abandonar os serviços centralizados capitalistas. Estamos aqui desde 2010 e sempre vamos ser sem fins lucrativos.", "registerNickname": "Nome de usuário", "registerHomepage": "Site web", "registerBio": "Biografia", diff --git a/locale/pt_br.json b/locale/pt_br.json index 010d238..0196fcb 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -98,7 +98,7 @@ "signUpEmail": "E-mail", "signUpButtonText": "Registre-se no {site-title}", "welcomeHeading": "Bem-vindo ao {site-title}.", - "welcomeText": "Somos uma
    « Federação » significa que você não deve ter uma conta do {site-title} para seguir seus usuários, ser seguido por eles ou se comunicar com eles. Você pode se registrar em qualquer servidor StatusNet ou GNU social, ou em qualquer serviço utilizando o protocolo OStatus! Também não deve se registrar em qualquer serviço para participar - simplesmente instale o software GNU social em seu próprio servidor. (:
    federação
    de microblogueiros que, como você, estão motivados pela ética e solidaridade, e querem abandonar os serviços centralizados capitalistas. Estamos aqui desde 2010 e sempre vamos ser non-profit.", + "welcomeText": "Somos uma
    « Federação » significa que você não deve ter uma conta do {site-title} para seguir seus usuários, ser seguido por eles ou se comunicar com eles. Você pode se registrar em qualquer servidor StatusNet ou GNU social, ou em qualquer serviço utilizando o protocolo OStatus! Também não deve se registrar em qualquer serviço para participar - simplesmente instale o software GNU social em seu próprio servidor. (:
    federação
    de microblogueiros que, como você, estão motivados pela ética e solidaridade, e querem abandonar os serviços centralizados capitalistas. Estamos aqui desde 2010 e sempre vamos ser sem fins lucrativos.", "registerNickname": "Nome de usuário", "registerHomepage": "Website", "registerBio": "Biografia", @@ -164,4 +164,4 @@ "continueRant":"Continuar o debate", "hideEmbeddedInTimeline":"Ocultar conteúdo incorporado nessa linha do tempo", "hideQuotesInTimeline":"Ocultar citações nesta linha do tempo" -} \ No newline at end of file +} From b7b842def9ea7f80de2ef0a30619da96714dfb13 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 27 Jan 2016 16:29:02 +0100 Subject: [PATCH 028/120] typo --- locale/eo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/eo.json b/locale/eo.json index 9bd2a9c..9945110 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -163,5 +163,5 @@ "startRant":"Eki plendon", "continueRant":"Daŭrigi la plendon", "hideEmbeddedInTimeline":"Kaŝi enkorpigitajn enhavojn en ĉi tiu tempolinio", - "hideQuotesInTimeline":"Kaŝi citaĵoj en ĉi tiu tempolinio" + "hideQuotesInTimeline":"Kaŝi citaĵojn en ĉi tiu tempolinio" } From 65c5d4caca1317c4b5d1304f6ec40dcbfb98c1dc Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 28 Jan 2016 18:51:26 +0100 Subject: [PATCH 029/120] more twitter compatible api --- QvitterPlugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index b0d176a..2830352 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -519,7 +519,6 @@ class QvitterPlugin extends Plugin { $oembed = File_oembed::getKV('file_id',$attachment->id); if($oembed instanceof File_oembed) { $oembed_html = str_replace('<!--//-->','',$oembed->html); // trash left of wordpress' javascript after htmLawed removed the tags -error_log('$oembed_html: '.$oembed_html); if($oembed->provider == 'Twitter' && strstr($oembed_html, '>— '.$oembed->author_name)) { $oembed_html = substr($oembed_html,0,strpos($oembed_html, '>— '.$oembed->author_name)+1); // remove user data from twitter oembed html (we have it in ) $twitter_username = substr($oembed->html,strpos($oembed->html, '>— '.$oembed->author_name)+strlen('>— '.$oembed->author_name)); @@ -760,6 +759,11 @@ error_log('$oembed_html: '.$oembed_html); $twitter_user['cover_photo'] = Profile_prefs::getConfigData($profile, 'qvitter', 'cover_photo'); $twitter_user['background_image'] = Profile_prefs::getConfigData($profile, 'qvitter', 'background_image'); + // twitter compatible + $twitter_user['profile_link_color'] = Profile_prefs::getConfigData($profile, 'theme', 'linkcolor'); + $twitter_user['profile_background_color'] = Profile_prefs::getConfigData($profile, 'theme', 'backgroundcolor'); + $twitter_user['profile_banner_url'] = Profile_prefs::getConfigData($profile, 'qvitter', 'cover_photo'); + // follows me? if ($scoped) { $twitter_user['follows_you'] = $profile->isSubscribed($scoped); From e49964458ced6502458a4b1e32e3146aad24c6c2 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 28 Jan 2016 19:08:58 +0100 Subject: [PATCH 030/120] admins can set any qvitternotice --- actions/qvitteradminsettings.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/actions/qvitteradminsettings.php b/actions/qvitteradminsettings.php index 3cf30bc..a38d4ab 100644 --- a/actions/qvitteradminsettings.php +++ b/actions/qvitteradminsettings.php @@ -38,8 +38,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php'; - class QvitterAdminSettingsAction extends AdminPanelAction { @@ -116,15 +114,6 @@ class QvitterAdminSettingsAction extends AdminPanelAction _('Maximum length for the sidebar notice is 21844 characters.') ); } - - // scrub HTML input - - $config = array( - 'safe' => 1, - 'deny_attribute' => 'on*' - ); - - $qvitterNotice = htmLawed($qvitterNotice, $config); } } From 1b7a9c507b7a1401e78aa095bbba34972389cebf Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 28 Jan 2016 21:12:34 +0100 Subject: [PATCH 031/120] update profile banner (twidere support) --- QvitterPlugin.php | 4 +- ....php => apiaccountupdateprofilebanner.php} | 104 ++++++++++++------ css/qvitter.css | 2 +- js/dom-functions.js | 11 +- js/qvitter.js | 47 +++++--- 5 files changed, 118 insertions(+), 50 deletions(-) rename actions/{apiupdatecoverphoto.php => apiaccountupdateprofilebanner.php} (56%) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 2830352..89b930e 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -195,8 +195,8 @@ class QvitterPlugin extends Plugin { $m->connect('api/qvitter/allfollowing/:id.json', array('action' => 'apiqvitterallfollowing', 'id' => Nickname::INPUT_FMT)); - $m->connect('api/qvitter/update_cover_photo.json', - array('action' => 'ApiUpdateCoverPhoto')); + $m->connect('api/account/update_profile_banner.json', + array('action' => 'ApiAccountUpdateProfileBanner')); $m->connect('api/qvitter/update_background_image.json', array('action' => 'ApiUpdateBackgroundImage')); $m->connect('api/qvitter/update_avatar.json', diff --git a/actions/apiupdatecoverphoto.php b/actions/apiaccountupdateprofilebanner.php similarity index 56% rename from actions/apiupdatecoverphoto.php rename to actions/apiaccountupdateprofilebanner.php index 6f9b4fb..4f07dcb 100644 --- a/actions/apiupdatecoverphoto.php +++ b/actions/apiaccountupdateprofilebanner.php @@ -1,7 +1,7 @@ user = $this->auth_user; - $this->cropW = $this->trimmed('cropW'); - $this->cropH = $this->trimmed('cropH'); - $this->cropX = $this->trimmed('cropX'); - $this->cropY = $this->trimmed('cropY'); - $this->img = $this->trimmed('img'); + $this->cropW = $this->trimmed('width'); + $this->cropH = $this->trimmed('height'); + $this->cropX = $this->trimmed('offset_left'); + $this->cropY = $this->trimmed('offset_top'); + $this->img = $this->trimmed('banner'); return true; } @@ -76,33 +76,75 @@ class ApiUpdateCoverPhotoAction extends ApiAuthAction protected function handle() { parent::handle(); + $profile = $this->user->getProfile(); - $profile = $this->user->getProfile(); - $base64img = $this->img; - if(stristr($base64img, 'image/jpeg')) { - $base64img_mime = 'image/jpeg'; - } - elseif(stristr($base64img, 'image/png')) { - // should convert to jpg here!! - $base64img_mime = 'image/png'; - } - $base64img = str_replace('data:image/jpeg;base64,', '', $base64img); - $base64img = str_replace('data:image/png;base64,', '', $base64img); - $base64img = str_replace(' ', '+', $base64img); - $base64img_hash = md5($base64img); - $base64img = base64_decode($base64img); - $base64img_basename = basename('cover'); - $base64img_filename = File::filename($profile, $base64img_basename, $base64img_mime); - $base64img_path = File::path($base64img_filename); - $base64img_success = file_put_contents($base64img_path, $base64img); - $base64img_mimetype = MediaFile::getUploadedMimeType($base64img_path, $base64img_filename); - $mediafile = new MediaFile($profile, $base64img_filename, $base64img_mimetype); - $imagefile = new ImageFile($mediafile->fileRecord->id, File::path($mediafile->filename)); - $imagefile->resizeTo(File::path($mediafile->filename), array('width'=>$this->cropW, 'height'=>$this->cropH, 'x'=>$this->cropX, 'y'=>$this->cropY, 'w'=>$this->cropW, 'h'=>$this->cropH)); - $result['url'] = File::url($mediafile->filename); + // see if we have regular uploaded image data + try { - Profile_prefs::setData($profile, 'qvitter', 'cover_photo', $result['url']); + $mediafile = MediaFile::fromUpload('banner', $profile); + } catch (NoUploadedMediaException $e) { + + // if not we may have base64 data + $img = $this->img; + if(stristr($img, 'image/jpeg')) { + $img_mime = 'image/jpeg'; + } + elseif(stristr($img, 'image/png')) { + // should convert to jpg here!! + $img_mime = 'image/png'; + } + + // i don't remember why we had to do this + $img = str_replace('data:image/jpeg;base64,', '', $img); + $img = str_replace('data:image/png;base64,', '', $img); + $img = str_replace(' ', '+', $img); + $img = base64_decode($img, true); + + try { + $img_filename = File::filename($profile, 'cover', $img_mime); + $img_path = File::path($img_filename); + $img_success = file_put_contents($img_path, $img); + $img_mimetype = MediaFile::getUploadedMimeType($img_path, $img_filename); + $mediafile = new MediaFile($profile, $img_filename, $img_mimetype); + } catch (Exception $e) { + $this->clientError($e, 400); + } + } + + if(!$mediafile instanceof MediaFile) { + $this->clientError(_('Could not process image data.'), 400); + } + + // maybe resize + $width = $this->cropW; + $height = $this->cropH; + $scale = 1; + if($width > 1200) { + $scale = 1200/$width; + } elseif($height > 600) { + $scale = 600/$height; + } + $width = round($width*$scale); + $height = round($height*$scale); + + // crop + try { + $imagefile = new ImageFile($mediafile->fileRecord->id, File::path($mediafile->filename)); + $imagefile->resizeTo(File::path($mediafile->filename), array('width'=>$width, 'height'=>$height, 'x'=>$this->cropX, 'y'=>$this->cropY, 'w'=>$this->cropW, 'h'=>$this->cropH)); + $result['url'] = File::url($mediafile->filename); + } catch (Exception $e) { + $this->clientError(_('The image could not be resized and cropped. '.$e), 422); + } + + // save in profile_prefs + try { + Profile_prefs::setData($profile, 'qvitter', 'cover_photo', $result['url']); + } catch (ServerException $e) { + $this->clientError(_('The image could not be resized and cropped. '.$e), 422); + } + + // return json $this->initDocument('json'); $this->showJsonObjects($result); $this->endDocument('json'); diff --git a/css/qvitter.css b/css/qvitter.css index 6664bfb..d9db0a5 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -5687,7 +5687,7 @@ body.rtl #feed-header-inner h2 { } .modal-draggable { - width:95%; + width:100%; } diff --git a/js/dom-functions.js b/js/dom-functions.js index 2d2d538..091ccb0 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -657,6 +657,11 @@ function setNewCurrentStream(streamObject,setLocation,fallbackId,actionOnSuccess weAreReloading = true; } + // show hidden items when we reload + if(weAreReloading) { + $('#feed-body').children('.stream-item').removeClass('hidden'); + } + // remember the most recent stream object window.currentStreamObject = streamObject; @@ -2256,8 +2261,10 @@ function buildAttachmentHTML(attachments){ && this.oembed.type != 'photo') { var oembedImage = ''; - // not if stripped from html it's the same as the title (wordpress does this..) - if(typeof this.thumb_url != 'undefined' && this.thumb_url !== null) { + // only local images + if(typeof this.thumb_url != 'undefined' + && this.thumb_url !== null + && isLocalURL(this.thumb_url)) { oembedImage = '
    '; } diff --git a/js/qvitter.js b/js/qvitter.js index d5e73ff..fc85c12 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -165,6 +165,15 @@ $('body').on({ tooltip_data = $(e.target).closest('.queet').find('.thumb-container[href="' + $(e.target).attr('data-tooltip') + '"]').outerHTML(); tooltipClass = 'thumb'; } + // sometimes the attachment link in the queet text does not give us any clue to + // which attachment it is referring to. but if it is the only link and there is + // exactly one attachment, we can safely assume that the link is referring to + // that attachment + else if($(e.target).closest('.queet').find('.thumb-container').length == 1 + && $(e.target).closest('.queet-text').find('a.attachment').length == 1) { + tooltip_data = $(e.target).closest('.queet').find('.thumb-container').outerHTML(); + tooltipClass = 'thumb'; + } } else if($('#feed-body').hasClass('quotes-hidden-by-user') && !$(e.target).is('.quote-link-container') @@ -2461,13 +2470,13 @@ $('body').on('click','.action-reply-container',function(){ var queetHtmlWithoutFooter = $queetHtml.html(); popUpAction('popup-reply-' + this_stream_item_id, window.sL.replyTo + ' ' + this_stream_item.children('.queet').find('.screen-name').html(),replyFormHtml(this_stream_item,this_stream_item_id),queetHtmlWithoutFooter); + $('#popup-reply-' + this_stream_item_id).find('.modal-body').find('.queet-box').trigger('click'); // expand + // fix the width of the queet box, otherwise the syntax highlighting break var queetBox = $('#popup-reply-' + this_stream_item_id).find('.modal-body').find('.inline-reply-queetbox'); var queetBoxWidth = queetBox.width()-20; queetBox.children('.queet-box-syntax, .syntax-middle, .syntax-two').width(queetBoxWidth); - $('#popup-reply-' + this_stream_item_id).find('.modal-body').find('.queet-box').trigger('click'); // expand - maybePrefillQueetBoxWithCachedText(queetBox.children('.queet-box')); }); @@ -3582,17 +3591,29 @@ $('body').on('click','.crop-and-save-button',function(){ // if this is the cover photo if($('#edit-profile-popup .jwc_frame.cover-photo-to-crop').length>0) { - $.ajax({ url: window.apiRoot + 'qvitter/update_cover_photo.json', - type: "POST", - data: { - cropH: window.jwc.result.cropH, - cropW: window.jwc.result.cropW, - cropX: window.jwc.result.cropX, - cropY: window.jwc.result.cropY, - img: $('#cover-photo-to-crop').attr('src') + + var coverImgFormData = new FormData(); + coverImgFormData.append('banner', $('#cover-photo-input')[0].files[0]); + coverImgFormData.append('height', window.jwc.result.cropH); + coverImgFormData.append('width', window.jwc.result.cropW); + coverImgFormData.append('offset_left', window.jwc.result.cropX); + coverImgFormData.append('offset_top', window.jwc.result.cropY); + + $.ajax({ + url: window.apiRoot + 'account/update_profile_banner.json', + type: "POST", + data: coverImgFormData, + processData: false, + contentType: false, + cache: false, + dataType: "json", + error: function(data){ + console.log('error saving profile banner'); console.log(data); + $('.crop-and-save-button').removeAttr('disabled'); + $('.crop-and-save-button').removeClass('disabled'); + cleanUpAfterCropping(); + remove_spinner(); }, - dataType:"json", - error: function(data){ console.log('error'); console.log(data); }, success: function(data) { remove_spinner(); if(typeof data.error == 'undefined') { @@ -3744,8 +3765,6 @@ function coverPhotoAndAvatarSelectAndCrop(e, coverOrAvatar) { if(coverOrAvatar == 'upload-cover-photo') { var targetWidth = 588; var targetHeight = 260; - var maxWidth = 1040; - var minWidth = 1040; var cropId = 'cover-photo-to-crop'; } else if(coverOrAvatar == 'upload-avatar') { From 2d6ad4db65ea588141e187901dd62c86d9018736 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 28 Jan 2016 22:46:32 +0100 Subject: [PATCH 032/120] Albanian translation by Besnik Bleta --- css/qvitter.css | 2 + locale/sq.json | 167 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 169 insertions(+) create mode 100644 locale/sq.json diff --git a/css/qvitter.css b/css/qvitter.css index d9db0a5..f66d48b 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -423,6 +423,8 @@ button.icon.nav-search span { } .quitter-settings.dropdown-menu.dropped { display:block; + width: 375px; + max-width:100%; } .dropdown-caret { float: left; diff --git a/locale/sq.json b/locale/sq.json new file mode 100644 index 0000000..1a69bd6 --- /dev/null +++ b/locale/sq.json @@ -0,0 +1,167 @@ +{ + "directionality":"mdn", + "languageName": "Shqip", + "loginUsername": "Emër përdoruesi ose e-mail", + "loginPassword": "Fjalëkalim", + "loginSignIn": "Hyni", + "loginRememberMe": "Mbamë mend", + "loginForgotPassword": "Harruat fjalëkalimin?", + "notices": "Shënime", + "followers": "Ndjekës", + "following": "E ndiqni", + "groups": "Grupe", + "compose": "Hartoni një shënim të ri…", + "queetVerb": "Dërgoje", + "queetsNounPlural": "Shënime", + "logout": "Dilni", + "languageSelected": "Gjuhë:", + "viewMyProfilePage": "Shihni faqen tuaj të profilit", + "expand": "Zgjeroje", + "collapse": "Tkurre", + "details": "Hollësi", + "expandFullConversation": "Zgjeroje krejt bisedën", + "replyVerb": "Përgjigjiu", + "requeetVerb": "Përsërite", + "favoriteVerb": "Parapëlqejeni", + "requeetedVerb": "I përsëritur", + "favoritedVerb": "U kalua i parapëlqyer", + "replyTo": "Përgjigjiuni", + "requeetedBy": "Përsëritur nga {requeeted-by}", + "favoriteNoun": "I parapëlqyer", + "favoritesNoun": "Të parapëlqyer", + "requeetNoun": "Përsërite", + "requeetsNoun": "Përsëritje", + "newQueet": "{new-notice-count} shënim i ri", + "newQueets": "{new-notice-count} shënime të reja", + "longmonthsJanuary": "Janar", + "longmonthsFebruary": "Shkurt", + "longmonthsMars": "Mars", + "longmonthsApril": "Prill", + "longmonthsMay": "Maj", + "longmonthsJune": "Qershor", + "longmonthsJuly": "Korrik", + "longmonthsAugust": "Gusht", + "longmonthsSeptember": "Shtator", + "longmonthsOctober": "Tetor", + "longmonthsNovember": "Nëntor", + "longmonthsDecember": "Dhjetor", + "shortmonthsJanuary": "jan", + "shortmonthsFebruary": "shk", + "shortmonthsMars": "mar", + "shortmonthsApril": "pri", + "shortmonthsMay": "maj", + "shortmonthsJune": "qer", + "shortmonthsJuly": "kor", + "shortmonthsAugust": "gus", + "shortmonthsSeptember": "sht", + "shortmonthsOctober": "tet", + "shortmonthsNovember": "nën", + "shortmonthsDecember": "dhj", + "time12am": "{time} am", + "time12pm": "{time} pm", + "longDateFormat": "{time12} - {day} {month} {year}", + "shortDateFormatSeconds": "{seconds}s", + "shortDateFormatMinutes": "{minutes}m", + "shortDateFormatHours": "{hours}h", + "shortDateFormatDate": "{day} {month}", + "shortDateFormatDateAndY": "{day} {month} {year}", + "now": "tani", + "posting": "po postohet", + "viewMoreInConvBefore": "← Shihni më tepër në bisedë", + "viewMoreInConvAfter": "Shihni më tepër në bisedë →", + "mentions": "Përmendje", + "timeline": "Rrjedhë kohore", + "publicTimeline": "Rrjedhë kohore Publike", + "publicAndExtTimeline": "Krejt Rrjetin e Njohur", + "searchVerb": "Kërko", + "deleteVerb": "Fshije", + "cancelVerb": "Anuloje", + "deleteConfirmation": "Jeni i sigurt se doni të fshihet ky shënim?", + "userExternalFollow": "Ndjekës i largët", + "userExternalFollowHelp": "ID-ja e llogarisë suaj (p.sh. user@rainbowdash.net).", + "userFollow": "Ndiqe", + "userFollowing": "Po ndiqni", + "userUnfollow": "Mos e ndiq", + "joinGroup": "Merrni pjesë", + "joinExternalGroup": "Merrni pjesë së largëti", + "isMemberOfGroup": "Anëtar", + "leaveGroup": "Braktise", + "memberCount": "Anëtarë", + "adminCount": "Përgjegjës", + "settings": "Rregullime", + "saveChanges": "Ruaji ndryshimet", + "linkColor": "Ngjyrë lidhjesh", + "backgroundColor": "Ngjyrë sfondi", + "newToQuitter": "I ri te {site-title}?", + "signUp": "Regjistrohuni", + "signUpFullName": "Emër i plotë", + "signUpEmail": "Email", + "signUpButtonText": "Regjistrohuni te {site-title}", + "welcomeHeading": "Mirë se vini te {site-title}.", + "welcomeText": "Jemi një
    \"Federatë\" do të thotë që s’keni nevojë për një llogari {site-title} që të mund të ndiqni gjëra, t’ju ndjekin apo që të ndërveproni me përdorues {site-title}. Mund të regjistroheni në cilindo shërbyes StatusNet ose GNU social, ose në çfarëdo shërbimi të bazuar në protokollin Ostatus! Madje as që ju duhet të regjistroheni në një shërbim – provoni të instaloni software-in e hijshëm GNU social në shërbyesin tuaj! :)
    federatë
    mikrobloguesish që kujdesen për etikën dhe solidaritetin dhe duan të braktisin shërbimet e centralizuara kapitaliste.", + "registerNickname": "Nofkë", + "registerHomepage": "Faqe hyrëse", + "registerBio": "Jetëshkrim", + "registerLocation": "Vendndodhje", + "registerRepeatPassword": "Rijepeni fjalëkalimin", + "moreSettings": "Më tepër regullime", + "otherServers": "Përndryshe, mund të krijoni një llogari në një shërbyes tjetër të rrjetit shoqëror GNU. Krahasim", + "editMyProfile": "Përpunoni profilin", + "notifications": "Njoftime", + "xFavedYourQueet": "parapëlqeu Queet-in tuaj", + "xRepeatedYourQueet": "ripostoi queet-in tuaj", + "xStartedFollowingYou": "zuri t’ju ndjekë", + "followsYou": "ju ndjek", + "FAQ": "FAQ", + "inviteAFriend": "Ftoni një shok!", + "goToExternalProfile": "Shkoni te profili i plotë", + "cropAndSave": "Qethe dhe ruaje", + "showTerms": "Lexoni Kushtet tona të Përdorimit", + "ellipsisMore": "Më tepër", + "blockUser": "Bllokoje {username}", + "goToOriginalNotice": "Shkoni te shënimi origjinal", + "goToTheUsersRemoteProfile": "Shkoni te profili i largët i përdoruesit", + "clickToDrag":"Klikojeni që ta tërhiqni", + "keyboardShortcuts":"Shkurtore tastiere", + "classicInterface":"Klasik {site-title}", + "accessibilityToggleLink":"Për përdorshmëri më të mirë, klikoni mbi këtë lidhje që të kaloni te ndërfaqja klasike", + "tooltipBookmarkStream":"Shtojeni këtë rrjedhë te faqerojtësit tuaj", + "tooltipTopMenu":"Menu dhe rregullime", + "tooltipAttachImage":"Bashkëngjitni një figurë", + "tooltipShortenUrls":"Shkurtoji krejt URL-të në Queet", + "tooltipReloadStream":"Rifreskoje këtë rrjedhë", + "tooltipRemoveBookmark":"Hiqe këtë faqerojtës", + "clearHistory":"Pastro historik shfletimesh", + "ERRORsomethingWentWrong":"Diçka shkoi ters.", + "ERRORmustBeLoggedIn":"Duhet të jeni i futur, që të shihni këtë rrjedhë.", + "ERRORcouldNotFindUserWithNickname":"S’u gjet dot përdorues me nofkën \"{nickname}\" te ky shërbyes", + "ERRORcouldNotFindGroupWithNickname":"S’u gjet dot një grup me nofkën \"{nickname}\" në këtë shërbyes", + "ERRORcouldNotFindPage":"S’u gjet dot ajo faqe.", + "ERRORnoticeRemoved": "Ky shënim është hequr.", + "ERRORnoContactWithServer": "S’vendoset dot një lidhje me shërbyesin. Shërbyesi mund të jetë i mbingarkuar, ose mund të ketë ndonjë problem me lidhjen tuaj internet. Ju lutemi, provoni më vonë!", + "ERRORattachmentUploadFailed": "Ngarkimi dështoi. Mundet që formati të jetë i pambuluar ose madhësia shumë e madhe.", + "hideRepliesToPeopleIDoNotFollow":"Fshih përgjigjet për persona që s’i ndjek", + "markAllNotificationsAsSeen":"Shënoji tërë njoftimet si të para", + "notifyRepliesAndMentions":"Përmendje dhe përgjigje", + "notifyFavs":"Të parapëlqyer", + "notifyRepeats":"Ri-queet-ime", + "notifyFollows":"Ndjekës të rinj", + "timelineOptions":"Mundësi rrjedhe kohore", + "ERRORfailedSavingYourSetting":"Dështoi ruajtja e rregullimeve tuaja", + "ERRORfailedMarkingAllNotificationsAsRead":"Dështoi vënia shenjë tërë shënimeve si të parë.", + "newNotification": "{new-notice-count} njoftim i ri", + "newNotifications": "{new-notice-count} njoftime të reja", + "thisIsANoticeFromABlockedUser":"Kujdes: Ky është një shënim nga një përdorues që e keni bllokuar. Klikoni që të shfaqet.", + "nicknamesListWithListName":"Listë e {nickname}: {list-name}", + "myListWithListName":"Lista ime: {list-name}", + "listMembers":"Anëtarë", + "listSubscribers":"Pajtimtarë", + "ERRORcouldNotFindList":"S’ka listë të tillë.", + "emailAlreadyInUse":"Tashmë në përdorim", + "addEditLanguageLink":"Ndihmoni në përkthimin e {site-title} në një gjuhë tjetër", + "onlyPartlyTranslated":"{site-title} është i përkthyer vetëm pjesërisht në {language-name} ({percent}%). Mund të ndihmoni për plotësimin e përkthimit te faqja e depos së Qvitter-it", + "startRant":"Filloni një dërdëllitje", + "continueRant":"Vazhdojeni dërdëllitjen", + "hideEmbeddedInTimeline":"Fshih lëndë të trupëzuar në këtë rrjedhë kohore", + "hideQuotesInTimeline":"Fshih citime në këtë rrjedhë kohore" +} From 7d4ed44ff9b5a1c77bbf1b79d9b1a7aa7c06f137 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 28 Jan 2016 23:15:32 +0100 Subject: [PATCH 033/120] return empty array instead of 404 for twitter v1.1 APIs that twidere use. maybe makes twidere work better? --- QvitterPlugin.php | 6 +++ actions/apiactivityaboutmeunread.php | 79 ++++++++++++++++++++++++++++ actions/apisavedsearcheslist.php | 79 ++++++++++++++++++++++++++++ actions/apitrendsplace.php | 79 ++++++++++++++++++++++++++++ 4 files changed, 243 insertions(+) create mode 100644 actions/apiactivityaboutmeunread.php create mode 100644 actions/apisavedsearcheslist.php create mode 100644 actions/apitrendsplace.php diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 89b930e..1b768d4 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -197,6 +197,12 @@ class QvitterPlugin extends Plugin { 'id' => Nickname::INPUT_FMT)); $m->connect('api/account/update_profile_banner.json', array('action' => 'ApiAccountUpdateProfileBanner')); + $m->connect('api/saved_searches/list.json', + array('action' => 'ApiSavedSearchesList')); + $m->connect('api/trends/place.json', + array('action' => 'ApiTrendsPlace')); + $m->connect('api/activity/about_me/unread.json', + array('action' => 'ApiActivityAboutMeUnread')); $m->connect('api/qvitter/update_background_image.json', array('action' => 'ApiUpdateBackgroundImage')); $m->connect('api/qvitter/update_avatar.json', diff --git a/actions/apiactivityaboutmeunread.php b/actions/apiactivityaboutmeunread.php new file mode 100644 index 0000000..a0ec65f --- /dev/null +++ b/actions/apiactivityaboutmeunread.php @@ -0,0 +1,79 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + + +if (!defined('GNUSOCIAL')) { exit(1); } + +class ApiActivityAboutMeUnreadAction extends ApiAuthAction +{ + + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + return true; + } + + /** + * Handle the request + * + * @param array $args $_REQUEST data (unused) + * + * @return void + */ + protected function handle() + { + parent::handle(); + + $json_obects = array(); + + $this->initDocument('json'); + $this->showJsonObjects($json_obects); + $this->endDocument('json'); + } +} diff --git a/actions/apisavedsearcheslist.php b/actions/apisavedsearcheslist.php new file mode 100644 index 0000000..ecd9e5d --- /dev/null +++ b/actions/apisavedsearcheslist.php @@ -0,0 +1,79 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + + +if (!defined('GNUSOCIAL')) { exit(1); } + +class ApiSavedSearchesListAction extends ApiAuthAction +{ + + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + return true; + } + + /** + * Handle the request + * + * @param array $args $_REQUEST data (unused) + * + * @return void + */ + protected function handle() + { + parent::handle(); + + $json_obects = array(); + + $this->initDocument('json'); + $this->showJsonObjects($json_obects); + $this->endDocument('json'); + } +} diff --git a/actions/apitrendsplace.php b/actions/apitrendsplace.php new file mode 100644 index 0000000..115e32f --- /dev/null +++ b/actions/apitrendsplace.php @@ -0,0 +1,79 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + + +if (!defined('GNUSOCIAL')) { exit(1); } + +class ApiTrendsPlaceAction extends ApiAuthAction +{ + + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + return true; + } + + /** + * Handle the request + * + * @param array $args $_REQUEST data (unused) + * + * @return void + */ + protected function handle() + { + parent::handle(); + + $json_obects = array(); + + $this->initDocument('json'); + $this->showJsonObjects($json_obects); + $this->endDocument('json'); + } +} From 06cdb7f1c147295bf12ce891a23111e590dafd44 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 29 Jan 2016 12:33:15 +0100 Subject: [PATCH 034/120] albanian updated --- locale/sq.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/sq.json b/locale/sq.json index 1a69bd6..d9b06c6 100644 --- a/locale/sq.json +++ b/locale/sq.json @@ -8,7 +8,7 @@ "loginForgotPassword": "Harruat fjalëkalimin?", "notices": "Shënime", "followers": "Ndjekës", - "following": "E ndiqni", + "following": "Të ndjekur", "groups": "Grupe", "compose": "Hartoni një shënim të ri…", "queetVerb": "Dërgoje", @@ -73,7 +73,7 @@ "timeline": "Rrjedhë kohore", "publicTimeline": "Rrjedhë kohore Publike", "publicAndExtTimeline": "Krejt Rrjetin e Njohur", - "searchVerb": "Kërko", + "searchVerb": "Kërkoni", "deleteVerb": "Fshije", "cancelVerb": "Anuloje", "deleteConfirmation": "Jeni i sigurt se doni të fshihet ky shënim?", @@ -158,7 +158,7 @@ "listSubscribers":"Pajtimtarë", "ERRORcouldNotFindList":"S’ka listë të tillë.", "emailAlreadyInUse":"Tashmë në përdorim", - "addEditLanguageLink":"Ndihmoni në përkthimin e {site-title} në një gjuhë tjetër", + "addEditLanguageLink":"Ndihmoni në përkthimin e {site-title}-it në një gjuhë tjetër", "onlyPartlyTranslated":"{site-title} është i përkthyer vetëm pjesërisht në {language-name} ({percent}%). Mund të ndihmoni për plotësimin e përkthimit te faqja e depos së Qvitter-it", "startRant":"Filloni një dërdëllitje", "continueRant":"Vazhdojeni dërdëllitjen", From ef25c8484c528bcd4250555f9accf36103c17efe Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 29 Jan 2016 16:47:59 +0100 Subject: [PATCH 035/120] mentions etc can start and end with parenthesis --- js/misc-functions.js | 14 +++++++------- js/qvitter.js | 8 +++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/js/misc-functions.js b/js/misc-functions.js index f859576..13a0f9f 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -439,12 +439,12 @@ function cacheSyntaxHighlighting() { window.syntaxHighlightingRegexps = Object(); var allDomains = '(abb|abbott|abogado|ac|academy|accenture|accountant|accountants|active|actor|ad|ads|adult|ae|aero|af|afl|ag|agency|ai|aig|airforce|al|allfinanz|alsace|am|amsterdam|an|android|ao|apartments|aq|aquarelle|ar|archi|army|arpa|as|asia|associates|at|attorney|au|auction|audio|auto|autos|aw|ax|axa|az|ba|band|bank|bar|barclaycard|barclays|bargains|bauhaus|bayern|bb|bbc|bbva|bd|be|beer|berlin|best|bf|bg|bh|bi|bible|bid|bike|bingo|bio|biz|bj|bl|black|blackfriday|bloomberg|blue|bm|bmw|bn|bnpparibas|bo|boats|bond|boo|boutique|bq|br|bridgestone|broker|brother|brussels|bs|bt|budapest|build|builders|business|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|camera|camp|cancerresearch|canon|capetown|capital|caravan|cards|care|career|careers|cars|cartier|casa|cash|casino|cat|catering|cbn|cc|cd|center|ceo|cern|cf|cfa|cfd|cg|ch|channel|chat|cheap|chloe|christmas|chrome|church|ci|cisco|citic|city|ck|cl|claims|cleaning|click|clinic|clothing|club|cm|cn|co|coach|codes|coffee|college|cologne|com|community|company|computer|condos|construction|consulting|contractors|cooking|cool|coop|corsica|country|coupons|courses|cr|credit|creditcard|cricket|crs|cruises|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|date|dating|datsun|day|dclk|de|deals|degree|delivery|democrat|dental|dentist|desi|design|dev|diamonds|diet|digital|direct|directory|discount|dj|dk|dm|dnp|do|docs|dog|doha|domains|doosan|download|durban|dvag|dz|earth|eat|ec|edu|education|ee|eg|eh|email|emerck|energy|engineer|engineering|enterprises|epson|equipment|er|erni|es|esq|estate|et|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|fail|faith|fan|fans|farm|fashion|feedback|fi|film|finance|financial|firmdale|fish|fishing|fit|fitness|fj|fk|flights|florist|flowers|flsmidth|fly|fm|fo|foo|football|forex|forsale|foundation|fr|frl|frogans|fund|furniture|futbol|fyi|ga|gal|gallery|garden|gb|gbiz|gd|gdn|ge|gent|gf|gg|ggee|gh|gi|gift|gifts|gives|gl|glass|gle|global|globo|gm|gmail|gmo|gmx|gn|gold|goldpoint|golf|goo|goog|google|gop|gov|gp|gq|gr|graphics|gratis|green|gripe|gs|gt|gu|guge|guide|guitars|guru|gw|gy|hamburg|hangout|haus|healthcare|help|here|hermes|hiphop|hitachi|hiv|hk|hm|hn|hockey|holdings|holiday|homedepot|homes|honda|horse|host|hosting|house|how|hr|ht|hu|ibm|icbc|icu|id|ie|ifm|il|im|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insure|int|international|investments|io|iq|ir|irish|is|it|iwc|java|jcb|je|jetzt|jewelry|jll|jm|jo|jobs|joburg|jp|juegos|kaufen|kddi|ke|kg|kh|ki|kim|kitchen|kiwi|km|kn|koeln|komatsu|kp|kr|krd|kred|kw|ky|kyoto|kz|la|lacaixa|land|lat|latrobe|lawyer|lb|lc|lds|lease|leclerc|legal|lgbt|li|liaison|lidl|life|lighting|limited|limo|link|lk|loan|loans|lol|london|lotte|lotto|love|lr|ls|lt|ltda|lu|lupin|luxe|luxury|lv|ly|ma|madrid|maif|maison|management|mango|market|marketing|markets|marriott|mba|mc|md|me|media|meet|melbourne|meme|memorial|men|menu|mf|mg|mh|miami|mil|mini|mk|ml|mm|mma|mn|mo|mobi|moda|moe|monash|money|montblanc|mormon|mortgage|moscow|motorcycles|mov|movie|mp|mq|mr|ms|mt|mtn|mtpc|mu|museum|mv|mw|mx|my|mz|na|nadex|nagoya|name|navy|nc|ne|nec|net|network|neustar|new|news|nexus|nf|ng|ngo|nhk|ni|nico|ninja|nissan|nl|no|np|nr|nra|nrw|ntt|nu|nyc|nz|okinawa|om|one|ong|onl|online|ooo|org|organic|osaka|otsuka|ovh|pa|page|panerai|paris|partners|parts|party|pe|pf|pg|ph|pharmacy|philips|photo|photography|photos|physio|piaget|pics|pictet|pictures|pink|pizza|pk|pl|place|plumbing|plus|pm|pn|pohl|poker|porn|post|pr|praxi|press|pro|prod|productions|prof|properties|property|ps|pt|pub|pw|py|qa|qpon|quebec|racing|re|realtor|recipes|red|redstone|rehab|reise|reisen|reit|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rich|rio|rip|ro|rocks|rodeo|rs|rsvp|ru|ruhr|run|rw|ryukyu|sa|saarland|sale|samsung|sandvik|sandvikcoromant|sap|sarl|saxo|sb|sc|sca|scb|schmidt|scholarships|school|schule|schwarz|science|scot|sd|se|seat|sener|services|sew|sex|sexy|sg|sh|shiksha|shoes|show|shriram|si|singles|site|sj|sk|ski|sky|sl|sm|sn|sncf|so|soccer|social|software|sohu|solar|solutions|sony|soy|space|spiegel|spreadbetting|sr|ss|st|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swiss|sx|sy|sydney|systems|sz|taipei|tatar|tattoo|tax|taxi|tc|td|team|tech|technology|tel|temasek|tennis|tf|tg|th|thd|theater|tickets|tienda|tips|tires|tirol|tj|tk|tl|tm|tn|to|today|tokyo|tools|top|toray|toshiba|tours|town|toys|tp|tr|trade|trading|training|travel|trust|tt|tui|tv|tw|tz|ua|ug|uk|um|university|uno|uol|us|uy|uz|va|vacations|vc|ve|vegas|ventures|versicherung|vet|vg|vi|viajes|video|villas|vision|vlaanderen|vn|vodka|vote|voting|voto|voyage|vu|wales|walter|wang|watch|webcam|website|wed|wedding|weir|wf|whoswho|wien|wiki|williamhill|win|wme|work|works|world|ws|wtc|wtf|xbox|xerox|xin|测试|परीक्षा|佛山|慈善|集团|在线|한국|ভারত|八卦|موقع|বাংলা|公益|公司|移动|我爱你|москва|испытание|қаз|онлайн|сайт|срб|бел|时尚|테스트|淡马锡|орг|삼성|சிங்கப்பூர்|商标|商店|商城|дети|мкд|טעסט|工行|中文网|中信|中国|中國|娱乐|谷歌|భారత్|ලංකා|測試|ભારત|भारत|آزمایشی|பரிட்சை|网店|संगठन|餐厅|网络|укр|香港|δοκιμή|飞利浦|إختبار|台湾|台灣|手机|мон|الجزائر|عمان|ایران|امارات|بازار|پاکستان|الاردن|بھارت|المغرب|السعودية|سودان|عراق|مليسيا|澳門|政府|شبكة|გე|机构|组织机构|健康|ไทย|سورية|рус|рф|تونس|みんな|グーグル|ελ|世界|ਭਾਰਤ|网址|游戏|vermögensberater|vermögensberatung|企业|信息|مصر|قطر|广东|இலங்கை|இந்தியா|հայ|新加坡|فلسطين|テスト|政务|xxx|xyz|yachts|yandex|ye|yodobashi|yoga|yokohama|youtube|yt|za|zip|zm|zone|zuerich|zw|oracle|xn--1qqw23a|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--55qw42g|xn--55qx5d|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80asehdb|xn--80aswg|xn--90a3ac|xn--90ais|xn--9et52u|xn--b4w605ferd|xn--c1avg|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--estv75g|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--gecrj9c|xn--h2brj9c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1amh|xn--j6w193g|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a4f16a|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgberp4a5d4ar|xn--mgbpl2fh|xn--mgbx4cd0ab|xn--mxtq1m|xn--ngbc5azd|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pgbs0dh|xn--q9jyb4c|xn--qcka1pmc|xn--rhqv96g|xn--s9brj9c|xn--ses554g|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b)'; - window.syntaxHighlightingRegexps.externalMention = XRegExp.cache('(^|\\s|\\.|
    | )(@)[a-zA-Z0-9]+(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&)'); - window.syntaxHighlightingRegexps.mention = /(^|\s|\.|
    | )(@)[a-zA-Z0-9]+($|\s|\.|\,|\:|\-|\<|\!|\?|\&)/; - window.syntaxHighlightingRegexps.tag = XRegExp.cache('(^|\\s|\\.|
    | )(\\#)[\\p{L}\\p{N}\\-\\.]+($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&)'); - window.syntaxHighlightingRegexps.url = XRegExp.cache('(^|\\s|\\.|
    | )(http\\:\\/\\/|https\:\\/\\/)([\\p{L}\\p{N}\\-\\.]+)?(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\,|\\:|\\-|\\<|\\!|\\?|\\&)'); - window.syntaxHighlightingRegexps.urlWithoutProtocol = XRegExp.cache('(^|\\s|\\.|
    | )[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&)'); - window.syntaxHighlightingRegexps.email = XRegExp.cache('(^|\\s|\\.|
    | )([a-zA-Z0-9\\!\\#\\$\\%\\&\\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\.]+)?(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&)'); + window.syntaxHighlightingRegexps.externalMention = XRegExp.cache('(^|\\s|\\.|
    | |\\()(@)[a-zA-Z0-9]+(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); + window.syntaxHighlightingRegexps.mention = /(^|\s|\.|
    | |\()(@)[a-zA-Z0-9]+($|\s|\.|\,|\:|\-|\<|\!|\?|\&|\))/; + window.syntaxHighlightingRegexps.tag = XRegExp.cache('(^|\\s|\\.|
    | |\\()(\\#)[\\p{L}\\p{N}\\-\\.]+($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); + window.syntaxHighlightingRegexps.url = XRegExp.cache('(^|\\s|\\.|
    | |\\()(http\\:\\/\\/|https\:\\/\\/)([\\p{L}\\p{N}\\-\\.]+)?(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); + window.syntaxHighlightingRegexps.urlWithoutProtocol = XRegExp.cache('(^|\\s|\\.|
    | |\\()[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); + window.syntaxHighlightingRegexps.email = XRegExp.cache('(^|\\s|\\.|
    | |\\()([a-zA-Z0-9\\!\\#\\$\\%\\&\\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\.]+)?(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); cacheSyntaxHighlightingGroups(); } @@ -457,7 +457,7 @@ function cacheSyntaxHighlighting() { function cacheSyntaxHighlightingGroups() { if(window.groupNicknamesAndLocalAliases.length > 0) { var allGroupNicknamesAndLocalAliases = '(' + window.groupNicknamesAndLocalAliases.join('|') + ')'; - window.syntaxHighlightingRegexps.group = XRegExp.cache('(^|\\s|\\.|
    | )(\\!)' + allGroupNicknamesAndLocalAliases + '($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&)'); + window.syntaxHighlightingRegexps.group = XRegExp.cache('(^|\\s|\\.|
    | |\\()(\\!)' + allGroupNicknamesAndLocalAliases + '($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); } } diff --git a/js/qvitter.js b/js/qvitter.js index fc85c12..6368a33 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -2921,12 +2921,14 @@ $('body').on('keyup paste input', 'div.queet-box-syntax', function() { || currentMatch[0].slice(-1) == '-' || currentMatch[0].slice(-1) == ':' || currentMatch[0].slice(-1) == '.' - || currentMatch[0].slice(-1) == ',') { + || currentMatch[0].slice(-1) == ',' + || currentMatch[0].slice(-1) == ')') { currentMatch[0] = currentMatch[0].slice(0,-1); } - // remove any starting spaces from match - if(currentMatch[0].substring(0,1) == ' ') { + // don't include these start strings + if(currentMatch[0].substring(0,1) == ' ' + || currentMatch[0].substring(0,1) == '(') { currentMatch[0] = currentMatch[0].substring(1); } else if(currentMatch[0].substring(0,6) == ' ') { From 9714829ec9e85fb2984750620b568cded6a6ac7b Mon Sep 17 00:00:00 2001 From: Knut Erik Hollund Date: Sat, 30 Jan 2016 12:21:29 +0100 Subject: [PATCH 036/120] Updated norwegian translation --- locale/no.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locale/no.json b/locale/no.json index e00fa34..a9066a3 100644 --- a/locale/no.json +++ b/locale/no.json @@ -157,11 +157,11 @@ "listMembers":"Medlemmer", "listSubscribers":"Abonnenter", "ERRORcouldNotFindList":"Det eksisterer ingen slik liste.", - "emailAlreadyInUse":"Already in use", - "addEditLanguageLink":"Help translate {site-title} to another language", - "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", - "startRant":"Start a rant", - "continueRant":"Continue the rant", - "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "emailAlreadyInUse":"Allerede i bruk", + "addEditLanguageLink":"Hjelp oss å oversette {site-title} til andre språk", + "onlyPartlyTranslated":"{site-title} er kun delvis oversatt til {language-name} ({percent}%). Du kan hjelpe å oversette i følgende lenke Qvitter's repository hjemmeside", + "startRant":"Start en utblåsning", + "continueRant":"Fortsett utblåsningen", + "hideEmbeddedInTimeline":"Skjul inkluderende innhold i denne tidslinjen", + "hideQuotesInTimeline":"Skjul sitater i denne tidslinjen" } From 7285e3a8b4d3d378a2f8a4e5df89c1f484eaa119 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 1 Feb 2016 18:22:35 +0100 Subject: [PATCH 037/120] set api format so client errors work --- actions/apiaccountupdateprofilebanner.php | 2 ++ actions/apiexternalusershow.php | 2 ++ actions/apifavsandrepeats.php | 5 +++-- actions/apiqvitterallfollowing.php | 2 ++ actions/apiqvitterblocks.php | 11 ++++++++--- actions/apiqvittercheckemail.php | 2 ++ actions/apiqvitterchecklogin.php | 15 ++++++--------- actions/apiqvitterlistmembers.php | 2 ++ actions/apiqvitterlistsubscribers.php | 2 ++ actions/apiqvitternotifications.php | 2 ++ actions/apiqvitterstatusesupdate.php | 4 ++-- actions/apiqvittertimelinelist.php | 2 ++ actions/apiqvitterupdatebackgroundcolor.php | 2 ++ actions/apiqvitterupdatebookmarks.php | 2 ++ actions/apiqvitterupdatelinkcolor.php | 2 ++ actions/apisavedsearcheslist.php | 2 ++ actions/apitrendsplace.php | 2 ++ actions/apiupdateavatar.php | 2 ++ actions/apiupdatebackgroundimage.php | 2 ++ 19 files changed, 49 insertions(+), 16 deletions(-) diff --git a/actions/apiaccountupdateprofilebanner.php b/actions/apiaccountupdateprofilebanner.php index 4f07dcb..32156bd 100644 --- a/actions/apiaccountupdateprofilebanner.php +++ b/actions/apiaccountupdateprofilebanner.php @@ -57,6 +57,8 @@ class ApiAccountUpdateProfileBannerAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->user = $this->auth_user; $this->cropW = $this->trimmed('width'); diff --git a/actions/apiexternalusershow.php b/actions/apiexternalusershow.php index 9eed117..dd6d13e 100644 --- a/actions/apiexternalusershow.php +++ b/actions/apiexternalusershow.php @@ -46,6 +46,8 @@ class ApiExternalUserShowAction extends ApiPrivateAuthAction { parent::prepare($args); + $this->format = 'json'; + $profileurl = urldecode($this->arg('profileurl')); $nickname = urldecode($this->arg('nickname')); diff --git a/actions/apifavsandrepeats.php b/actions/apifavsandrepeats.php index 469cc26..fd3db94 100644 --- a/actions/apifavsandrepeats.php +++ b/actions/apifavsandrepeats.php @@ -46,14 +46,15 @@ class ApiFavsAndRepeatsAction extends ApiPrivateAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->notice_id = $this->trimmed('notice_id'); $this->original = Notice::getKV('id', $this->notice_id); if (empty($this->original)) { // TRANS: Client error displayed trying to display redents of a non-exiting notice. - $this->clientError(_('No such notice.'), - 400, $this->format); + $this->clientError(_('No such notice.'), 400); return false; } diff --git a/actions/apiqvitterallfollowing.php b/actions/apiqvitterallfollowing.php index 9cfd187..a28c4c8 100644 --- a/actions/apiqvitterallfollowing.php +++ b/actions/apiqvitterallfollowing.php @@ -62,6 +62,8 @@ class ApiQvitterAllFollowingAction extends ApiBareAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->count = 5000; // max 5000, completely arbitrary... $this->target = $this->getTargetProfile($this->arg('id')); diff --git a/actions/apiqvitterblocks.php b/actions/apiqvitterblocks.php index a4973ba..ebeed52 100644 --- a/actions/apiqvitterblocks.php +++ b/actions/apiqvitterblocks.php @@ -43,7 +43,7 @@ if (!defined('STATUSNET')) { } -class ApiQvitterBlocksAction extends ApiBareAuthAction +class ApiQvitterBlocksAction extends ApiPrivateAuthAction { var $profiles = null; @@ -58,15 +58,20 @@ class ApiQvitterBlocksAction extends ApiBareAuthAction { parent::prepare($args); - // If called as a social graph method, show 5000 per page, otherwise 100 + $this->format = 'json'; $this->count = (int)$this->arg('count', 100); - $this->target = $this->getTargetProfile($this->arg('id')); + $arg_user = $this->getTargetUser($this->arg('id')); + + $this->target = ($this->auth_user) ? $this->auth_user->getProfile() : null; if (!($this->target instanceof Profile)) { // TRANS: Client error displayed when requesting a list of followers for a non-existing user. $this->clientError(_('No such user.'), 404); + } else if($this->auth_user->id != $arg_user->id) { + $this->clientError(_('You are only allowed to view your own blocks.'), 403); + } $this->profiles = $this->getProfiles(); diff --git a/actions/apiqvittercheckemail.php b/actions/apiqvittercheckemail.php index aa53ac7..8d1f3be 100644 --- a/actions/apiqvittercheckemail.php +++ b/actions/apiqvittercheckemail.php @@ -39,6 +39,8 @@ class ApiQvitterCheckEmailAction extends ApiAction { parent::prepare($args); + $this->format = 'json'; + $this->email = $this->trimmed('email'); if(!Validate::email($this->email, common_config('email', 'check_domain'))) { diff --git a/actions/apiqvitterchecklogin.php b/actions/apiqvitterchecklogin.php index 9c4d461..db24770 100644 --- a/actions/apiqvitterchecklogin.php +++ b/actions/apiqvitterchecklogin.php @@ -61,19 +61,16 @@ class ApiQvitterCheckLoginAction extends ApiAction { parent::handle(); + $this->format = 'json'; + if ($_SERVER['REQUEST_METHOD'] != 'POST') { - $this->clientError( - // TRANS: Client error. POST is a HTTP command. It should not be translated. - _('This method requires a POST.'), - 400, - $this->format - ); + $this->clientError(_('This method requires a POST.'), 400); return; } - + $user = common_check_user($this->arg('username'), - $this->arg('password')); - + $this->arg('password')); + if($user) { $user = true; } diff --git a/actions/apiqvitterlistmembers.php b/actions/apiqvitterlistmembers.php index 690d465..4f65f26 100644 --- a/actions/apiqvitterlistmembers.php +++ b/actions/apiqvitterlistmembers.php @@ -65,6 +65,8 @@ class ApiQvitterListMembersAction extends ApiPrivateAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->list = $this->getTargetList($this->arg('nickname'), $this->arg('id')); if (!$this->list instanceof Profile_list) { // TRANS: Client error displayed trying to show list membership on a non-existing list. diff --git a/actions/apiqvitterlistsubscribers.php b/actions/apiqvitterlistsubscribers.php index 38bf5ab..238144c 100644 --- a/actions/apiqvitterlistsubscribers.php +++ b/actions/apiqvitterlistsubscribers.php @@ -65,6 +65,8 @@ class ApiQvitterListSubscribersAction extends ApiPrivateAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->list = $this->getTargetList($this->arg('nickname'), $this->arg('id')); if (!$this->list instanceof Profile_list) { // TRANS: Client error displayed trying to show list membership on a non-existing list. diff --git a/actions/apiqvitternotifications.php b/actions/apiqvitternotifications.php index 77c661c..c992fb2 100644 --- a/actions/apiqvitternotifications.php +++ b/actions/apiqvitternotifications.php @@ -55,6 +55,8 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->notifications = $this->getNotifications(); return true; diff --git a/actions/apiqvitterstatusesupdate.php b/actions/apiqvitterstatusesupdate.php index 55fb68d..5154af9 100644 --- a/actions/apiqvitterstatusesupdate.php +++ b/actions/apiqvitterstatusesupdate.php @@ -199,12 +199,12 @@ class ApiQvitterStatusesUpdateAction extends ApiAuthAction 'The server was unable to handle that much POST data (%s bytes) due to its current configuration.', intval($_SERVER['CONTENT_LENGTH'])); - $this->clientError(sprintf($msg, $_SERVER['CONTENT_LENGTH'])); + $this->clientError(sprintf($msg, $_SERVER['CONTENT_LENGTH']), 400); } if (empty($this->status)) { // TRANS: Client error displayed when the parameter "status" is missing. - $this->clientError(_('Client must provide a \'status\' parameter with a value.')); + $this->clientError(_('Client must provide a \'status\' parameter with a value.'), 400); } if (is_null($this->scoped)) { diff --git a/actions/apiqvittertimelinelist.php b/actions/apiqvittertimelinelist.php index 072300d..809af53 100644 --- a/actions/apiqvittertimelinelist.php +++ b/actions/apiqvittertimelinelist.php @@ -58,6 +58,8 @@ class ApiQvitterTimelineListAction extends ApiBareAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->list = $this->getTargetList($this->arg('nickname'), $this->arg('id')); if (!($this->list instanceof Profile_list)) { // TRANS: Client error displayed when requesting a non existing list diff --git a/actions/apiqvitterupdatebackgroundcolor.php b/actions/apiqvitterupdatebackgroundcolor.php index 34cc500..d74303c 100644 --- a/actions/apiqvitterupdatebackgroundcolor.php +++ b/actions/apiqvitterupdatebackgroundcolor.php @@ -53,6 +53,8 @@ class ApiQvitterUpdateBackgroundColorAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->backgroundcolor = $this->trimmed('backgroundcolor'); return true; } diff --git a/actions/apiqvitterupdatebookmarks.php b/actions/apiqvitterupdatebookmarks.php index 077cfbb..f847c7b 100644 --- a/actions/apiqvitterupdatebookmarks.php +++ b/actions/apiqvitterupdatebookmarks.php @@ -58,6 +58,8 @@ class ApiQvitterUpdateBookmarksAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->bookmarks = $this->trimmed('bookmarks'); return true; diff --git a/actions/apiqvitterupdatelinkcolor.php b/actions/apiqvitterupdatelinkcolor.php index a616c62..6b66f16 100644 --- a/actions/apiqvitterupdatelinkcolor.php +++ b/actions/apiqvitterupdatelinkcolor.php @@ -54,6 +54,8 @@ class ApiQvitterUpdateLinkColorAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->linkcolor = $this->trimmed('linkcolor'); return true; diff --git a/actions/apisavedsearcheslist.php b/actions/apisavedsearcheslist.php index ecd9e5d..a4865db 100644 --- a/actions/apisavedsearcheslist.php +++ b/actions/apisavedsearcheslist.php @@ -56,6 +56,8 @@ class ApiSavedSearchesListAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + return true; } diff --git a/actions/apitrendsplace.php b/actions/apitrendsplace.php index 115e32f..e846896 100644 --- a/actions/apitrendsplace.php +++ b/actions/apitrendsplace.php @@ -56,6 +56,8 @@ class ApiTrendsPlaceAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + return true; } diff --git a/actions/apiupdateavatar.php b/actions/apiupdateavatar.php index fa33985..086b07f 100644 --- a/actions/apiupdateavatar.php +++ b/actions/apiupdateavatar.php @@ -57,6 +57,8 @@ class ApiUpdateAvatarAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->user = $this->auth_user; $this->cropW = $this->trimmed('cropW'); diff --git a/actions/apiupdatebackgroundimage.php b/actions/apiupdatebackgroundimage.php index 69052d8..8be9f3a 100644 --- a/actions/apiupdatebackgroundimage.php +++ b/actions/apiupdatebackgroundimage.php @@ -57,6 +57,8 @@ class ApiUpdateBackgroundImageAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->user = $this->auth_user; $this->cropW = $this->trimmed('cropW'); From 949162b25851d3caf1898acc261097373aee7aa9 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 2 Feb 2016 00:44:44 +0100 Subject: [PATCH 038/120] blocking --- QvitterPlugin.php | 3 + README.md | 3 +- css/qvitter.css | 40 +++++------ js/ajax-functions.js | 38 ++++++++++ js/dom-functions.js | 103 ++++++++++++++++---------- js/misc-functions.js | 137 +++++++++++++++++++++++++++++++++++ js/qvitter.js | 160 +++++++++++++++++++++++------------------ js/stream-router.js | 13 ++++ locale/ar.json | 8 ++- locale/ast.json | 8 ++- locale/ca.json | 8 ++- locale/de.json | 8 ++- locale/en.json | 8 ++- locale/eo.json | 8 ++- locale/es.json | 8 ++- locale/es_ahorita.json | 8 ++- locale/eu.json | 8 ++- locale/fa.json | 8 ++- locale/fi.json | 8 ++- locale/fr.json | 8 ++- locale/gl.json | 8 ++- locale/he.json | 8 ++- locale/io.json | 8 ++- locale/it.json | 8 ++- locale/ja.json | 8 ++- locale/nl.json | 8 ++- locale/no.json | 8 ++- locale/pt.json | 8 ++- locale/pt_br.json | 8 ++- locale/ru.json | 8 ++- locale/sq.json | 8 ++- locale/sv.json | 8 ++- locale/zh_cn.json | 10 ++- locale/zh_tw.json | 8 ++- 34 files changed, 547 insertions(+), 160 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 1b768d4..114172c 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -218,6 +218,9 @@ class QvitterPlugin extends Plugin { $m->connect(':nickname/notifications', array('action' => 'qvitter', 'nickname' => Nickname::INPUT_FMT)); + $m->connect(':nickname/blocks', + array('action' => 'qvitter', + 'nickname' => Nickname::INPUT_FMT)); $m->connect('settings/qvitter', array('action' => 'qvittersettings')); $m->connect('panel/qvitter', diff --git a/README.md b/README.md index 3c5d1ca..b863b71 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Qvitter ========================================== * Author: Hannes Mannerheim () -* Last mod.: Oct, 2015 +* Last mod.: Jan, 2016 * Version: 5-alpha * Homepage: @@ -87,7 +87,6 @@ Qvitter extends this API in a few undocumented ways. See onRouterInitialized() i for ideas about paths for the API extensions. - Notes ----- diff --git a/css/qvitter.css b/css/qvitter.css index f66d48b..9dc7b1b 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -4310,40 +4310,34 @@ button.shorten:not(.disabled):active { .edit-profile-button .edit-profile-text, .save-profile-button .edit-profile-text, .abort-edit-profile-button .edit-profile-text, -.crop-and-save-button .edit-profile-text { +.crop-and-save-button .edit-profile-text, +.member-button.member .ismember-text, +.external-follow-button.following .following-text, +.qvitter-follow-button.following .following-text, +.member-button.member:hover .leave-text, +.external-follow-button.following:hover .unfollow-text, +.qvitter-follow-button.following:hover .unfollow-text, +.qvitter-follow-button.blocking .blocking-text, +.qvitter-follow-button.blocking:hover .unblock-text { display:block; height: 28px; line-height: 28px; } .member-button.member .join-text, .external-follow-button.following .follow-text, -.qvitter-follow-button.following .follow-text { - display:none; - height: 28px; - line-height: 28px; - } -.member-button.member .ismember-text, -.external-follow-button.following .following-text, -.qvitter-follow-button.following .following-text { - display:block; - height: 28px; - line-height: 28px; - } +.qvitter-follow-button.following .follow-text, .member-button.member:hover .ismember-text, .external-follow-button.following:hover .following-text, -.qvitter-follow-button.following:hover .following-text { +.qvitter-follow-button.following:hover .following-text, +.qvitter-follow-button.blocking .follow-text, +.qvitter-follow-button.blocking .unfollow-text, +.qvitter-follow-button.blocking:hover .blocking-text { display:none; - height: 28px; - line-height: 28px; - } -.member-button.member:hover .leave-text, -.external-follow-button.following:hover .unfollow-text, -.qvitter-follow-button.following:hover .unfollow-text { - display:block; - height: 28px; - line-height: 28px; } + + + .queet-box-extras button { box-shadow: none; background:none !important; diff --git a/js/ajax-functions.js b/js/ajax-functions.js index fe58cfd..2cb4d3b 100644 --- a/js/ajax-functions.js +++ b/js/ajax-functions.js @@ -457,6 +457,44 @@ function APIFollowOrUnfollowUser(followOrUnfollow,user_id,this_element,actionOnS }); } +/* · + · + · Post follow or unfollow user request + · + · @param followOrUnfollow: either 'follow' or 'unfollow' + · @param user_id: the user id of the user we want to follow + · @param actionOnSuccess: callback function, false on error, data on success + · + · · · · · · · · · · · · · */ + +function APIBlockOrUnblockUser(blockOrUnblock,user_id,actionOnSuccess) { + + if(blockOrUnblock == 'block') { + var postRequest = 'blocks/create.json'; + } + else if (blockOrUnblock == 'unblock') { + var postRequest = 'blocks/destroy.json'; + } + + $.ajax({ url: window.apiRoot + postRequest, + cache: false, + type: "POST", + data: { + id: user_id + }, + dataType:"json", + error: function(data){ actionOnSuccess(false); console.log(data); }, + success: function(data) { + data = convertEmptyObjectToEmptyArray(data); + data = iterateRecursiveReplaceHtmlSpecialChars(data); + searchForUserDataToCache(data); + updateUserDataInStream(); + actionOnSuccess(data); + } + }); + } + + /* · · diff --git a/js/dom-functions.js b/js/dom-functions.js index 091ccb0..9c6d8c1 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -285,6 +285,47 @@ function showFavsAndRequeetsInQueet(q,data) { } +/* · + · + · Build a follow/block button + · + · @param obj: an object with a user array + · + · · · · · · · · · */ + +function buildFollowBlockbutton(obj) { + + // following? + var followingClass = ''; + if(obj.following) { + followingClass = ' following'; + } + + // blocking? + var blockingClass = ''; + if(obj.statusnet_blocking) { + blockingClass = ' blocking'; + } + + var followButton = ''; + if(typeof window.loggedIn.screen_name != 'undefined' // if logged in + && window.loggedIn.id != obj.id) { // not if this is me + if(!(obj.statusnet_profile_url.indexOf('/twitter.com/')>-1 && obj.following === false)) { // only unfollow twitter users + var followButton = ''; + } + } + + return followButton; + } + /* · · @@ -310,28 +351,23 @@ function buildProfileCard(data) { var follows_you = '' + window.sL.followsYou + ''; } - // show user actions if logged in - var followingClass = ''; - if(data.following) { - followingClass = 'following'; - } var followButton = ''; // only add follow button if this is a local user if(data.is_local == true) { if(typeof window.loggedIn.screen_name != 'undefined' && window.loggedIn.id != data.id) { - var followButton = ''; + followButton = buildFollowBlockbutton(data); } // follow from external instance if logged out if(typeof window.loggedIn.screen_name == 'undefined') { - var followButton = ''; + followButton = ''; } // edit profile button if me if(typeof window.loggedIn.screen_name != 'undefined' && window.loggedIn.id == data.id) { - var followButton = ''; + followButton = ''; } } @@ -393,23 +429,18 @@ function buildProfileCard(data) { function buildExternalProfileCard(data) { - // local profile id and follow class - var followLocalIdHtml = ''; - var followingClass = ''; - if(typeof data.local != 'undefined' && data.local !== null) { - followLocalIdHtml = ' data-follow-user-id="' + data.local.id + '"'; - - if(data.local.following) { - followingClass = 'following'; - } - } - // follows me? var follows_you = ''; if(data.local !== null && data.local.follows_you === true && window.loggedIn.id != data.local.id) { var follows_you = '' + window.sL.followsYou + ''; } + // follow button + var followButton = ''; + if(window.loggedIn !== false && typeof data.local != 'undefined' && data.local !== null) { + var followButton = buildFollowBlockbutton(data.local); + } + // empty strings and zeros instead of null data = cleanUpUserObject(data.external); @@ -442,13 +473,6 @@ function buildExternalProfileCard(data) { var serverUrl = guessInstanceUrlWithoutProtocolFromProfileUrlAndNickname(data.statusnet_profile_url, data.screen_name); data.screenNameWithServer = '@' + data.screen_name + '@' + serverUrl; - var followButton = ''; - - // we can only follow remote users if we're logged in at the moment - if(window.loggedIn !== false) { - var followButton = ''; - } - data.profileCardHtml = '\
    \
    \ @@ -717,10 +741,11 @@ function setNewCurrentStream(streamObject,setLocation,fallbackId,actionOnSuccess }); } - // hide all notices from blocked users - if(typeof window.allBlocking != 'undefined') { + // hide all notices from blocked users (not for user lists) + if(window.currentStreamObject.type != 'users' && typeof window.allBlocking != 'undefined') { $.each(window.allBlocking,function(){ oldStreamState.find('strong.name[data-user-id="' + this + '"]').closest('.stream-item').addClass('profile-blocked-by-me'); + oldStreamState.find('strong.name[data-user-id="' + this + '"]').closest('.stream-item').children('.queet').attr('data-tooltip',window.sL.thisIsANoticeFromABlockedUser); }); } @@ -1870,26 +1895,27 @@ function buildUserStreamItemHtml(obj) { rtlOrNot = 'rtl'; } - // show user actions + // following? var followingClass = ''; if(obj.following) { - followingClass = 'following'; + followingClass = ' following'; } + + // blocking? + var blockingClass = ''; + if(obj.statusnet_blocking) { + blockingClass = ' blocking'; + } + var followButton = ''; if(typeof window.loggedIn.screen_name != 'undefined' // if logged in && window.loggedIn.id != obj.id) { // not if this is me if(!(obj.statusnet_profile_url.indexOf('/twitter.com/')>-1 && obj.following === false)) { // only unfollow twitter users - var followButton = ''; + var followButton = buildFollowBlockbutton(obj); } } - return '
    \ + return '
    \
    \ ' + followButton + '\
    \ @@ -2080,6 +2106,7 @@ function buildQueetHtml(obj, idInStream, extraClasses, requeeted_by, isConversat data-quitter-id-in-stream="' + idInStream + '" \ data-in-reply-to-screen-name="' + in_reply_to_screen_name + '" \ data-in-reply-to-status-id="' + obj.in_reply_to_status_id + '"\ + data-user-id="' + obj.user.id + '"\ ' + requeetedByMe + '>\
    \ \ diff --git a/js/misc-functions.js b/js/misc-functions.js index 13a0f9f..b15a170 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -301,6 +301,137 @@ function localStorageIsEnabled() { } +/* · + · + · Block/unblock user and do necessary stuff + · + · · · · · · · · · */ + +function blockUser(arg, callback) { + + // arguments is sent as an object, for easier use with a menu's function-row + var userId = arg.userId; + var blockButton_jQueryElement = arg.blockButton_jQueryElement; + + display_spinner(); + APIBlockOrUnblockUser('block', userId, function(data) { + remove_spinner(); + + // activate the button, if we were passed one + if(typeof blockButton_jQueryElement != 'undefined') { + blockButton_jQueryElement.removeClass('disabled'); + } + + if(data && data.statusnet_blocking === true) { + // success + markUserAsBlockedInDOM(userId, data.following); + if(typeof callback == 'function') { + callback(blockButton_jQueryElement); + } + } + else { + // failed! + showErrorMessage(window.sL.failedBlockingUser); + } + }); + } +function unblockUser(arg, callback) { + + // arguments is sent as an object, for easier use with a menu's function-row + var userId = arg.userId; + var blockButton_jQueryElement = arg.blockButton_jQueryElement; + + display_spinner(); + APIBlockOrUnblockUser('unblock', userId, function(data) { + remove_spinner(); + + // activate the button, if we were passed one + if(typeof blockButton_jQueryElement != 'undefined') { + blockButton_jQueryElement.removeClass('disabled'); + } + + if(data && data.statusnet_blocking === false) { + // success + markUserAsUnblockedInDOM(userId, data.following); + if(typeof callback == 'function') { + callback(blockButton_jQueryElement); + } + } + else { + // failed! + showErrorMessage(window.sL.failedUnblockingUser); + } + }); + } +function markUserAsBlockedInDOM(userId, following) { + + // display buttons accordingly + $('.qvitter-follow-button[data-follow-user-id="' + userId + '"]').addClass('blocking'); + + if(following) { + $('.qvitter-follow-button[data-follow-user-id="' + userId + '"]').addClass('following'); + } + else { + $('.qvitter-follow-button[data-follow-user-id="' + userId + '"]').removeClass('following'); + } + + // hide notices from the blocked user + $.each($('.stream-item[data-quitter-id-in-stream][data-user-id="' + userId + '"]'),function(){ + $(this).addClass('profile-blocked-by-me'); + $(this).children('.queet').attr('data-tooltip',window.sL.thisIsANoticeFromABlockedUser); + }); + + // add to the window.allBlocking array + if (userIsBlocked(userId) === false) { + window.allBlocking.push(userId); + } + } +function markUserAsUnblockedInDOM(userId, following) { + + // display buttons accordingly + $('.qvitter-follow-button[data-follow-user-id="' + userId + '"]').removeClass('blocking'); + if(following) { + $('.qvitter-follow-button[data-follow-user-id="' + userId + '"]').addClass('following'); + } + else { + $('.qvitter-follow-button[data-follow-user-id="' + userId + '"]').removeClass('following'); + } + + // hide the user from lists of blocked users + $.each($('.stream-item.user[data-user-id="' + userId + '"]'),function(){ + slideUpAndRemoveStreamItem($(this)); + }); + + // unhide notices from the blocked user + $.each($('.stream-item[data-quitter-id-in-stream][data-user-id="' + userId + '"]'),function(){ + $(this).removeClass('profile-blocked-by-me'); + $(this).children('.queet').removeAttr('data-tooltip'); + }); + + // remove from the window.allBlocking array + var existingBlockIndex = window.allBlocking.indexOf(userId); + if (existingBlockIndex > -1) { + window.allBlocking.splice(existingBlockIndex, 1); + } + } + +/* · + · + · Is this user id blocked? + · + · · · · · · · · · */ + +function userIsBlocked(userId) { + var existingBlock = window.allBlocking.indexOf(userId); + if (existingBlock > -1) { + return true; + } + else { + return false; + } + } + + /* · · · Updates the times for all queets loaded to DOM @@ -1002,7 +1133,13 @@ function rememberStreamStateInLocalStorage() { return false; } }); + var feed = $('
    ').append(firstTwentyVisibleHTML); + + // we add these again (with updated blocking list) when the notices are fetched from the cache + feed.children('.stream-item').removeClass('profile-blocked-by-me'); + feed.children('.stream-item').children('.queet').removeAttr('data-tooltip'); // can contain tooltip about blocked user + feed.find('.temp-post').remove(); feed.children('.stream-item').removeClass('not-seen'); feed.children('.stream-item').removeClass('hidden-repeat'); // this means we need hide repeats when adding cached notices to feed later diff --git a/js/qvitter.js b/js/qvitter.js index 6368a33..4c633ef 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -1214,28 +1214,42 @@ $('body').on('click','.sm-ellipsis',function(e){ var streamItemUserID = $(this).closest('.queet').find('.stream-item-header').find('.name').attr('data-user-id'); var streamItemID = $(this).closest('.queet').parent('.stream-item').attr('data-quitter-id'); + // menu + var menuArray = []; + // my notice if(streamItemUserID == window.loggedIn.id) { - var menuArray = [ - { - type: 'function', - functionName: 'deleteQueet', - functionArguments: { - streamItemID: streamItemID - }, - label: window.sL.deleteVerb + menuArray.push({ + type: 'function', + functionName: 'deleteQueet', + functionArguments: { + streamItemID: streamItemID }, - ]; + label: window.sL.deleteVerb + }); } // other users' notices else { - var menuArray = [ - { - type: 'link', - href: window.siteInstanceURL + 'main/block?profileid=' + streamItemUserID, + if(userIsBlocked(streamItemUserID)) { + menuArray.push({ + type: 'function', + functionName: 'unblockUser', + functionArguments: { + userId: streamItemUserID + }, + label: window.sL.unblockUser.replace('{username}',streamItemUsername) + }); + } + else { + menuArray.push({ + type: 'function', + functionName: 'blockUser', + functionArguments: { + userId: streamItemUserID + }, label: window.sL.blockUser.replace('{username}',streamItemUsername) - }, - ]; + }); + } } // add menu to DOM and align it @@ -1453,67 +1467,73 @@ $('body').on('click','.external-member-button',function(event){ /* · · - · When clicking a follow button + · When clicking a follow/block button · · · · · · · · · · · · · · */ $('body').on('click','.qvitter-follow-button',function(event){ - if(!$(this).hasClass('disabled')) { - $(this).addClass('disabled'); - // get user id - var user_id = $(this).attr('data-follow-user-id'); - - // if there's no local user id, we have to take a detour - if(typeof user_id == 'undefined') { - $.ajax({ url: window.siteInstanceURL + 'main/ostatussub', - type: "POST", - data: { - token: window.commonSessionToken, - profile: $(this).attr('data-follow-user'), - submit: 'Confirm' - }, - error: function(data){ console.log('error'); console.log(data); }, - success: function(data) { - // reload page on success - // since ostatussub doesn't have an api, there's no good way to get the local user id here, - // and change the button to an unsubscribe button. - window.location.replace(window.siteInstanceURL + window.loggedIn.screen_name + '/subscriptions'); - } - }); - } - - // if we have a local id, it's straightforward, but we could be handling an unfollow - else { - - // follow or unfollow? - if($(this).hasClass('following')) { - var followOrUnfollow = 'unfollow'; - } - else { - var followOrUnfollow = 'follow'; - } - - // post to api - display_spinner(); - APIFollowOrUnfollowUser(followOrUnfollow,user_id, this, function(data,this_element) { - remove_spinner(); - $(this_element).removeClass('disabled'); - if(data) { - if(data.following) { - $(this_element).addClass('following'); - $('#user-following strong').html(parseInt($('#user-following strong').html(),10)+1); - appendUserToMentionsSuggestionsArray(data); - } - else { - $(this_element).removeClass('following'); - $('#user-following strong').html(parseInt($('#user-following strong').html(),10)-1); - } - } - }); - - } + if($(this).hasClass('disabled')) { + return true; } + + $(this).addClass('disabled'); + var user_id = $(this).attr('data-follow-user-id'); + + // if we have a local id, it's straightforward, but we could be handling an unfollow + if(typeof user_id != 'undefined') { + + // unblock? + if($(this).hasClass('blocking')) { + unblockUser({userId: user_id, blockButton_jQueryElement: $(this)}); + return true; + } + + // follow or unfollow? + if($(this).hasClass('following')) { + var followOrUnfollow = 'unfollow'; + } + else { + var followOrUnfollow = 'follow'; + } + + // post to api + display_spinner(); + APIFollowOrUnfollowUser(followOrUnfollow,user_id, this, function(data,this_element) { + remove_spinner(); + $(this_element).removeClass('disabled'); + if(data) { + if(data.following) { + $(this_element).addClass('following'); + $('#user-following strong').html(parseInt($('#user-following strong').html(),10)+1); + appendUserToMentionsSuggestionsArray(data); + } + else { + $(this_element).removeClass('following'); + $('#user-following strong').html(parseInt($('#user-following strong').html(),10)-1); + } + } + }); + + return true; + } + + // if there's no local user id, we have to take a detour + $.ajax({ url: window.siteInstanceURL + 'main/ostatussub', + type: "POST", + data: { + token: window.commonSessionToken, + profile: $(this).attr('data-follow-user'), + submit: 'Confirm' + }, + error: function(data){ console.log('error'); console.log(data); }, + success: function(data) { + // reload page on success + // since ostatussub doesn't have an api, there's no good way to get the local user id here, + // and change the button to an unsubscribe button. + window.location.replace(window.siteInstanceURL + window.loggedIn.screen_name + '/subscriptions'); + } + }); }); diff --git a/js/stream-router.js b/js/stream-router.js index 73b1ef8..f7ed994 100644 --- a/js/stream-router.js +++ b/js/stream-router.js @@ -614,6 +614,19 @@ function pathToStreamRouter(path) { return streamObject; } + // {screen_name}/blocks + if(pathSplit.length == 2 && /^[a-zA-Z0-9]+$/.test(pathSplit[0]) && pathSplit[1] == 'blocks') { + streamObject.name = 'user blocks'; + streamObject.nickname = pathSplit[0]; + streamObject.parentPath = streamObject.nickname; + streamObject.streamHeader = '@' + replaceHtmlSpecialChars(streamObject.nickname); + streamObject.streamSubHeader = window.sL.userBlocks; + streamObject.stream = 'qvitter/blocks.json?count=20&id=' + streamObject.nickname + '&withuserarray=1'; + streamObject.maxIdOrPage = 'page'; + streamObject.type = 'users'; + return streamObject; + } + // {screen_name}/groups if(pathSplit.length == 2 && /^[a-zA-Z0-9]+$/.test(pathSplit[0]) && pathSplit[1] == 'groups') { streamObject.name = 'user group list'; diff --git a/locale/ar.json b/locale/ar.json index 68a34ef..74a39a6 100644 --- a/locale/ar.json +++ b/locale/ar.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/ast.json b/locale/ast.json index 90c11cb..35fbbe6 100644 --- a/locale/ast.json +++ b/locale/ast.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/ca.json b/locale/ca.json index 958cf36..f7eeb2d 100644 --- a/locale/ca.json +++ b/locale/ca.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/de.json b/locale/de.json index 19a97a3..cca048e 100644 --- a/locale/de.json +++ b/locale/de.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Eingebettete Inhaltsvorschau nicht anzeigen in dieser Timeline", - "hideQuotesInTimeline":"Verberge Zitate in dieser Timeline" + "hideQuotesInTimeline":"Verberge Zitate in dieser Timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/en.json b/locale/en.json index 67f6dbf..cf0a1fd 100644 --- a/locale/en.json +++ b/locale/en.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/eo.json b/locale/eo.json index 9945110..0dcf414 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -163,5 +163,11 @@ "startRant":"Eki plendon", "continueRant":"Daŭrigi la plendon", "hideEmbeddedInTimeline":"Kaŝi enkorpigitajn enhavojn en ĉi tiu tempolinio", - "hideQuotesInTimeline":"Kaŝi citaĵojn en ĉi tiu tempolinio" + "hideQuotesInTimeline":"Kaŝi citaĵojn en ĉi tiu tempolinio", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/es.json b/locale/es.json index 259ac6e..f2c195e 100644 --- a/locale/es.json +++ b/locale/es.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Ocultar contenido incrustado en esta línea temporal", - "hideQuotesInTimeline":"Ocultar citas en esta línea temporal" + "hideQuotesInTimeline":"Ocultar citas en esta línea temporal", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/es_ahorita.json b/locale/es_ahorita.json index 91b721d..42e3c7b 100644 --- a/locale/es_ahorita.json +++ b/locale/es_ahorita.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/eu.json b/locale/eu.json index dc71e3a..ed32efa 100644 --- a/locale/eu.json +++ b/locale/eu.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/fa.json b/locale/fa.json index 58bae9b..05521d7 100644 --- a/locale/fa.json +++ b/locale/fa.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/fi.json b/locale/fi.json index 794abe8..a808a6a 100644 --- a/locale/fi.json +++ b/locale/fi.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/fr.json b/locale/fr.json index 9264b37..5d6eb51 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Cacher le contenu intégré dans ces avis", - "hideQuotesInTimeline":"Cacher les citations dans ces avis" + "hideQuotesInTimeline":"Cacher les citations dans ces avis", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/gl.json b/locale/gl.json index 488410c..85458c1 100644 --- a/locale/gl.json +++ b/locale/gl.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Ocultar contido incrustado nesta liña temporal", - "hideQuotesInTimeline":"Ocultar citas nesta liña temporal" + "hideQuotesInTimeline":"Ocultar citas nesta liña temporal", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/he.json b/locale/he.json index 9d0dd66..982dc70 100644 --- a/locale/he.json +++ b/locale/he.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/io.json b/locale/io.json index d6cd2f9..f2ef44f 100644 --- a/locale/io.json +++ b/locale/io.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/it.json b/locale/it.json index e4985b3..022ffcb 100644 --- a/locale/it.json +++ b/locale/it.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/ja.json b/locale/ja.json index 32272e8..4bc3f17 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -163,5 +163,11 @@ "startRant":"連投する", "continueRant":"連投を続ける", "hideEmbeddedInTimeline":"タイムライン上の埋め込まれたコンテンツを隠す", - "hideQuotesInTimeline":"タイムライン上の引用を隠す" + "hideQuotesInTimeline":"タイムライン上の引用を隠す", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/nl.json b/locale/nl.json index a8e9742..8f2f289 100644 --- a/locale/nl.json +++ b/locale/nl.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/no.json b/locale/no.json index a9066a3..0623b49 100644 --- a/locale/no.json +++ b/locale/no.json @@ -163,5 +163,11 @@ "startRant":"Start en utblåsning", "continueRant":"Fortsett utblåsningen", "hideEmbeddedInTimeline":"Skjul inkluderende innhold i denne tidslinjen", - "hideQuotesInTimeline":"Skjul sitater i denne tidslinjen" + "hideQuotesInTimeline":"Skjul sitater i denne tidslinjen", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/pt.json b/locale/pt.json index c4c95c2..f6a8955 100644 --- a/locale/pt.json +++ b/locale/pt.json @@ -163,5 +163,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/pt_br.json b/locale/pt_br.json index 0196fcb..11b4029 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -163,5 +163,11 @@ "startRant":"Iniciar um debate", "continueRant":"Continuar o debate", "hideEmbeddedInTimeline":"Ocultar conteúdo incorporado nessa linha do tempo", - "hideQuotesInTimeline":"Ocultar citações nesta linha do tempo" + "hideQuotesInTimeline":"Ocultar citações nesta linha do tempo", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/ru.json b/locale/ru.json index f842932..177e739 100644 --- a/locale/ru.json +++ b/locale/ru.json @@ -161,5 +161,11 @@ "addEditLanguageLink":"Помогите перевести {site-title} на другой язык", "onlyPartlyTranslated":"{site-title} только частично переведён на {language-name} ({percent}%). Вы можете помочь завершить перевод на на домашней странице репозитория Qvitter", "startRant":"Начать декламацию", - "continueRant":"Продолжить декламацию" + "continueRant":"Продолжить декламацию", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/sq.json b/locale/sq.json index d9b06c6..3ab185f 100644 --- a/locale/sq.json +++ b/locale/sq.json @@ -163,5 +163,11 @@ "startRant":"Filloni një dërdëllitje", "continueRant":"Vazhdojeni dërdëllitjen", "hideEmbeddedInTimeline":"Fshih lëndë të trupëzuar në këtë rrjedhë kohore", - "hideQuotesInTimeline":"Fshih citime në këtë rrjedhë kohore" + "hideQuotesInTimeline":"Fshih citime në këtë rrjedhë kohore", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } diff --git a/locale/sv.json b/locale/sv.json index e7291bd..8699c2f 100644 --- a/locale/sv.json +++ b/locale/sv.json @@ -163,5 +163,11 @@ "startRant":"Påbörja en harang", "continueRant":"Fortsätt harangen", "hideEmbeddedInTimeline":"Dölj inbäddat innehåll i detta flöde", - "hideQuotesInTimeline":"Dölj citat i detta flöde" + "hideQuotesInTimeline":"Dölj citat i detta flöde", + "userBlocks":"Konton du blockerar", + "buttonBlocked":"Blockerad", + "buttonUnblock":"Avblockera", + "failedBlockingUser":"Misslyckades med att blockera användaren.", + "failedUnblockingUser":"Misslyckades med att avblockera användaren.", + "unblockUser": "Avblockera {username}" } diff --git a/locale/zh_cn.json b/locale/zh_cn.json index 6b82016..96ef7f5 100644 --- a/locale/zh_cn.json +++ b/locale/zh_cn.json @@ -162,5 +162,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" -} \ No newline at end of file + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" +} diff --git a/locale/zh_tw.json b/locale/zh_tw.json index 54da409..4614d58 100644 --- a/locale/zh_tw.json +++ b/locale/zh_tw.json @@ -162,5 +162,11 @@ "startRant":"Start a rant", "continueRant":"Continue the rant", "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline" + "hideQuotesInTimeline":"Hide quotes in this timeline", + "userBlocks":"Accounts you're blocking", + "buttonBlocked":"Blocked", + "buttonUnblock":"Unblock", + "failedBlockingUser":"Failed to block the user.", + "failedUnblockingUser":"Failed to unblock the user.", + "unblockUser": "Unblock {username}" } From 8abbdeb3c0a6a34754411452ae832d2f19cef7ab Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 2 Feb 2016 16:25:07 +0100 Subject: [PATCH 039/120] blocks you tooltip --- QvitterPlugin.php | 10 +++++++--- css/qvitter.css | 9 +++++++++ js/dom-functions.js | 25 ++++++++++++++++--------- locale/ar.json | 3 ++- locale/ast.json | 3 ++- locale/ca.json | 3 ++- locale/de.json | 3 ++- locale/en.json | 3 ++- locale/eo.json | 3 ++- locale/es.json | 3 ++- locale/es_ahorita.json | 3 ++- locale/eu.json | 3 ++- locale/fa.json | 3 ++- locale/fi.json | 3 ++- locale/fr.json | 3 ++- locale/gl.json | 3 ++- locale/he.json | 3 ++- locale/io.json | 3 ++- locale/it.json | 3 ++- locale/ja.json | 3 ++- locale/nl.json | 3 ++- locale/no.json | 3 ++- locale/pt.json | 3 ++- locale/pt_br.json | 3 ++- locale/ru.json | 3 ++- locale/sq.json | 3 ++- locale/sv.json | 3 ++- locale/zh_cn.json | 3 ++- locale/zh_tw.json | 3 ++- 29 files changed, 84 insertions(+), 38 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 114172c..4b4986c 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -773,10 +773,14 @@ class QvitterPlugin extends Plugin { $twitter_user['profile_background_color'] = Profile_prefs::getConfigData($profile, 'theme', 'backgroundcolor'); $twitter_user['profile_banner_url'] = Profile_prefs::getConfigData($profile, 'qvitter', 'cover_photo'); - // follows me? + if ($scoped) { - $twitter_user['follows_you'] = $profile->isSubscribed($scoped); - } + // follows me? + $twitter_user['follows_you'] = $profile->isSubscribed($scoped); + + // blocks me? + $twitter_user['blocks_you'] = $profile->hasBlocked($scoped); + } // local user? $twitter_user['is_local'] = $profile->isLocal(); diff --git a/css/qvitter.css b/css/qvitter.css index 9dc7b1b..3223dc1 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -4335,6 +4335,15 @@ button.shorten:not(.disabled):active { display:none; } +.user-actions .blocks-you::before { + content:"\f05e"; + color: #aaa; + cursor:default; + font-family: FontAwesome; + font-size: 20px; + line-height: 32px; + margin-right: 5px; +} diff --git a/js/dom-functions.js b/js/dom-functions.js index 9c6d8c1..d7f2cbb 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -311,15 +311,22 @@ function buildFollowBlockbutton(obj) { if(typeof window.loggedIn.screen_name != 'undefined' // if logged in && window.loggedIn.id != obj.id) { // not if this is me if(!(obj.statusnet_profile_url.indexOf('/twitter.com/')>-1 && obj.following === false)) { // only unfollow twitter users - var followButton = ''; + if(obj.blocks_you) { + var followButton = ''; + } + else { + var followButton = ''; + } } } diff --git a/locale/ar.json b/locale/ar.json index 74a39a6..4d17ca9 100644 --- a/locale/ar.json +++ b/locale/ar.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/ast.json b/locale/ast.json index 35fbbe6..453b49f 100644 --- a/locale/ast.json +++ b/locale/ast.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/ca.json b/locale/ca.json index f7eeb2d..f778b37 100644 --- a/locale/ca.json +++ b/locale/ca.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/de.json b/locale/de.json index cca048e..43a9769 100644 --- a/locale/de.json +++ b/locale/de.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/en.json b/locale/en.json index cf0a1fd..9d546fe 100644 --- a/locale/en.json +++ b/locale/en.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/eo.json b/locale/eo.json index 0dcf414..7eb8c5b 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/es.json b/locale/es.json index f2c195e..df61d68 100644 --- a/locale/es.json +++ b/locale/es.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/es_ahorita.json b/locale/es_ahorita.json index 42e3c7b..c83203a 100644 --- a/locale/es_ahorita.json +++ b/locale/es_ahorita.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/eu.json b/locale/eu.json index ed32efa..e269780 100644 --- a/locale/eu.json +++ b/locale/eu.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/fa.json b/locale/fa.json index 05521d7..bbfcff3 100644 --- a/locale/fa.json +++ b/locale/fa.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/fi.json b/locale/fi.json index a808a6a..5f72f35 100644 --- a/locale/fi.json +++ b/locale/fi.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/fr.json b/locale/fr.json index 5d6eb51..f564a4e 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/gl.json b/locale/gl.json index 85458c1..d092e18 100644 --- a/locale/gl.json +++ b/locale/gl.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/he.json b/locale/he.json index 982dc70..cffad42 100644 --- a/locale/he.json +++ b/locale/he.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/io.json b/locale/io.json index f2ef44f..157989a 100644 --- a/locale/io.json +++ b/locale/io.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/it.json b/locale/it.json index 022ffcb..39a0793 100644 --- a/locale/it.json +++ b/locale/it.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/ja.json b/locale/ja.json index 4bc3f17..27c3e72 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/nl.json b/locale/nl.json index 8f2f289..17481ef 100644 --- a/locale/nl.json +++ b/locale/nl.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/no.json b/locale/no.json index 0623b49..de76dae 100644 --- a/locale/no.json +++ b/locale/no.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/pt.json b/locale/pt.json index f6a8955..b801895 100644 --- a/locale/pt.json +++ b/locale/pt.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/pt_br.json b/locale/pt_br.json index 11b4029..58cff8b 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/ru.json b/locale/ru.json index 177e739..703c866 100644 --- a/locale/ru.json +++ b/locale/ru.json @@ -167,5 +167,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/sq.json b/locale/sq.json index 3ab185f..a8ccbe1 100644 --- a/locale/sq.json +++ b/locale/sq.json @@ -169,5 +169,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/sv.json b/locale/sv.json index 8699c2f..7496751 100644 --- a/locale/sv.json +++ b/locale/sv.json @@ -169,5 +169,6 @@ "buttonUnblock":"Avblockera", "failedBlockingUser":"Misslyckades med att blockera användaren.", "failedUnblockingUser":"Misslyckades med att avblockera användaren.", - "unblockUser": "Avblockera {username}" + "unblockUser": "Avblockera {username}", + "tooltipBlocksYou":"Du är blockerad från att följa {username}." } diff --git a/locale/zh_cn.json b/locale/zh_cn.json index 96ef7f5..3cc8d2a 100644 --- a/locale/zh_cn.json +++ b/locale/zh_cn.json @@ -168,5 +168,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } diff --git a/locale/zh_tw.json b/locale/zh_tw.json index 4614d58..ee9cde6 100644 --- a/locale/zh_tw.json +++ b/locale/zh_tw.json @@ -168,5 +168,6 @@ "buttonUnblock":"Unblock", "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}" + "unblockUser": "Unblock {username}", + "tooltipBlocksYou":"You are blocked from following {username}." } From f722720cc35625809eb3e127a6d0d6b3af548e32 Mon Sep 17 00:00:00 2001 From: abjectio Date: Wed, 3 Feb 2016 22:10:40 +0100 Subject: [PATCH 040/120] updated norwegian translation --- locale/no.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locale/no.json b/locale/no.json index de76dae..4a472d7 100644 --- a/locale/no.json +++ b/locale/no.json @@ -164,11 +164,11 @@ "continueRant":"Fortsett utblåsningen", "hideEmbeddedInTimeline":"Skjul inkluderende innhold i denne tidslinjen", "hideQuotesInTimeline":"Skjul sitater i denne tidslinjen", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "userBlocks":"Brukere du blokkerer", + "buttonBlocked":"Blokkert", + "buttonUnblock":"Opphev blokkering", + "failedBlockingUser":"Kunne ikke blokkere brukeren.", + "failedUnblockingUser":"Kunne ikke oppheve blokkeringen av bruker.", + "unblockUser": "Opphev blokkering {username}", + "tooltipBlocksYou":"Du er blokkert fra å følge profilen {username}." } From 60acc526385b173e4779866b654508fd4654d070 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 4 Feb 2016 13:52:29 +0100 Subject: [PATCH 041/120] sort twkn by id, since we scroll using max_id --- classes/PublicAndExternalNoticeStream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/PublicAndExternalNoticeStream.php b/classes/PublicAndExternalNoticeStream.php index d612ceb..3e58964 100644 --- a/classes/PublicAndExternalNoticeStream.php +++ b/classes/PublicAndExternalNoticeStream.php @@ -60,7 +60,7 @@ class RawPublicAndExternalNoticeStream extends NoticeStream $notice->selectAdd(); $notice->selectAdd('id'); - $notice->orderBy('created DESC, id DESC'); + $notice->orderBy('id DESC'); if (!is_null($offset)) { $notice->limit($offset, $limit); From 296df6357ddbbd0e5ac400353893b750152909c5 Mon Sep 17 00:00:00 2001 From: radikal Date: Thu, 4 Feb 2016 21:17:32 +0100 Subject: [PATCH 042/120] =?UTF-8?q?Acabando=20traducci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/es.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/locale/es.json b/locale/es.json index df61d68..a7edf80 100644 --- a/locale/es.json +++ b/locale/es.json @@ -152,23 +152,23 @@ "newNotification": "{new-notice-count} nueva notificación", "newNotifications": "{new-notice-count} nuevas notificaciones", "thisIsANoticeFromABlockedUser":"Atención: Ésta es una nota de un usuario que bloqueaste. Pulsa para mostrarla.", - "nicknamesListWithListName":"{nickname}’s list: {list-name}", - "myListWithListName":"My list: {list-name}", - "listMembers":"Members", - "listSubscribers":"Subscribers", - "ERRORcouldNotFindList":"There is no such list.", - "emailAlreadyInUse":"Already in use", - "addEditLanguageLink":"Help translate {site-title} to another language", - "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", - "startRant":"Start a rant", - "continueRant":"Continue the rant", + "nicknamesListWithListName":"Lista de {nickname}: {list-name}", + "myListWithListName":"Mi lista: {list-name}", + "listMembers":"Miembros", + "listSubscribers":"Suscriptores", + "ERRORcouldNotFindList":"La lista no existe.", + "emailAlreadyInUse":"Ya en uso", + "addEditLanguageLink":"Ayuda a traducir {site-title} a otro lenguaje", + "onlyPartlyTranslated":"{site-title} solo está parcialmente traducido al {language-name} ({percent}%). Puedes ayudar a completar la traducción en Página del repositorio de Qvitter", + "startRant":"Iniciar una conversación", + "continueRant":"Continuar la conversación", "hideEmbeddedInTimeline":"Ocultar contenido incrustado en esta línea temporal", "hideQuotesInTimeline":"Ocultar citas en esta línea temporal", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "userBlocks":"Cuentas que estás bloqueando", + "buttonBlocked":"Bloqueado", + "buttonUnblock":"Desbloquear", + "failedBlockingUser":"Falló el bloqueo al usuario.", + "failedUnblockingUser":"Falló el desbloqueo del usuario .", + "unblockUser": "Desbloquear a {username}", + "tooltipBlocksYou":"Has sido bloqueado por {username}." } From 6d3a8695bbce602f17b1ae6e3f1ee66ccd1446a2 Mon Sep 17 00:00:00 2001 From: abjectio Date: Sat, 6 Feb 2016 20:52:36 +0100 Subject: [PATCH 043/120] =?UTF-8?q?Changed=20no.json=20to=20nb.json=20-=20?= =?UTF-8?q?Norwegian=20Bokm=C3=A5l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/no.json | 174 ------------------------------------------------- 1 file changed, 174 deletions(-) delete mode 100644 locale/no.json diff --git a/locale/no.json b/locale/no.json deleted file mode 100644 index 4a472d7..0000000 --- a/locale/no.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "directionality":"ltr", - "languageName": "Norsk", - "loginUsername": "Brukernavn eller e-Post", - "loginPassword": "Passord", - "loginSignIn": "Logg inn", - "loginRememberMe": "Husk meg", - "loginForgotPassword": "Glemt passordet?", - "notices": "Queets", - "followers": "Følgere", - "following": "Følger", - "groups": "Grupper", - "compose": "Skriv en ny Queet...", - "queetVerb": "Queet", - "queetsNounPlural": "Queets", - "logout": "Logg ut", - "languageSelected": "Språk:", - "viewMyProfilePage": "Vis min profil side", - "expand": "Mer", - "collapse": "Lukk", - "details": "Detaljer", - "expandFullConversation": "Vis hele samtalen", - "replyVerb": "Svar", - "requeetVerb": "Requeet", - "favoriteVerb": "Favorittmarker", - "requeetedVerb": "Requeeted deg", - "favoritedVerb": "Favorittmarkert", - "replyTo": "Svar", - "requeetedBy": "Requeeted av {requeeted-by}", - "favoriteNoun": "Favoritt", - "favoritesNoun": "Favoritter", - "requeetNoun": "Requeet", - "requeetsNoun": "Requeeter", - "newQueet": "{new-notice-count} ny Queet", - "newQueets": "{new-notice-count} nye Queets", - "longmonthsJanuary": "Januar", - "longmonthsFebruary": "Februar", - "longmonthsMars": "Mars", - "longmonthsApril": "April", - "longmonthsMay": "Mai", - "longmonthsJune": "Juni", - "longmonthsJuly": "Juli", - "longmonthsAugust": "August", - "longmonthsSeptember": "September", - "longmonthsOctober": "Oktober", - "longmonthsNovember": "November", - "longmonthsDecember": "Desember", - "shortmonthsJanuary": "jan", - "shortmonthsFebruary": "feb", - "shortmonthsMars": "mar", - "shortmonthsApril": "apr", - "shortmonthsMay": "mai", - "shortmonthsJune": "jun", - "shortmonthsJuly": "jul", - "shortmonthsAugust": "aug", - "shortmonthsSeptember": "sep", - "shortmonthsOctober": "okt", - "shortmonthsNovember": "nov", - "shortmonthsDecember": "des", - "time12am": "{time} am", - "time12pm": "{time} pm", - "longDateFormat": "{time12} - {day} {month} {year}", - "shortDateFormatSeconds": "{seconds}s", - "shortDateFormatMinutes": "{minutes}m", - "shortDateFormatHours": "{hours}t", - "shortDateFormatDate": "{day} {month}", - "shortDateFormatDateAndY": "{day} {month} {year}", - "now": "nå", - "posting": "poster", - "viewMoreInConvBefore": "← Vis samtale", - "viewMoreInConvAfter": "Vis samtale →", - "mentions": "Nevnte deg", - "timeline": "Tidslinje", - "publicTimeline": "Offentlig tidslinje", - "publicAndExtTimeline": "Hele nettverket", - "searchVerb": "Søk", - "deleteVerb": "Slett", - "cancelVerb": "Avbryt", - "deleteConfirmation": "Er du sikker på at du ønsker å slette denne queet?", - "userExternalFollow": "Følger distansiert", - "userExternalFollowHelp": "Din konto ID (f.eks. oladunk@quitter.no).", - "userFollow": "Følg", - "userFollowing": "Følger", - "userUnfollow": "Avfølg", - "joinGroup": "Melde deg på", - "joinExternalGroup": "Meld deg på distansiert", - "isMemberOfGroup": "Medlem", - "leaveGroup": "Forlat", - "memberCount": "Medlemmer", - "adminCount": "Administratorer", - "settings": "Innstillinger", - "saveChanges": "Lagre endringer", - "linkColor": "Farge på lenker", - "backgroundColor": "Bakgrunds farge", - "newToQuitter": "Ny på {site-title}?", - "signUp": "Registrere deg", - "signUpFullName": "Fult navn", - "signUpEmail": "e-Post", - "signUpButtonText": "Registrere deg på {site-title}", - "welcomeHeading": "Velkommen til {site-title}.", - "welcomeText": "Vi er en
    \"Forenet eller (Federation)\" betyr i denne konteksten at du ikke behøver å ha en {site-title}-konto for å følge eller følges av andre og prate med andre i nettverket. Du kan registrere deg på hvilken som helst instans/server som støtter protokollen Ostatus, eller mikroblogge på en helt egen server, med den frie programvaren GNU social (som {site-title} bygger på).
    forenet
    allmenhet, der du som har hoppet av de sentraliserte tjenestene kan mikroblogge etisk og solidarisk.", - "registerNickname": "Kallenavn", - "registerHomepage": "Hjemmeside", - "registerBio": "Informasjon om deg", - "registerLocation": "Lokasjon", - "registerRepeatPassword": "Gjenta passord", - "moreSettings": "Flere innstillinger", - "otherServers": "Det finnes flere instanser i GNU social nettverket som alternativt kan benyttes. Følger du denne lenken finner du noen anbefalinger.", - "editMyProfile": "Rediger profil", - "notifications": "Varsler", - "xFavedYourQueet": "favorittmarkerte queeten din", - "xRepeatedYourQueet": "requeetet deg", - "xStartedFollowingYou": "følger deg", - "followsYou": "følger deg", - "FAQ": "FAQ", - "inviteAFriend": "Inviter venner", - "goToExternalProfile": "Gå til fullstendig profil", - "cropAndSave": "Beskjær og lagre", - "showTerms": "Vilkår for bruk", - "ellipsisMore": "Mer", - "blockUser": "Blokker {username}", - "goToOriginalNotice": "Gå til den opprinnelige queeten", - "goToTheUsersRemoteProfile": "Vis brukerens profil", - "clickToDrag":"Klikk - dra og slipp", - "keyboardShortcuts":"Tastatur snarveier", - "classicInterface":"Klassisk {site-title}", - "accessibilityToggleLink":"For bedre synlighet, klikk denne lenken for å bytte til klassisk grensesnitt", - "tooltipBookmarkStream":"Legg til denne strømmen til dine bokmerker", - "tooltipTopMenu":"Meny og innstillinger", - "tooltipAttachImage":"Legg til et bilde", - "tooltipShortenUrls":"Krympe alle URLer i din Queet", - "tooltipReloadStream":"Laste inn på nytt denne strømmen", - "tooltipRemoveBookmark":"Slett dette bokmerket", - "clearHistory":"Slett nettleser historie", - "ERRORsomethingWentWrong":"Noe gikk galt.", - "ERRORmustBeLoggedIn":"Du må være pålogget for å vise denne strømmen.", - "ERRORcouldNotFindUserWithNickname":"Kan ikke finne en bruker med brukerid \"{nickname}\" på denne instansen", - "ERRORcouldNotFindGroupWithNickname":"Kan ikke finne en gruppe med gruppenavnet \"{nickname}\" på denne instansen", - "ERRORcouldNotFindPage":"Kan ikke finne siden.", - "ERRORnoticeRemoved": "Denne notisen er slettet.", - "ERRORnoContactWithServer": "Kan ikke etablere en kobling til instansen. Dette kan skyldes at den er overbelastet, eller det er et problem med din internet kobling. Vennligst forsøk senere.", - "ERRORattachmentUploadFailed": "Opplasting feilet. Formatet er muligens ikke supportert, eller filen er for stor.", - "hideRepliesToPeopleIDoNotFollow":"Skjul svar fra profiler jeg ikke følger.", - "markAllNotificationsAsSeen":"Marker alle varsler som lest", - "notifyRepliesAndMentions":"Nevninger og svar", - "notifyFavs":"Favoritter", - "notifyRepeats":"Requeets", - "notifyFollows":"Nye følgere", - "timelineOptions":"Tidslinje innstillinger", - "ERRORfailedSavingYourSetting":"Feilet ved lagring av innstillinger", - "ERRORfailedMarkingAllNotificationsAsRead":"Feilet ved forsøk å markere alle varsler som lest.", - "newNotification": "{new-notice-count} nytt varsel", - "newNotifications": "{new-notice-count} nye varsler", - "thisIsANoticeFromABlockedUser":"Advarsel: Dette er en notis fra en bruker du har blokkert. Klikk for å se den.", - "nicknamesListWithListName":"{nickname}s liste: {list-name}", - "myListWithListName":"Min liste: {list-name}", - "listMembers":"Medlemmer", - "listSubscribers":"Abonnenter", - "ERRORcouldNotFindList":"Det eksisterer ingen slik liste.", - "emailAlreadyInUse":"Allerede i bruk", - "addEditLanguageLink":"Hjelp oss å oversette {site-title} til andre språk", - "onlyPartlyTranslated":"{site-title} er kun delvis oversatt til {language-name} ({percent}%). Du kan hjelpe å oversette i følgende lenke Qvitter's repository hjemmeside", - "startRant":"Start en utblåsning", - "continueRant":"Fortsett utblåsningen", - "hideEmbeddedInTimeline":"Skjul inkluderende innhold i denne tidslinjen", - "hideQuotesInTimeline":"Skjul sitater i denne tidslinjen", - "userBlocks":"Brukere du blokkerer", - "buttonBlocked":"Blokkert", - "buttonUnblock":"Opphev blokkering", - "failedBlockingUser":"Kunne ikke blokkere brukeren.", - "failedUnblockingUser":"Kunne ikke oppheve blokkeringen av bruker.", - "unblockUser": "Opphev blokkering {username}", - "tooltipBlocksYou":"Du er blokkert fra å følge profilen {username}." -} From c60d1101f9ed561a8ed37976bd78c21af9d7e1d9 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sun, 7 Feb 2016 02:23:50 +0100 Subject: [PATCH 044/120] xss fix, thx @chc4@quitter.se --- js/misc-functions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/misc-functions.js b/js/misc-functions.js index b15a170..256da91 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -1882,7 +1882,8 @@ function loadHistoryFromLocalStorage() { $('#history-container').css('display','block'); $('#history-container').html(''); $.each(cacheData, function(key,obj) { - $('#history-container').append('' + obj.dataStreamHeader + ''); + var streamHeader = replaceHtmlSpecialChars(obj.dataStreamHeader); // because we're pulling the header with jQuery.text() before saving in localstorage, which unescapes our escaped html + $('#history-container').append('' + streamHeader + ''); }); } updateHistoryLocalStorage(); From 97fa39126be6f54dfe61a7c8a47980ccc81e9973 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sun, 7 Feb 2016 14:17:31 +0100 Subject: [PATCH 045/120] terms for logged in users --- actions/qvitter.php | 1 + css/qvitter.css | 3 ++- js/qvitter.js | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/actions/qvitter.php b/actions/qvitter.php index 5eb6b15..b7edba9 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -398,6 +398,7 @@ class QvitterAction extends ApiAction
  • +
  • diff --git a/css/qvitter.css b/css/qvitter.css index 3223dc1..1552c29 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -5158,7 +5158,8 @@ content:"\f068"; /* FAQ -----------*/ -#popup-faq #faq-container { +#popup-faq #faq-container, +#popup-terms #terms-container { padding:10px 20px 20px; color:#000; min-height:100vh; diff --git a/js/qvitter.js b/js/qvitter.js index 4c633ef..396ebd0 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -936,6 +936,7 @@ function proceedToSetLanguageAndLogin(data){ $('.stream-selection.public-and-external-timeline').prepend(window.sL.publicAndExtTimeline) $('#search-query').attr('placeholder',window.sL.searchVerb); $('#faq-link').html(window.sL.FAQ); + $('#tou-link').html(window.sL.showTerms); $('#add-edit-language-link').html(window.sL.addEditLanguageLink); $('#shortcuts-link').html(window.sL.keyboardShortcuts); $('#invite-link').html(window.sL.inviteAFriend); @@ -1094,6 +1095,20 @@ $('#faq-link').click(function(){ }); +/* · + · + · Terms + · + · · · · · · · · · · · · · */ + +$('#tou-link').click(function(){ + popUpAction('popup-terms', window.sL.showTerms,'
    ',false); + getDoc('terms',function(termsHtml){ + $('#terms-container').html(termsHtml); + }); + }); + + /* · · From 93cfed124f04ec5fd6460e124ff4dd877d12dd99 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sun, 7 Feb 2016 14:38:02 +0100 Subject: [PATCH 046/120] terms addition --- doc/de/terms.html | 38 +++++++++++++++++++++----------------- doc/en/terms.html | 12 ++++++++---- doc/io/terms.html | 4 ++++ doc/no/terms.html | 12 ++++++++---- doc/sv/terms.html | 11 +++++++---- 5 files changed, 48 insertions(+), 29 deletions(-) diff --git a/doc/de/terms.html b/doc/de/terms.html index 417254d..673cc3a 100644 --- a/doc/de/terms.html +++ b/doc/de/terms.html @@ -1,31 +1,35 @@ -

    {instance-name} ist kein Dienstleistungsanbieter und du kannst hier deshalb auch keine -Dienstleistungen in Anspruch nehmen. {instance-name} ist nur ein kleiner Teil einer größeren -dezentralen Community. Dies bedeutet ebenso, dass wir dem Inhalt dieser GNU social Instanz -nicht neutral gegenüber stehen müssen. Wenn dir der Inhalt von {instance-name} und deren -Bedingungen nicht zusagen, kannst du jederzeit zu einer anderen GNU social Instanz wechseln, -oder eine eigene eröffnen. Du kannst dann trotzdem Nutzern von {instance-name} folgen. +

    {instance-name} ist kein Dienstleistungsanbieter und du kannst hier deshalb auch keine +Dienstleistungen in Anspruch nehmen. {instance-name} ist nur ein kleiner Teil einer größeren +dezentralen Community. Dies bedeutet ebenso, dass wir dem Inhalt dieser GNU social Instanz +nicht neutral gegenüber stehen müssen. Wenn dir der Inhalt von {instance-name} und deren +Bedingungen nicht zusagen, kannst du jederzeit zu einer anderen GNU social Instanz wechseln, +oder eine eigene eröffnen. Du kannst dann trotzdem Nutzern von {instance-name} folgen. Diese und andere Nutzer können dir ebenfalls folgen, dich aber auch blockieren.

    -

    Im Vergleich zu kommerziellen Social Media Anbietern, bietet {instance-name} eine ganz andere -Struktur. Es ist hier deshalb möglich, Nutzer vor Belästigungen und Unterdrückung zu schützen. +

    Im Vergleich zu kommerziellen Social Media Anbietern, bietet {instance-name} eine ganz andere +Struktur. Es ist hier deshalb möglich, Nutzer vor Belästigungen und Unterdrückung zu schützen. Dieses geschieht aber ohne jegliche Zensur.

    -

    Auf {instance-name} werden Nutzer die andere Nutzer belästigen gelöscht. Wir gehen ebenfalls -konsequent gegen Rassismus, Sexismus, Behindertenfeindlichkeit, Homo- und Transphobie vor. -Derartige Äußerungen würden diese Webseite unsicher für andere Nutzer machen und deren +

    Auf {instance-name} werden Nutzer die andere Nutzer belästigen gelöscht. Wir gehen ebenfalls +konsequent gegen Rassismus, Sexismus, Behindertenfeindlichkeit, Homo- und Transphobie vor. +Derartige Äußerungen würden diese Webseite unsicher für andere Nutzer machen und deren Meinungsfreiheit einschränken.

    -

    Die öffentliche Zeitleiste ist ein sehr sensibler Ort. Deren Inhalt sehen neue Nutzer als -erstes und auch alle registrierten Nutzer können hier die Mitteilungen die veröffentlich -wurden sehen. Moderatoren können Benutzer jederzeit, vorübergehend oder dauerhaft, von der -öffentlichen Zeitleiste ausschließen. Beachte bitte, dass die Anzeige deiner Mitteilungen +

    Die öffentliche Zeitleiste ist ein sehr sensibler Ort. Deren Inhalt sehen neue Nutzer als +erstes und auch alle registrierten Nutzer können hier die Mitteilungen die veröffentlich +wurden sehen. Moderatoren können Benutzer jederzeit, vorübergehend oder dauerhaft, von der +öffentlichen Zeitleiste ausschließen. Beachte bitte, dass die Anzeige deiner Mitteilungen in der öffentlichen Zeitleiste ein Privileg und kein Anspruch ist. -Auch wenn du von der öffentlichen Zeitliste ausgeschlossen wirst, kannst du trotzdem alle +Auch wenn du von der öffentlichen Zeitliste ausgeschlossen wirst, kannst du trotzdem alle anderen Möglichkeiten weiterhin nutzen.

    Werbung und kommerzielle Konten sind auf dieser Instanz nicht gestattet. Wir sind absolut unkommerziell und alle unsere Ausgaben werden durch Spenden von Einzelpersonen bezahlt. -Wir können dir helfen, eine eigene GNU social Instanz +Wir können dir helfen, eine eigene GNU social Instanz zu eröffnen, wenn du vorhast kommerzielle Angebote zu posten.

    Der Inhalt dieser Seite ist lizensiert unter {instance-license-title}.

    + +

    Each user is responsible for the content they submit. If you have any questions +about something posted on this instance, contact the user in question first. As a last resort you +can email the admins.

    diff --git a/doc/en/terms.html b/doc/en/terms.html index a5ee9b6..3a32f4e 100644 --- a/doc/en/terms.html +++ b/doc/en/terms.html @@ -8,8 +8,8 @@ You will still be able to follow and be followed (and blocked) by users on this of flat power structure. We are enabled to protect eachother from harassment and opression, but without censorship.

    -

    On this instance, users who harass others will be removed. We also take a strong stance -against e.g. racism, sexism, ableism, homo- and transphobia. Such expressions make the +

    On this instance, users who harass others will be removed. We also take a strong stance +against e.g. racism, sexism, ableism, homo- and transphobia. Such expressions make the site unsafe for other users, and in practice limit their freedom of speech.

    The Public Timeline is considered an especially sensitive place. It is what new users see, @@ -20,8 +20,12 @@ If you are excluded from the public timeline, you can still use all other featur site just like any other user.

    Advertising and commercial entities are not allowed on this instance. We are completely -non-profit and all our expenses are payed for by donations from individuals. -We can help you start your own GNU social instance +non-profit and all our expenses are payed for by donations from individuals. +We can help you start your own GNU social instance if your intention is commercial.

    All content on this site is licensed with {instance-license-title}.

    + +

    Each user is responsible for the content they submit. If you have any questions +about something posted on this instance, contact the user in question first. As a last resort you +can email the admins.

    diff --git a/doc/io/terms.html b/doc/io/terms.html index 610f98a..42ac1a7 100644 --- a/doc/io/terms.html +++ b/doc/io/terms.html @@ -9,3 +9,7 @@

    Anunco e komercala enti ne esas permisita ye ca exemplero. Ni esas tote neprofita e nia spensi esas tote pagita da individui. Ni povas helpar vu iniciar vua propra exemplero di GNU Social se vua intenco esas komercala.

    Omna kontenajo ye ca ret-situo esas licencita per {instance-license-title}.

    + +

    Each user is responsible for the content they submit. If you have any questions +about something posted on this instance, contact the user in question first. As a last resort you +can email the admins.

    diff --git a/doc/no/terms.html b/doc/no/terms.html index 9e487bc..420a61c 100644 --- a/doc/no/terms.html +++ b/doc/no/terms.html @@ -1,8 +1,8 @@

    {instance-name} er ikke en tjeneste og du er ingen kunde her. Vi er en liten del av en -større sosial bevegelse for å skape et desentralisert nettverk. Det betyr at +større sosial bevegelse for å skape et desentralisert nettverk. Det betyr at vi ikke må være nøytrale til innholdet på vår GNU social instans for å opprettholde ytringsfrihet på nettverket. Om du ikke liker innretningen på vår instans kan du flytte -til en annen eller starte din egen. Du vil fortsatt ha muligheten til å følge og bli fulgt av +til en annen eller starte din egen. Du vil fortsatt ha muligheten til å følge og bli fulgt av (og blokkert av) brukere på denne instansen.

    Til forskjell fra de kommersielle sosiale mediene, @@ -15,15 +15,19 @@ skaper et usikkert rom for andre brukere, og i praksis begrenser det deres ytrin

    Den offentlige tidslinjen, under rubrikken "Hele instansen strøm", anser vi som særskilt -følsomt. Dette er vårt ansikt utad, og alle får se hva som skrives der - det er ikke bare +følsomt. Dette er vårt ansikt utad, og alle får se hva som skrives der - det er ikke bare brukernes følgere. Moderator kan derfor skjule brukere fra den offentlige tidslinjen, uten noen forvarsel. Det er ingen rettighet å være synlig i den offentlige tidslinjen. Om du er skjult fra den offentlige tidslinjen kan du fortsatt bruke instansens alle funksjoner slik som alla andre brukere.

    -

    Reklame og kommersielle brukere er ikke tillat på denne instansen. Vi drifter denne instansen +

    Reklame og kommersielle brukere er ikke tillat på denne instansen. Vi drifter denne instansen fullstendig ikke-kommersiell og alle våre kostnader betales av donasjoner fra brukerne. Vi kan hjelpe deg å starte opp din egen GNU social- instans om du har kommersielle intensjoner.

    Alt innhold på instansen publiseres under lisensen {instance-license-title}.

    + +

    Each user is responsible for the content they submit. If you have any questions +about something posted on this instance, contact the user in question first. As a last resort you +can email the admins.

    diff --git a/doc/sv/terms.html b/doc/sv/terms.html index 3d3b29d..91b16e7 100644 --- a/doc/sv/terms.html +++ b/doc/sv/terms.html @@ -1,8 +1,8 @@

    {instance-name} är inte en tjänst och du är ingen kund här. Vi är en liten del av en -större social rörelse för att skapa ett stort decentraliserad nätverk. Det betyder att +större social rörelse för att skapa ett stort decentraliserad nätverk. Det betyder att vi inte måste vara neutrala till innehållet på vår GNU social-instans för att upprätthålla yttrandefrihet på nätverket. Om du inte gillar inriktningen på vår instans kan du flytta -till en annan eller starta en egen. Du kommer fortfarande kunna följa och bli följd av +till en annan eller starta en egen. Du kommer fortfarande kunna följa och bli följd av (och blockad av) användare på den här instansen.

    Till skillnad från den de toppstyrda kommersiella sociala medierna, @@ -13,9 +13,8 @@ från trakasserier och förtryck, men utan att införa en central censur.

    också vara vaksamma mot t ex rasism, sexism, funko-, trans- och homofobi. Sådana yttranden skapar ett osäkert rum för andra användare, och i praktiken begränsar det deras yttrandefrihet.

    -

    Den offentliga tidslinjen, under rubriken "Hela sajtens flöde", anser vi vara särskilt -känslig. Dels är den vårt ansikte utåt, dels får alla se vad som skrivs där – inte bara +känslig. Dels är den vårt ansikte utåt, dels får alla se vad som skrivs där – inte bara användarens följare. Moderatorer kan därför dölja användare från den offentliga tidslinjen, närsomhelst och utan förvarning. Det är ingen rättighet att synas där. Om du dolts från den offentliga tidslinjen kan du fortfarande använda sajtens alla funktioner precis som @@ -27,3 +26,7 @@ helt icke-kommersiellt och alla våra omkostnader betalas av donationer från en instans om du har kommersiella intentioner.

    Allt innehåll på sajten publiceras under licensen {instance-license-title}.

    + +

    Varje användare ansvarar för innehållet som de lägger upp. Om du har några betänkligheter +om något som postats på denna instans, hör av dig till användaren i fråga först. Om det +inte hjälper kan du mejla sajtens administratörer.

    From a0bd41d9f71257e373eb16345232b2490551934e Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 8 Feb 2016 11:00:43 +0100 Subject: [PATCH 047/120] no > nb, fixes #11 --- doc/{no => nb}/faq.html | 0 doc/{no => nb}/shortcuts.html | 0 doc/{no => nb}/terms.html | 0 locale/{no.json => nb.json} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename doc/{no => nb}/faq.html (100%) rename doc/{no => nb}/shortcuts.html (100%) rename doc/{no => nb}/terms.html (100%) rename locale/{no.json => nb.json} (100%) diff --git a/doc/no/faq.html b/doc/nb/faq.html similarity index 100% rename from doc/no/faq.html rename to doc/nb/faq.html diff --git a/doc/no/shortcuts.html b/doc/nb/shortcuts.html similarity index 100% rename from doc/no/shortcuts.html rename to doc/nb/shortcuts.html diff --git a/doc/no/terms.html b/doc/nb/terms.html similarity index 100% rename from doc/no/terms.html rename to doc/nb/terms.html diff --git a/locale/no.json b/locale/nb.json similarity index 100% rename from locale/no.json rename to locale/nb.json From 9db1d67fcad105486a6dfe5ee48f6ad9b5cc4ac4 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 8 Feb 2016 11:04:08 +0100 Subject: [PATCH 048/120] nl update --- locale/nl.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/locale/nl.json b/locale/nl.json index 17481ef..3001145 100644 --- a/locale/nl.json +++ b/locale/nl.json @@ -158,17 +158,17 @@ "listSubscribers":"Abonnees", "ERRORcouldNotFindList":"Deze lijst bestaat niet.", "emailAlreadyInUse":"Al in gebruik", - "addEditLanguageLink":"Help translate {site-title} to another language", - "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", - "startRant":"Start a rant", - "continueRant":"Continue the rant", - "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "addEditLanguageLink":"Help {site-title} te vertalen naar een andere taal", + "onlyPartlyTranslated":"{site-title} is slechts gedeeltelijk vertaald in het {language-name} ({percent}%). Je kan helpen de vertaling compleet te maken op Qvitter's repository thuispagina", + "startRant":"Start een tirade", + "continueRant":"Verolg de tirade", + "hideEmbeddedInTimeline":"Verberg ingebedde inhoud in deze tijdlijn", + "hideQuotesInTimeline":"Verberg quotes in deze tijdlijn", + "userBlocks":"Accounts die je blokkeert", + "buttonBlocked":"Geblokkeerd", + "buttonUnblock":"Deblokkeer", + "failedBlockingUser":"Gefaald om de gebruiker te blokkeren.", + "failedUnblockingUser":"Gefaald om de gebruiker te deblokkeren.", + "unblockUser": "Deblokkeer {username}", + "tooltipBlocksYou":"Je wordt geblokkeerd van het volgen van {username}." } From 130febadf753c0d9c108fe85afe65e1a1bbebdc9 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 8 Feb 2016 11:09:09 +0100 Subject: [PATCH 049/120] spanish faq addition by @simsa01@quitter.se --- doc/es/faq.html | 205 ++++++++++++++++++++++++------------------------ 1 file changed, 102 insertions(+), 103 deletions(-) diff --git a/doc/es/faq.html b/doc/es/faq.html index cff53d8..2a272fb 100644 --- a/doc/es/faq.html +++ b/doc/es/faq.html @@ -3,8 +3,8 @@

    Otras «Preguntas frecuentes» y wikis de GNU social (antiguo StatusNet):
    https://wiki.loadaverage.org/gnusocial/begin_to_be_social (en inglés)
    http://wiki.gnusocial.de (en alemán)

    - - + +

    Tabla de contenido

    +

    ¿Qué es {instance-name}? Top

    {instance-name} es uno de muchos nodos de GNU social (antiguo StatusNet).

    {instance-name} es un proyecto que usa el sistema de GNU social combinado con una interfaz gráfica familiar (IGU).

    El original de la IGU de GNU social está disponible como Classic {instance-name} / {instance-name} Clásico; se puede elegir haciendo clic en tu avatar en la cabecera (parte superior derecha).

    - - - - + + + +

    ¿Qué son GNU social (antiguo StatusNet) y la Federación? Top

    GNU social, anteriormente llamado StatusNet, es una plataforma de microblogueo descentralizada.

    @@ -54,33 +54,33 @@

    @{nickname}@{instance-url}

    Si sigues a otro usuario, o el usuario está en la misma instancia que tú, puedes omitir la parte @instancia.org y simplemente utilizar la dirección corta:

    @usuario

    - - - + + +

    Cómo cambiar la imagen de perfil (avatar) Top

    En {instance-name} Nuevo ve a:

    Tu imagen en la cabecera (superior derecha) → Editar perfil → icono de la cámara en la parte superior de tu avatar

    Utiliza las teclas «+» y «-» para acercar y alejar. Recorta la imagen arrastrándola con el ratón.

    - - - - + + + +

    ¿Por qué no puedo encontrar ninguna «aplicación {instance-name}» en Google Play Store o App Store de Apple? Top

    El nombre de la red es «GNU social» (antiguamente «StatusNet»), así que lo que quieres es una aplicación GNU social o StatusNet.

    Recuerda, {instance-name} es sólo una instancia en la federación de GNU social.

    - - - - + + + +

    ¿Qué clientes hay para GNU social/{instance-name}? Top

    Puedes encontrar información sobre los clientes y los enlaces para la descarga aquí:
    http://federation.skilledtests.com/Statusnet_clients.html
    http://wiki.gnusocial.de/gnusocial:clients (en alemán)

    - - + +

    Clientes de Android

    — Andstatus (en desarrollo activo por @andstatus@loadaverage.org)
    tiene una formidable representación de las conversaciones como un árbol jerárquico
    @@ -95,32 +95,32 @@ mensajes de gran tamaño se puedes abrir a través del navegador web

    Zwitscher
    Twydroid (software no libre)
    Algunos clientes de Android para Twitter (es posible que características como el envío de Mensajes Directos o carga de imágenes no funcionen).

    - - + +

    Clientes de iPhone

    Neustatus
    Mayo, Mayonnaise
    Meteoric (software no libre, tiene bugs)

    - - + +

    Clientes de Windows

    Tweetdeck 0.38-2 (software no libre) (última versión antes de Twitter se hizo cargo de TweetDeck) es adecuado para las funciones básicas.
    Descarga: http://www.oldversion.com/windows/download/tweetdeck-0-38-2
    Instrucciones: http://qttr.at/dmm, http://qttr.at/dmn
    Qwit (Descarga: https://code.google.com/p/qwit/)
    Clientes de Twitter (características como el envío de Mensajes Directos o carga de imágenes no funcionan)

    - - + +

    Clientes de Mac OSX

    Tweetdeck 0.38-2 (software no libre) Descarga: http://www.oldversion.com/mac/tweetdeck/ Instrucciones: véase más arriba.

    - +

    Clientes de GNU/Linux

    Choqok
    Hotot (utiliza 0.9.7.32, esa es la versión que viene con Debian Wheezy)
    Heybuddy
    — más: http://federation.skilledtests.com/Statusnet_clients.html

    - - + +

    ¿Dónde está el acortador de URL? Top

    En {instance-name} Nuevo:

    @@ -133,9 +133,9 @@ En {instance-name} Clásico:

    - URL más largo que 30
    - Texto más largo que 139
    Captura de pantalla: https://quitter.se/attachment/710078

    - - - + + +

    Cómo establecer preferencias de correo electrónico Top

    En {instance-name} Nuevo ve a:

    @@ -146,20 +146,20 @@ Captura de pantalla: https://quit - Envíame un correo electrónico cuando alguien me envía un mensaje privado.
    - Envíame un correo electrónico cuando alguien me envía un «@-reply».
    - Permite a los amigos que me empujan y envíame un correo electrónico.

    - - - - + + + +

    {instance-name} Nuevo y {instance-name} Clásico Top

    {instance-name} Nuevo es la interfaz de usuario predeterminada. Visualmente es muy similar a otros servicios de microblogueo comerciales bien conocidos. Su nombre técnico es «Qvitter». En las discusiones, «Qvitter» y «{instance-name} Nuevo» pueden significar la misma cosa, pero «Qvitter» se refiere principalmente al software y «{instance-name} Nuevo» se refiere a la instalación del software Qvitter en {instance-name}.

    {instance-name} Clásico usa la interfaz canónica de GNU social/StatusNet. En este momento algunos ajustes y características (p.ej., la creación de un grupo) tienen que hacerse en {instance-name} Clásico porque no están implementados en {instance-name} Nuevo.

    Para cambiar al {instance-name} Clásico ve a:

    Tu imagen en la cabecera (superior derecha) → Classic {instance-name}

    - - - - + + + +

    ¿Qué son esas tres líneas temporales de {instance-name} Nuevo? Top

    Hay tres líneas temporales que muestran noticias diferentes (según sus fuentes): @@ -169,10 +169,10 @@ Todas noticias de las personas que sigues (no sólo las que mandan a la gente cu Todas noticias publicadas por cuentas de tu servidor {instance-name}.

    Toda la red conocida:
    No sólo todas publicaciones de la Línea temporal pública, sino también todas las de la gente en todas otras instancias de la federación de GNU social/StatusNet que son seguidas por al menos un usuario de tu servidor {instance-name} (es decir, las cuentas conocidas por {instance-name}, véase más arriba ¿Qué es la Federación?).

    - - - - + + + +

    Cómo gestionar las solicitudes de seguidores Top

    Generalmente quieres mantener la configuración predeterminada:

    @@ -181,19 +181,19 @@ No sólo todas publicaciones de la Línea temporal pública, sino también todas

    Si deseas cambiar esta configuración de {instance-name} Nuevo ve a:

    Tu imagen en la cabecera (superior derecha) → Configuración → Perfil

    (1): Cambia a "Pregúntame primero" y recibirás una notificación por correo electrónico cuando alguien quiera seguirte. Deja la solicitud de suscripción a la espera hasta que la confirmes o rechaces. (Pero esto todavía no funciona en {instance-name} Nuevo, así que ten cuidado con este ajuste.)

    - - - - + + + +

    ¿Puedo borrar mi cuenta de {instance-name}? Top

    Puedes borrar tu cuenta, pero todas tus publicaciones se borrarán de {instance-name} también — y esto romperá hilos de conversación. Si restauras tu cuenta en otra instancia, es mejor cambiar el nombre de tu cuenta de {instance-name} a algo como "MiCuentaSeCambióAFragdev" en lugar de eliminarla.

    Para borrar tu cuenta ve a:

    Tu imagen en la cabecera (superior derecha) → Configuración → Perfil → Eliminar cuenta (caja derecha)

    - - - - + + + +

    Cómo conectar tu cuenta de {instance-name} con tu cuenta de Twitter Top

    Puedes enviar tus notificaciones a Twitter.

    @@ -201,10 +201,10 @@ No sólo todas publicaciones de la Línea temporal pública, sino también todas

    Tu imagen en la cabecera (superior derecha) → Configuración → Twitter

    Se te remite a Twitter y tienes que autorizar {instance-name} para utilizar tu cuenta de Twitter.

    Según informes de usuarios esto no siempre funciona en primera o segunda vez. En este caso, vuelve a intentarlo otra vez más tarde. La causa del problema puede estar del lado de Twitter. Tu navegador no debe bloquear JavaScript o Cookies.

    - - - - + + + +

    Cómo escribir Mensajes Directos Top

    En el momento de redactar esto, los Mensajes Directos sólo se admiten en {instance-name} Clásico (Mensajes en el menú de la izquierda).

    @@ -213,26 +213,26 @@ No sólo todas publicaciones de la Línea temporal pública, sino también todas

    Nota:
    - Enviar MDs sólo funciona dentro de la misma instancia ({instance-name} en este caso)
    - Para enviar MDs es necesario que os sigáis ambos mutuamente

    - - - - + + + +

    Favoritos y Repeticiones/Requeets Top

    En las tres líneas temporales puedes hacer clic en una noticia para expandirla y ver quién la ha marcado como favorita o repetido.

    (Puedes configurar Notificaciones de Correo Electrónico para que te notifique cuando tus notas han sido marcada como favorita).

    Favs y Repeticiones/Requeets se parecen a esto en {instance-name} Nuevo: http://qttr.at/du6 y a esto en {instance-name} Clásico: http://qttr.at/du5

    - - - - + + + +

    ¿Qué significa la opción «Mis amigos en {instance-name}»? Top

    En {instance-name} Clásico hay una opción para enviar noticias a «Mis amigos en {instance-name}». Esta opción impide que tu noticia se envíe a toda la federación. Solamente será visible sólo para tus seguidores en {instance-name}.

    - - - - + + + +

    Grupos Top

    Grupos públicos

    @@ -244,27 +244,27 @@ No sólo todas publicaciones de la Línea temporal pública, sino también todas http://www.skilledtests.com/wiki/List_of_federated_Statusnet_groups

    Para crear un grupo ve a:

    {instance-url-with-protocol}groups → Crear grupo nuevo

    - - + +

    Grupos privados

    Un administrador de grupo tiene la opción declararlo privado. Esto significa que:

    1) los miembros nuevos deben ser aprobados por el administrador/los administradores, y

    2) todas las noticias son privadas.

    Es decir, las noticias del grupo son visibles solamente a los miembros del grupo (no aparecen en la Línea temporal pública tampoco), y no es posible para usuarios de otras instancias ser miembro de un grupo privado en {instance-name}.

    - - - - + + + +

    Listas Top

    Las listas están disponibles sólo en {instance-name} Clásico. Debido a fusiones de características en GNU social las listas funcionan, pero son un poco desordenadas de gestionar.

    - +

    Crear listas

    El obstáculo principal con listas en {instance-name} es crear una nueva. Después de su creación puedes gestionarla y añadir personas de {instance-name} y de las instancias remotas en la página de la lista (véase más adelante).

    Para iniciar una lista en {instance-name} Clásico lo mejor es navegar a través de las listas de suscripción —«Siguiendo» y «Seguidores»— de alguien que tiene una cuenta en {instance-name}, no en una instancia remota. En el último caso, no puedes agregar personas de sus listas de suscripción a tu lista, es decir, crear una lista global.

    En ambas listas de suscripción —«Siguiendo» y «Seguidores»— encontrarás debajo de cada persona una pequeña caja con un símbolo de editar. Como aparecen en estas listas, no es problemático si tienen su cuenta en {instance-name} o en una instancia remota. Haz clic en ese símbolo y escribe el nombre de tu lista. Recibirás un mensaje de error, pero no importa, simplemente haz clic en «ok» y actualiza la página. La lista se ha creado con éxito y ahora se muestra en la columna a la izquierda.

    - - + +

    Gestionar las listas

    Para gestionar tu lista, ve a {instance-name} Clásico y abre la lista haciendo clic en su nombre en la columna a la izquierda. En su página, haz clic en «Editar» y se abre un menú.

    En la parte inferior —«Agregar o quitar a la gente»— puedes buscar cada persona conocida por {instance-name} desde la Toda la red conocida (véase arriba ¿Qué es la Federación?) por su nombre y añadirla a la lista. (Esto no es posible antes de la creación de la lista cuando la persona solamente aparece en las listas de suscripción de personas en instancias remotas. Véase más arriba). Asimismo, puedes quitar aquí a la persona de la lista.

    @@ -278,29 +278,30 @@ No sólo todas publicaciones de la Línea temporal pública, sino también todas

    "Deleting this tag will permanantly remove all its subscription and membership records. Do you still want to continue?" Yes / No

    Que significa: «Eliminar esta etiqueta supone borrar permanentemente todas sus suscripciones e interacciones. ¿Quieres continuar?» Sí / No

    Selecciona «Sí» ("Yes"), lo que te redirecciona a la línea temporal Inicio. Pincha en tu Perfil y la lista se habrá ido y tampoco se podrá encontrar en tus listas.

    - - - + + +

    Cómo bloquear Top

    Para bloquear a un usuario de {instance-name} donde tienes tu cuenta, ve a su perfil en {instance-name} Clásico

    {instance-url-with-protocol}<nombre de usuario>

    y haz clic en «Bloquear» por debajo de su descripción de perfil.

    No recomendamos el bloqueo de la gente de otros servidores de GNU social en general porque todavía hay problemas con esta característica.

    - - - - + + + +

    Cómo seguir a alguien de otro nodo/servidor Top

    En {instance-name} Nuevo:

    Al hacer clic en {instance-name} Nuevo en el apodo del usuario de una instancia remota eres llevado a una pequeña ventana de perfil que muestra la dirección remota completa, p.ej., @blabla@status.vinilox.eu. Haz clic en el botón «Seguir». Eso debería ser todo.

    En {instance-name} Clásico:

    En {instance-name} Clásico eres reenviado al perfil del usuario en la instancia remota (que puede diferir en el diseño y tema de {instance-name} Clásico). Busca el botón «Seguir» / «Suscribirse» (por lo general en la parte superior derecha). Una caja de la suscripción se abre y se te pide que introduzcas tu propia "dirección webfinger", es decir, {nickname}@{instance-url}. Suscríbete y se te redirigirá a tu página de {instance-name} Clásica donde tienes que confirmar la suscripción.

    - - - - +

    Manualmente:

    +

    En caso de que sepas el apodo del usuario y el nombre de la instancia remota, puedes iniciar el proceso de seguir a alguien de otro nodo por visitar {instance-url-with-protocol}/main/ostatussub.

    + + +

    Cómo gestionar la visibilidad de tus publicaciones Top

    Hay varias maneras de hacer noticias visibles solamente a personas seleccionadas, no al público. Ninguno de ellos funciona en {instance-name} Nueva todavía.

    @@ -313,9 +314,9 @@ No sólo todas publicaciones de la Línea temporal pública, sino también todas

    d. Envía el aviso a un grupo público y cierra la cerradura a la derecha del menú desplegable bajo el campo del mensaje. La noticia será visible solamente para los miembros del grupo. (Aunque en el momento de redactar esto no funciona en {instance-name}. El mensaje será visible a todos.)

    (Nota a d: Asegúrate de no dejar «Todos» o «Mis colegas en {instance-name}» seleccionado, o de lo contrario tu mensaje irá a las líneas temporales de cada usuario de {instance-name}, que no es lo que quieres si cierras la cerradura)

    (Nota a d: El método de cerradura solamente está disponible en {instance-name} Clásico. No hay ninguna característica de cerradura en {instance-name} Nuevo o cualquier otro cliente conocido en el momento de redactar.)

    - - - + + +

    Cómo citar conversaciones o partes de ellas Top

    A veces, en un blog o correo electrónico, no quieres citar solamente una noticia, sino toda la conversación. Cada noticia, cada respuesta, y cada conversación tiene su propia URL, y las maneras de encontrarlas difieren ligeramente en {instance-name} Clásico y en {instance-name} Nuevo.

    @@ -323,10 +324,10 @@ No sólo todas publicaciones de la Línea temporal pública, sino también todas

    Haz clic en la fecha de una noticia (o «Detalles» si la has expandido). Esto muestra la página de la noticia con la conversación expandida.

    En {instance-name} Clásico:

    Haz clic en la fecha de cualquier noticia. El mensaje reaparece en una página separada. Haz clic en «En contexto». Toda la conversación en la que esta noticia es involucrado es mostrado en una nueva página, con la noticia seleccionada en la parte superior o más abajo.

    - - - - + + + +

    Cómo seguir frases de búsqueda y etiquetas (hashtags) Top

    Similar al suscribirse a las personas o grupos puedes suscribirte a (o: seguir) etiquetas (hashtags) y frases de búsqueda. Las noticias que contienen estos aparecerán entonces en tu Línea temporal («Inicio»).

    @@ -338,16 +339,14 @@ No sólo todas publicaciones de la Línea temporal pública, sino también todas hashtags: {instance-url-with-protocol}{nickname}/tag-subscriptions
    palabras y frases de búsqueda: {instance-url-with-protocol}{nickname}/search-subscriptions

    En esas páginas puedes gestionar sus suscripciones, es decir, añadir más frases y etiquetas o dejar de seguirlos.

    - - - - + + + +

    ¿Por qué mi Repetición/Requeet no aparece en otros nodos? Top

    En las últimas versiones de GNU social, las Repeticiones/Requeets no son enviadas a tus seguidores en nodos remotos. Esto fue posible en StatusNet hace algún tiempo, pero esta característica se ha eliminado debido a un problema de seguridad. Los desarrolladores de GNU social están trabajando en una solución. Mientras tanto, si quieres que tu Repetición/Requeet se envíe a otros nodos, puedes hacer una «repetición manual», es decir, escribe RQ @<nombre de usuario> y copia y pega la noticia en esta nueva.

    - - + +

    Traducción del inglés al español por @simsa01@quitter.se. Revisión de @moshpirit@quitter.es, @larjona@quitter.se y @efedoso@quitter.no. (2015)

    El original en inglés fue elaborado en 2014 por @simsa01@quitter.se y @mcscx@quitter.se.

    - - From d2a81a6f9c45f9afd3a2df3bd5fc05ce8711fcfa Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 8 Feb 2016 11:12:48 +0100 Subject: [PATCH 050/120] pt_br update by @alexivanov --- locale/pt_br.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/locale/pt_br.json b/locale/pt_br.json index 58cff8b..568b41e 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -105,7 +105,7 @@ "registerLocation": "Localização", "registerRepeatPassword": "Repetir senha", "moreSettings": "Mais configurações", - "otherServers": "De manera alternativa, você pode criar uma conta em outro servidor da rede GNU social. Comparativo", + "otherServers": "De maneira alternativa, você pode criar uma conta em outro servidor da rede GNU social. Comparativo", "editMyProfile": "Editar perfil", "notifications": "Notificações", "xFavedYourQueet": "curtiu seu Queet", @@ -120,26 +120,26 @@ "ellipsisMore": "Mais", "blockUser": "Bloquear {username}", "goToOriginalNotice": "Ir para aviso original", - "goToTheUsersRemoteProfile": "Ir para o profile do usuário", + "goToTheUsersRemoteProfile": "Ir para o perfil do usuário", "clickToDrag":"Clique para arrastar", - "keyboardShortcuts":"Atalhos de teclado", + "keyboardShortcuts":"Atalhos do teclado", "classicInterface":"Interface clássica {site-title}", "accessibilityToggleLink":"Para melhor acessibilidade, clique nesse link para substituir para a interface clássica", "tooltipBookmarkStream":"Adicione esse stream para seu marcador", "tooltipTopMenu":"Menu e configurações", "tooltipAttachImage":"Anexar uma imagem", - "tooltipShortenUrls":"Todas URLs curtas no Queet", + "tooltipShortenUrls":"Encurtar todas as URLs no Queet", "tooltipReloadStream":"Atualizar esse stream", "tooltipRemoveBookmark":"Remover esse marcador", "clearHistory":"Limpar histórico de navegação", - "ERRORsomethingWentWrong":"Alguma coisa errada aconteceu.", + "ERRORsomethingWentWrong":"Algo de errado aconteceu.", "ERRORmustBeLoggedIn":"Você deve estar logado para ver esse stream.", - "ERRORcouldNotFindUserWithNickname":"Não pôde encontrar um usuário com este nickname \"{nickname}\" sobre esse servidor", - "ERRORcouldNotFindGroupWithNickname":"Não pôde encontrar um grupo com este nome \"{nickname}\" sobre esse servidor", - "ERRORcouldNotFindPage":"Não pôde encontrar aquela página.", + "ERRORcouldNotFindUserWithNickname":"Não foi possível encontrar um usuário com este apelido \"{nickname}\" neste servidor", + "ERRORcouldNotFindGroupWithNickname":"Não foi possível encontrar um grupo com este nome \"{nickname}\" neste servidor", + "ERRORcouldNotFindPage":"Não foi possível encontrar aquela página.", "ERRORnoticeRemoved": "Este aviso foi removido.", - "ERRORnoContactWithServer": "Não pôde estabelecer uma conexão para o servidor. O servidor poderia estar sobrecarregado, ou poderia ser um problema com sua conexão de internet. Por favor tente novamente mais tarde!", - "ERRORattachmentUploadFailed": "O upload falhou. O formato poderia não ser suportado ou o tamanho é muito grande.", + "ERRORnoContactWithServer": "Não foi possível estabelecer uma conexão com o servidor. O servidor pode estar sobrecarregado, ou pode ser um problema com sua conexão de internet. Por favor tente novamente mais tarde!", + "ERRORattachmentUploadFailed": "O upload falhou. O formato pode não ser suportado ou o tamanho é muito grande.", "hideRepliesToPeopleIDoNotFollow":"Ocultar respostas para pessoas que eu não sigo", "markAllNotificationsAsSeen":"Marcar todas notificações como vistas", "notifyRepliesAndMentions":"Menções e respostas", @@ -147,28 +147,28 @@ "notifyRepeats":"Requeets", "notifyFollows":"Novos seguidores", "timelineOptions":"Opções de linha do tempo", - "ERRORfailedSavingYourSetting":"Houve falha ao salvar suas configurações", - "ERRORfailedMarkingAllNotificationsAsRead":"Houve falha ao marcar todas notificações como vistas.", + "ERRORfailedSavingYourSetting":"Falha ao salvar suas configurações", + "ERRORfailedMarkingAllNotificationsAsRead":"Falha ao marcar todas notificações como vistas.", "newNotification": "{new-notice-count} nova notificação", "newNotifications": "{new-notice-count} novas notificações", - "thisIsANoticeFromABlockedUser":"Advertência: Esta é um aviso de um usuário você bloqueou. Clique para mostrar isto.", + "thisIsANoticeFromABlockedUser":"Aviso: Este é um aviso de um usuário você bloqueou. Clique para mostrá-lo.", "nicknamesListWithListName":"Lista de {nickname}: {list-name}", "myListWithListName":"Minha lista: {list-name}", "listMembers":"Membros", "listSubscribers":"Assinantes", "ERRORcouldNotFindList":"Não existe tal lista.", - "emailAlreadyInUse":"Já em uso", + "emailAlreadyInUse":"Em uso", "addEditLanguageLink":"Ajude a traduzir {site-title} para outro idioma", "onlyPartlyTranslated":"{site-title} está somente parcialmente traduzido para {language-name} ({percent}%). Você pode ajudar a completar a tradução na página principal de repositório do Qvitter", "startRant":"Iniciar um debate", "continueRant":"Continuar o debate", "hideEmbeddedInTimeline":"Ocultar conteúdo incorporado nessa linha do tempo", "hideQuotesInTimeline":"Ocultar citações nesta linha do tempo", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "userBlocks":"Contas bloqueadas", + "buttonBlocked":"Bloqueado", + "buttonUnblock":"Desbloquear", + "failedBlockingUser":"Falha ao bloquear usuário.", + "failedUnblockingUser":"Falha ao desbloquear usuário.", + "unblockUser": "Desbloquear {username}", + "tooltipBlocksYou":"Você está impedido de seguir {username}." } From 2baf5bde079e9ac7c79237aa246b10b60def930e Mon Sep 17 00:00:00 2001 From: Alexandre Oliveira Date: Mon, 8 Feb 2016 23:49:28 -0200 Subject: [PATCH 051/120] Fix pt_br translation --- locale/pt_br.json | 78 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/locale/pt_br.json b/locale/pt_br.json index 568b41e..204ac11 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -1,17 +1,17 @@ { "directionality":"ltr", - "languageName": "Português-Brasil", + "languageName": "Português (Brasil)", "loginUsername": "Nome de usuário ou e-mail", "loginPassword": "Senha", "loginSignIn": "Entrar", - "loginRememberMe": "Lembrar meu login", + "loginRememberMe": "Lembrar-me", "loginForgotPassword": "Esqueceu sua senha?", - "notices": "Queets", + "notices": "Avisos", "followers": "Seguidores", "following": "Seguindo", "groups": "Grupos", "compose": "Escrever um novo Queet...", - "queetVerb": "Quittear", + "queetVerb": "Queetear", "queetsNounPlural": "Queets", "logout": "Sair", "languageSelected": "Idioma:", @@ -21,12 +21,12 @@ "details": "Detalhes", "expandFullConversation": "Expandir toda a conversa", "replyVerb": "Responder", - "requeetVerb": "Requittear", + "requeetVerb": "Requeetear", "favoriteVerb": "Favorito", - "requeetedVerb": "Requitteado", + "requeetedVerb": "Requeeteado", "favoritedVerb": "Marcado como favorito", "replyTo": "Responder para", - "requeetedBy": "Requitteado por {requeeted-by}", + "requeetedBy": "Requeeteado por {requeeted-by}", "favoriteNoun": "Favorito", "favoritesNoun": "Favoritos", "requeetNoun": "Requeet", @@ -53,18 +53,18 @@ "shortmonthsJune": "jun", "shortmonthsJuly": "jul", "shortmonthsAugust": "ago", - "shortmonthsSeptember": "selint", + "shortmonthsSeptember": "set", "shortmonthsOctober": "out", "shortmonthsNovember": "nov", "shortmonthsDecember": "dez", "time12am": "{time} AM", "time12pm": "{time} PM", - "longDateFormat": "{time24} - {day} {month} {year}", - "shortDateFormatSeconds": "{seconds}s", - "shortDateFormatMinutes": "{minutes}min", - "shortDateFormatHours": "{hours}h", - "shortDateFormatDate": "{day} {month}", - "shortDateFormatDateAndY": "{day} {month} {year}", + "longDateFormat": "{time24} - {day} de {month} de {year}", + "shortDateFormatSeconds": "{seconds} s", + "shortDateFormatMinutes": "{minutes} min", + "shortDateFormatHours": "{hours} h", + "shortDateFormatDate": "{day} de {month}", + "shortDateFormatDateAndY": "{day} de {month} de {year}", "now": "agora", "posting": "publicando", "viewMoreInConvBefore": "← Ver mais na conversa", @@ -72,40 +72,40 @@ "mentions": "Menções", "timeline": "Linha do tempo", "publicTimeline": "Linha do tempo pública", - "publicAndExtTimeline": "Toda a rede conhecida", + "publicAndExtTimeline": "Toda a Rede Conhecida", "searchVerb": "Buscar", "deleteVerb": "Apagar", "cancelVerb": "Cancelar", - "deleteConfirmation": "Tem certeza que quer apagar este queet?", + "deleteConfirmation": "Tem certeza de que deseja apagar este queet?", "userExternalFollow": "Seguir remotamente", - "userExternalFollowHelp": "Identificador de sua conta (ex.: usuario@rainbowdash.net)", + "userExternalFollowHelp": "Identificador da sua conta (ex.: usuario@rainbowdash.net)", "userFollow": "Seguir", "userFollowing": "Seguindo", "userUnfollow": "Deixar de seguir", "joinGroup": "Participar", "joinExternalGroup": "Participar remotamente", "isMemberOfGroup": "Membro", - "leaveGroup": "Deixar", + "leaveGroup": "Sair", "memberCount": "Membros", "adminCount": "Administradores", "settings": "Configurações", - "saveChanges": "Salvar mudanças", - "linkColor": "Cor do link", - "backgroundColor": "Cor de fundo", + "saveChanges": "Salvar alterações", + "linkColor": "Cor dos links", + "backgroundColor": "Cor do plano de fundo", "newToQuitter": "Você é novo no {site-title}?", "signUp": "Registre-se", "signUpFullName": "Nome completo", "signUpEmail": "E-mail", "signUpButtonText": "Registre-se no {site-title}", "welcomeHeading": "Bem-vindo ao {site-title}.", - "welcomeText": "Somos uma
    « Federação » significa que você não deve ter uma conta do {site-title} para seguir seus usuários, ser seguido por eles ou se comunicar com eles. Você pode se registrar em qualquer servidor StatusNet ou GNU social, ou em qualquer serviço utilizando o protocolo OStatus! Também não deve se registrar em qualquer serviço para participar - simplesmente instale o software GNU social em seu próprio servidor. (:
    federação
    de microblogueiros que, como você, estão motivados pela ética e solidaridade, e querem abandonar os serviços centralizados capitalistas. Estamos aqui desde 2010 e sempre vamos ser sem fins lucrativos.", + "welcomeText": "Somos uma
    « Federação » significa que você não precisa ter uma conta do {site-title} para seguir usuários, ser seguido ou comunicar-se com eles. Você pode se registrar em qualquer servidor StatusNet ou GNU social, ou em qualquer serviço utilizando o protocolo OStatus! Você também não precisa se registrar em qualquer serviço para participar - você pode simplesmente instalar o software GNU social em seu próprio servidor. (:
    federação
    de microblogueiros que, como você, somos motivados pela ética e solidariedade, e queremos abandonar os serviços centralizados capitalistas. Estamos aqui desde 2010 e sempre seremos sem fins lucrativos.", "registerNickname": "Nome de usuário", "registerHomepage": "Website", "registerBio": "Biografia", "registerLocation": "Localização", "registerRepeatPassword": "Repetir senha", "moreSettings": "Mais configurações", - "otherServers": "De maneira alternativa, você pode criar uma conta em outro servidor da rede GNU social. Comparativo", + "otherServers": "Alternativamente, você pode criar uma conta em outro servidor da rede GNU social. Comparativo", "editMyProfile": "Editar perfil", "notifications": "Notificações", "xFavedYourQueet": "curtiu seu Queet", @@ -123,35 +123,35 @@ "goToTheUsersRemoteProfile": "Ir para o perfil do usuário", "clickToDrag":"Clique para arrastar", "keyboardShortcuts":"Atalhos do teclado", - "classicInterface":"Interface clássica {site-title}", - "accessibilityToggleLink":"Para melhor acessibilidade, clique nesse link para substituir para a interface clássica", - "tooltipBookmarkStream":"Adicione esse stream para seu marcador", + "classicInterface":"Interface clássica do {site-title}", + "accessibilityToggleLink":"Para melhor acessibilidade, clique neste link para trocar para a interface clássica", + "tooltipBookmarkStream":"Adicione esta stream em seu marcador", "tooltipTopMenu":"Menu e configurações", "tooltipAttachImage":"Anexar uma imagem", "tooltipShortenUrls":"Encurtar todas as URLs no Queet", - "tooltipReloadStream":"Atualizar esse stream", - "tooltipRemoveBookmark":"Remover esse marcador", + "tooltipReloadStream":"Atualizar esta stream", + "tooltipRemoveBookmark":"Remover este marcador", "clearHistory":"Limpar histórico de navegação", "ERRORsomethingWentWrong":"Algo de errado aconteceu.", - "ERRORmustBeLoggedIn":"Você deve estar logado para ver esse stream.", - "ERRORcouldNotFindUserWithNickname":"Não foi possível encontrar um usuário com este apelido \"{nickname}\" neste servidor", - "ERRORcouldNotFindGroupWithNickname":"Não foi possível encontrar um grupo com este nome \"{nickname}\" neste servidor", + "ERRORmustBeLoggedIn":"Você precisa estar logado para visualizar esta stream.", + "ERRORcouldNotFindUserWithNickname":"Não foi possível encontrar um usuário com o apelido \"{nickname}\" neste servidor", + "ERRORcouldNotFindGroupWithNickname":"Não foi possível encontrar um grupo com o nome \"{nickname}\" neste servidor", "ERRORcouldNotFindPage":"Não foi possível encontrar aquela página.", "ERRORnoticeRemoved": "Este aviso foi removido.", - "ERRORnoContactWithServer": "Não foi possível estabelecer uma conexão com o servidor. O servidor pode estar sobrecarregado, ou pode ser um problema com sua conexão de internet. Por favor tente novamente mais tarde!", - "ERRORattachmentUploadFailed": "O upload falhou. O formato pode não ser suportado ou o tamanho é muito grande.", + "ERRORnoContactWithServer": "Não foi possível estabelecer uma conexão com o servidor. O servidor pode estar sobrecarregado, ou pode haver um problema com sua conexão de internet. Por favor tente novamente mais tarde!", + "ERRORattachmentUploadFailed": "O envio falhou. O formato pode não ser suportado ou o tamanho é muito grande.", "hideRepliesToPeopleIDoNotFollow":"Ocultar respostas para pessoas que eu não sigo", "markAllNotificationsAsSeen":"Marcar todas notificações como vistas", "notifyRepliesAndMentions":"Menções e respostas", "notifyFavs":"Favoritos", "notifyRepeats":"Requeets", "notifyFollows":"Novos seguidores", - "timelineOptions":"Opções de linha do tempo", + "timelineOptions":"Opções da linha do tempo", "ERRORfailedSavingYourSetting":"Falha ao salvar suas configurações", "ERRORfailedMarkingAllNotificationsAsRead":"Falha ao marcar todas notificações como vistas.", "newNotification": "{new-notice-count} nova notificação", "newNotifications": "{new-notice-count} novas notificações", - "thisIsANoticeFromABlockedUser":"Aviso: Este é um aviso de um usuário você bloqueou. Clique para mostrá-lo.", + "thisIsANoticeFromABlockedUser":"Aviso: Este é um aviso de um usuário bloqueado por você. Clique para mostrá-lo.", "nicknamesListWithListName":"Lista de {nickname}: {list-name}", "myListWithListName":"Minha lista: {list-name}", "listMembers":"Membros", @@ -159,10 +159,10 @@ "ERRORcouldNotFindList":"Não existe tal lista.", "emailAlreadyInUse":"Em uso", "addEditLanguageLink":"Ajude a traduzir {site-title} para outro idioma", - "onlyPartlyTranslated":"{site-title} está somente parcialmente traduzido para {language-name} ({percent}%). Você pode ajudar a completar a tradução na página principal de repositório do Qvitter", - "startRant":"Iniciar um debate", - "continueRant":"Continuar o debate", - "hideEmbeddedInTimeline":"Ocultar conteúdo incorporado nessa linha do tempo", + "onlyPartlyTranslated":"{site-title} está parcialmente traduzido para {language-name} ({percent}%). Você pode ajudar com a tradução na página do repositório do Qvitter", + "startRant":"Iniciar uma discussão", + "continueRant":"Continuar com a discussão", + "hideEmbeddedInTimeline":"Ocultar conteúdo incorporado nesta linha do tempo", "hideQuotesInTimeline":"Ocultar citações nesta linha do tempo", "userBlocks":"Contas bloqueadas", "buttonBlocked":"Bloqueado", From 14b524f0acbd8b1d71ed85237603154558f7373f Mon Sep 17 00:00:00 2001 From: Mikko Niemikorpi Date: Tue, 9 Feb 2016 19:50:13 +0200 Subject: [PATCH 052/120] Added Finnish translations --- locale/fi.json | 119 +++++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/locale/fi.json b/locale/fi.json index 5f72f35..9d41e01 100644 --- a/locale/fi.json +++ b/locale/fi.json @@ -6,7 +6,7 @@ "loginSignIn": "Kirjaudu sisään", "loginRememberMe": "Muista minut", "loginForgotPassword": "Unohditko salasanan?", - "notices": "Viestit", + "notices": "Ilmoitukset", "followers": "Seuraajat", "following": "Seuratut", "groups": "Ryhmät", @@ -66,7 +66,7 @@ "shortDateFormatDate": "{day}. {month}", "shortDateFormatDateAndY": "{day} {month} {year}", "now": "nyt", - "posting": "[posting]", + "posting": "lähettää", "viewMoreInConvBefore": "Keskustelun aiemmat viestit", "viewMoreInConvAfter": "Keskustelun uudemmat viestit", "mentions": "Maininnat", @@ -105,70 +105,71 @@ "registerLocation": "Sijainti", "registerRepeatPassword": "Kirjoita salasana uudelleen", "moreSettings": "Lisää asetuksia", - "otherServers": "Voit myös luoda tilin toiseen GNU social -verkon palveluun.", + "otherServers": "Voit myös luoda tilin toiseen GNU Social -verkon palveluun.", "editMyProfile": "Muokkaa profiilia", "notifications": "Ilmoitukset", "xFavedYourQueet": "lisäsi viestisi suosikkeihinsa", "xRepeatedYourQueet": "toisti viestisi", "xStartedFollowingYou": "seurasi sinua", "followsYou": "seuraa sinua", - "FAQ": "FAQ", + "FAQ": "UKK", "inviteAFriend": "Kutsu kavereitasi!", "goToExternalProfile": "Siirry täyteen profiiliin", - "cropAndSave": "Crop and save", - "showTerms": "Read our Terms of Use", - "ellipsisMore": "More", - "blockUser": "Block {username}", - "goToOriginalNotice": "Go to original notice", - "goToTheUsersRemoteProfile": "Go to the user's remote profile", - "clickToDrag":"Click to drag", - "keyboardShortcuts":"Keyboard shortcuts", - "classicInterface":"Classic {site-title}", + "cropAndSave": "Rajaa ja tallenna", + "showTerms": "Lue käyttöehtomme", + "ellipsisMore": "Lisää", + "blockUser": "Estä {username}", + "goToOriginalNotice": "Siirry alkuperäiseen ilmoitukseen", + "goToTheUsersRemoteProfile": "Siirry käyttäjän ulkopuoliseen profiiliin", + "clickToDrag":"Klikkaa vetääksesi", + "keyboardShortcuts":"Näppäinoikotiet", + "classicInterface":"Klassinen {site-title}", "accessibilityToggleLink":"For better accessibility, click this link to switch to the classic interface", - "tooltipBookmarkStream":"Add this stream to your bookmarks", - "tooltipTopMenu":"Menu and settings", - "tooltipAttachImage":"Attach an image", - "tooltipShortenUrls":"Shorten all URLs in the Queet", - "tooltipReloadStream":"Refresh this stream", - "tooltipRemoveBookmark":"Remove this bookmark", - "clearHistory":"Clear browsing history", - "ERRORsomethingWentWrong":"Something went wrong.", - "ERRORmustBeLoggedIn":"You must be logged in to view this stream.", - "ERRORcouldNotFindUserWithNickname":"Could not find a user with nickname \"{nickname}\" on this server", - "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", - "ERRORcouldNotFindPage":"Could not find that page.", - "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", - "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large.", - "hideRepliesToPeopleIDoNotFollow":"Hide replies to people I don't follow", - "markAllNotificationsAsSeen":"Mark all notifications as seen", - "notifyRepliesAndMentions":"Mentions and replies", - "notifyFavs":"Favorites", - "notifyRepeats":"Requeets", - "notifyFollows":"New followers", - "timelineOptions":"Timeline options", - "ERRORfailedSavingYourSetting":"Failed saving your setting", - "ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.", - "newNotification": "{new-notice-count} new notification", - "newNotifications": "{new-notice-count} new notifications", - "thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it.", - "nicknamesListWithListName":"{nickname}’s list: {list-name}", - "myListWithListName":"My list: {list-name}", - "listMembers":"Members", - "listSubscribers":"Subscribers", - "ERRORcouldNotFindList":"There is no such list.", - "emailAlreadyInUse":"Already in use", - "addEditLanguageLink":"Help translate {site-title} to another language", - "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", - "startRant":"Start a rant", - "continueRant":"Continue the rant", - "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "accessibilityToggleLink":"Saadaksesi parempaa helppokäyttöisyyttä, klikkaa tätä linkkiä siirtyäksesi klassiseen käyttöliittymään", + "tooltipBookmarkStream":"Lisää tämä virta kirjamerkkeihisi", + "tooltipTopMenu":"Valikko ja asetukset", + "tooltipAttachImage":"Liitä kuva", + "tooltipShortenUrls":"Lyhennä kaikki URLit viestissä", + "tooltipReloadStream":"Päivitä tämä virta", + "tooltipRemoveBookmark":"Poista tämä kirjanmerkki", + "clearHistory":"Tyhjennä selaushistoria", + "ERRORsomethingWentWrong":"Tapahtui jokin virhe.", + "ERRORmustBeLoggedIn":"Sinun tulee kirjautua sisään nähäksesi tämä virta.", + "ERRORcouldNotFindUserWithNickname":"Käyttäjää nimimerkillä \"{nickname}\" ei löytynyt tältä palvelimelta", + "ERRORcouldNotFindGroupWithNickname":"Ryhmää nimellä \"{nickname}\" ei löytynyt tältä palvelimelta", + "ERRORcouldNotFindPage":"Sivua ei löytynyt.", + "ERRORnoticeRemoved": "Tämä ilmoitus on poistettu.", + "ERRORnoContactWithServer": "Yhteyden muodostus palvelimelle ei onnistunut. Palvelimella voi olla ylimääräistä kuormaa tai internet-yhteydessäsi on jokin ongelma. Ole hyvä ja yritä myöhemmin uudelleen.", + "ERRORattachmentUploadFailed": "Lähetys epäoinnistui. Tiedoston tyyppi ei ole tuettu tai koko on liian suuri.", + "hideRepliesToPeopleIDoNotFollow":"Piilota vastaukset henkilöiltä, joita en seuraa.", + "markAllNotificationsAsSeen":"Merkkaa kaikki ilmoitukset nähdyiksi", + "notifyRepliesAndMentions":"Maininnat ja vastaukset", + "notifyFavs":"Suosikit", + "notifyRepeats":"Toistot", + "notifyFollows":"Uudet seuraajat", + "timelineOptions":"Aikajanan asetukset", + "ERRORfailedSavingYourSetting":"Asetuksiesi tallennus epäoinnistui", + "ERRORfailedMarkingAllNotificationsAsRead":"Kaikkien ilmoitusten merkkaus luetuksi epäoinnistui.", + "newNotification": "{new-notice-count} uusi ilmoitus", + "newNotifications": "{new-notice-count} uutta ilmoitusta", + "thisIsANoticeFromABlockedUser":"Varoitus: Tämä on ilmoitus henkilöltä, jonka olet estänyt. Klikkaa nähdäksesi se.", + "nicknamesListWithListName":"{nickname}n lista: {list-name}", + "myListWithListName":"Listani: {list-name}", + "listMembers":"Jäsenet", + "listSubscribers":"Tilaajat", + "ERRORcouldNotFindList":"Tätä listaa ei löytynyt.", + "emailAlreadyInUse":"Osoite on jo käytössä", + "addEditLanguageLink":"Auta kääntämään {site-title} kielellesi", + "onlyPartlyTranslated":"{site-title} on vain osittain käännetty kielelle {language-name} ({percent}%). Auta käännösten viimeistelyssä osoitteessa Qvitterin tietovaraston kotisivu", + "startRant":"Aloita vuodatus", + "continueRant":"Jatka vuodatusta", + "hideEmbeddedInTimeline":"Piilota upotettu sisältö tässä aikajanassa", + "hideQuotesInTimeline":"Piilota lainaukset tässä aikajanassa", + "userBlocks":"Estämäsi tilit", + "buttonBlocked":"Estetty", + "buttonUnblock":"Poista esto", + "failedBlockingUser":"Käyttäjän esto epäoinnistui.", + "failedUnblockingUser":"Eston poisto epäoinnistui.", + "unblockUser": "Poista esto käyttäjältä {username}", + "tooltipBlocksYou":"{username} on estänyt sinut." } From 22559c314ac795cf9fbf588542ebf2a559b17a09 Mon Sep 17 00:00:00 2001 From: Alexandre Oliveira Date: Wed, 10 Feb 2016 11:15:06 -0200 Subject: [PATCH 053/120] Update a few terms on pt_br translation Hopefully this is the last commit until new strings are added. --- locale/pt_br.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/locale/pt_br.json b/locale/pt_br.json index 204ac11..787a5a8 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -6,12 +6,12 @@ "loginSignIn": "Entrar", "loginRememberMe": "Lembrar-me", "loginForgotPassword": "Esqueceu sua senha?", - "notices": "Avisos", + "notices": "Mensagens", "followers": "Seguidores", "following": "Seguindo", "groups": "Grupos", "compose": "Escrever um novo Queet...", - "queetVerb": "Queetear", + "queetVerb": "Queetar", "queetsNounPlural": "Queets", "logout": "Sair", "languageSelected": "Idioma:", @@ -21,12 +21,12 @@ "details": "Detalhes", "expandFullConversation": "Expandir toda a conversa", "replyVerb": "Responder", - "requeetVerb": "Requeetear", + "requeetVerb": "Requeetar", "favoriteVerb": "Favorito", - "requeetedVerb": "Requeeteado", + "requeetedVerb": "Requeetado", "favoritedVerb": "Marcado como favorito", "replyTo": "Responder para", - "requeetedBy": "Requeeteado por {requeeted-by}", + "requeetedBy": "Requeetado por {requeeted-by}", "favoriteNoun": "Favorito", "favoritesNoun": "Favoritos", "requeetNoun": "Requeet", @@ -119,25 +119,25 @@ "showTerms": "Leia nossos Termos de Uso", "ellipsisMore": "Mais", "blockUser": "Bloquear {username}", - "goToOriginalNotice": "Ir para aviso original", + "goToOriginalNotice": "Ir para mensagem original", "goToTheUsersRemoteProfile": "Ir para o perfil do usuário", "clickToDrag":"Clique para arrastar", "keyboardShortcuts":"Atalhos do teclado", "classicInterface":"Interface clássica do {site-title}", "accessibilityToggleLink":"Para melhor acessibilidade, clique neste link para trocar para a interface clássica", - "tooltipBookmarkStream":"Adicione esta stream em seu marcador", + "tooltipBookmarkStream":"Adicione este fluxo aos favoritos", "tooltipTopMenu":"Menu e configurações", "tooltipAttachImage":"Anexar uma imagem", "tooltipShortenUrls":"Encurtar todas as URLs no Queet", - "tooltipReloadStream":"Atualizar esta stream", - "tooltipRemoveBookmark":"Remover este marcador", + "tooltipReloadStream":"Atualizar este fluxo", + "tooltipRemoveBookmark":"Remover este favorito", "clearHistory":"Limpar histórico de navegação", "ERRORsomethingWentWrong":"Algo de errado aconteceu.", - "ERRORmustBeLoggedIn":"Você precisa estar logado para visualizar esta stream.", + "ERRORmustBeLoggedIn":"Você precisa estar logado para visualizar este fluxo.", "ERRORcouldNotFindUserWithNickname":"Não foi possível encontrar um usuário com o apelido \"{nickname}\" neste servidor", "ERRORcouldNotFindGroupWithNickname":"Não foi possível encontrar um grupo com o nome \"{nickname}\" neste servidor", "ERRORcouldNotFindPage":"Não foi possível encontrar aquela página.", - "ERRORnoticeRemoved": "Este aviso foi removido.", + "ERRORnoticeRemoved": "Esta mensagem foi removida.", "ERRORnoContactWithServer": "Não foi possível estabelecer uma conexão com o servidor. O servidor pode estar sobrecarregado, ou pode haver um problema com sua conexão de internet. Por favor tente novamente mais tarde!", "ERRORattachmentUploadFailed": "O envio falhou. O formato pode não ser suportado ou o tamanho é muito grande.", "hideRepliesToPeopleIDoNotFollow":"Ocultar respostas para pessoas que eu não sigo", @@ -151,7 +151,7 @@ "ERRORfailedMarkingAllNotificationsAsRead":"Falha ao marcar todas notificações como vistas.", "newNotification": "{new-notice-count} nova notificação", "newNotifications": "{new-notice-count} novas notificações", - "thisIsANoticeFromABlockedUser":"Aviso: Este é um aviso de um usuário bloqueado por você. Clique para mostrá-lo.", + "thisIsANoticeFromABlockedUser":"Aviso: Esta é uma mensagem de um usuário bloqueado por você. Clique para mostrá-lo.", "nicknamesListWithListName":"Lista de {nickname}: {list-name}", "myListWithListName":"Minha lista: {list-name}", "listMembers":"Membros", @@ -161,7 +161,7 @@ "addEditLanguageLink":"Ajude a traduzir {site-title} para outro idioma", "onlyPartlyTranslated":"{site-title} está parcialmente traduzido para {language-name} ({percent}%). Você pode ajudar com a tradução na página do repositório do Qvitter", "startRant":"Iniciar uma discussão", - "continueRant":"Continuar com a discussão", + "continueRant":"Continuar discussão", "hideEmbeddedInTimeline":"Ocultar conteúdo incorporado nesta linha do tempo", "hideQuotesInTimeline":"Ocultar citações nesta linha do tempo", "userBlocks":"Contas bloqueadas", From 6ebae1f2f0ebbe564eed668d8193846d8b1ed5f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yal=C4=B1n=20Pala?= Date: Thu, 11 Feb 2016 14:56:29 +0200 Subject: [PATCH 054/120] added turkish translation --- locale/tr.json | 174 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 locale/tr.json diff --git a/locale/tr.json b/locale/tr.json new file mode 100644 index 0000000..d5e2fa6 --- /dev/null +++ b/locale/tr.json @@ -0,0 +1,174 @@ +{ + "directionality":"ltr", + "languageName": "Türkçe", + "loginUsername": "Kullanıcı adı veya e-posta", + "loginPassword": "Şifre", + "loginSignIn": "Giriş yap", + "loginRememberMe": "Beni hatırla", + "loginForgotPassword": "Şifreni mi unuttun?", + "notices": "İletiler", + "followers": "Takipçi", + "following": "Takip edilen", + "groups": "Gruplar", + "compose": "Yeni bir ileti oluştur...", + "queetVerb": "Gönder", + "queetsNounPlural": "Bildirimler", + "logout": "Çıkış yap", + "languageSelected": "Dil:", + "viewMyProfilePage": "Profili görüntüle", + "expand": "Genişlet", + "collapse": "Daralt", + "details": "Detaylar", + "expandFullConversation": "Sohbeti genişlet", + "replyVerb": "Yanıtla", + "requeetVerb": "Tekrarla", + "favoriteVerb": "Favori", + "requeetedVerb": "Tekrarlanan", + "favoritedVerb": "Favorilenen", + "replyTo": "Adlı kişiyi yanıtla", + "requeetedBy": "{requeeted-by} tarafından tekrarlanmış", + "favoriteNoun": "Favori", + "favoritesNoun": "Favoriler", + "requeetNoun": "Tekrar", + "requeetsNoun": "Tekrarlar", + "newQueet": "{new-notice-count} yeni bildirim", + "newQueets": "{new-notice-count} yeni bildirimler", + "longmonthsJanuary": "Ocak", + "longmonthsFebruary": "Şubat", + "longmonthsMars": "Mart", + "longmonthsApril": "Nisan", + "longmonthsMay": "Mayıs", + "longmonthsJune": "Haziran", + "longmonthsJuly": "Temmuz", + "longmonthsAugust": "Ağustos", + "longmonthsSeptember": "Eylül", + "longmonthsOctober": "Ekim", + "longmonthsNovember": "Kasım", + "longmonthsDecember": "Aralık", + "shortmonthsJanuary": "oca", + "shortmonthsFebruary": "şub", + "shortmonthsMars": "mar", + "shortmonthsApril": "nis", + "shortmonthsMay": "may", + "shortmonthsJune": "haz", + "shortmonthsJuly": "tem", + "shortmonthsAugust": "ağu", + "shortmonthsSeptember": "eyl", + "shortmonthsOctober": "eki", + "shortmonthsNovember": "kas", + "shortmonthsDecember": "ara", + "time12am": "{time} öö", + "time12pm": "{time} ös", + "longDateFormat": "{time12} - {day} {month} {year}", + "shortDateFormatSeconds": "{seconds}sn", + "shortDateFormatMinutes": "{minutes}dk", + "shortDateFormatHours": "{hours}sa", + "shortDateFormatDate": "{day} {month}", + "shortDateFormatDateAndY": "{day} {month} {year}", + "now": "şimdi", + "posting": "gönderi", + "viewMoreInConvBefore": "← Daha fazla konuşma görüntüle", + "viewMoreInConvAfter": "Daha fazla konuşma görüntüle →", + "mentions": "Bahsedenler", + "timeline": "Zaman akışı", + "publicTimeline": "Herkese açık akış", + "publicAndExtTimeline": "Tüm Ağlardaki Akışlar", + "searchVerb": "Ara", + "deleteVerb": "Sil", + "cancelVerb": "İptal", + "deleteConfirmation": "İletiyi silmek istediğinize emin misiniz?", + "userExternalFollow": "Uzaktan takip", + "userExternalFollowHelp": "Hesap ID (ör. kullanici@rainbowdash.net).", + "userFollow": "Takip et", + "userFollowing": "Takip edilen", + "userUnfollow": "Takibi bırak", + "joinGroup": "Katıl", + "joinExternalGroup": "Uzaktan katıl", + "isMemberOfGroup": "Üye", + "leaveGroup": "Ayrıl", + "memberCount": "Üyeler", + "adminCount": "Yönetici", + "settings": "Ayarlar", + "saveChanges": "Değişiklikleri kaydet", + "linkColor": "Link rengi", + "backgroundColor": "Arka plan rengi", + "newToQuitter": "{site-title}'da yeni misin?", + "signUp": "Kayıt ol", + "signUpFullName": "Ad ve soyad", + "signUpEmail": "Eposta", + "signUpButtonText": "{site-title}'a kaydol", + "welcomeHeading": "{site-title} a hoşgeldin.", + "welcomeText": "We are a
    \"Federation\" means that you don't need a {site-title} account to be able to follow, be followed by or interact with {site-title} users. You can register on any StatusNet or GNU social server or any service based on the the Ostatus protocol! You don't even have to join a service – try installing the lovely GNU social software on your own server! :)
    federation
    of microbloggers who care about ethics and solidarity and want to quit the centralised capitalist services.", + "registerNickname": "Kullanıcı adı", + "registerHomepage": "İnternet Sitesi", + "registerBio": "Kişisel Bilgiler", + "registerLocation": "Konum", + "registerRepeatPassword": "Şifreni tekrar gir", + "moreSettings": "Diğer ayarlar", + "otherServers": "Alternatively you can create an account on another server of the GNU social network. Comparison", + "editMyProfile": "Profili düzenle", + "notifications": "Bildirimler", + "xFavedYourQueet": "Queet'ini favorilerine ekledi", + "xRepeatedYourQueet": "requuetledi", + "xStartedFollowingYou": "Seni takip etti", + "followsYou": "Seni takip edenler", + "FAQ": "SSS", + "inviteAFriend": "Arkadaşlarını davet et!", + "goToExternalProfile": "Tam profile git", + "cropAndSave": "Kırp ve kaydet", + "showTerms": "Kullanım Şartlarını okuyun", + "ellipsisMore": "Daha fazla", + "blockUser": "Engelle {username}", + "goToOriginalNotice": "Orijinal iletiye git", + "goToTheUsersRemoteProfile": "Kullanıcının uzak profiline git", + "clickToDrag":"Sürüklemek için tıklayın", + "keyboardShortcuts":"Kılavye kısayolları", + "classicInterface":"Klasik {site-title}", + "accessibilityToggleLink":"Daha iyi erişilebilirlik için klasik arayüze geçin.", + "tooltipBookmarkStream":"Akışı yer imlerinize ekleyin", + "tooltipTopMenu":"Menü ve ayarlar", + "tooltipAttachImage":"Görüntü ekle", + "tooltipShortenUrls":"Tüm URL'leri kısaltın", + "tooltipReloadStream":"Akışı yenile", + "tooltipRemoveBookmark":"Yer imlerinden kaldır", + "clearHistory":"Arama geçmişini temizle", + "ERRORsomethingWentWrong":"Bir şeyler yanlış gitti.", + "ERRORmustBeLoggedIn":"Bu akışı görmek için giriş yapmalısınız.", + "ERRORcouldNotFindUserWithNickname":"Sunucuda böyle bir kullanıcı adına sahip \"{nickname}\" kullanıcı yok.", + "ERRORcouldNotFindGroupWithNickname":"Sunucuda böyle bir kulanıcı adına sahip \"{nickname}\" grup yok.", + "ERRORcouldNotFindPage":"Sayfayı bulamadım.", + "ERRORnoticeRemoved": "ileti kaldırıldı.", + "ERRORnoContactWithServer": "Sunucuyla bağlantı kurulamıyor. Sunucu aşırı yüklenmiş veya internet bağlantısıyla ilgili bir sorun olabilir. Lütfen daha sonra tekrar deneyin!", + "ERRORattachmentUploadFailed": "Yükleme başarısız oldu. Biçimi desteklenmiyor veya boyutu çok büyük olabilir.", + "hideRepliesToPeopleIDoNotFollow":"Takip etmediğim kullanıcıların cevaplarını gizle", + "markAllNotificationsAsSeen":"Görüldüğü gibi tüm bildirimleri işaretleyin", + "notifyRepliesAndMentions":"Bahsedenler ve cevaplar", + "notifyFavs":"Favoriler", + "notifyRepeats":"Requeets", + "notifyFollows":"Yeni takipçiler", + "timelineOptions":"Akış ayarları", + "ERRORfailedSavingYourSetting":"Ayarlar kaydedilemedi.", + "ERRORfailedMarkingAllNotificationsAsRead":"Tüm bildirimler görüntülenemedi.", + "newNotification": "{new-notice-count} yeni bildirim", + "newNotifications": "{new-notice-count} yeni bildirimler", + "thisIsANoticeFromABlockedUser":"Uyarı: Bu bildirim engellenen bir kullanıcıdan. Görmek için tıklayınız.", + "nicknamesListWithListName":"{nickname} listesi: {list-name}", + "myListWithListName":"Listem: {list-name}", + "listMembers":"Üyeler", + "listSubscribers":"Aboneler", + "ERRORcouldNotFindList":"Böyle bir liste yok.", + "emailAlreadyInUse":"Kullanımda", + "addEditLanguageLink":"{site-title} çevirisine yardım et", + "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", + "startRant":"Konuşmaya başla", + "continueRant":"Konuşmaya devam et", + "hideEmbeddedInTimeline":"Bu akışta gömülü içeriği gizle", + "hideQuotesInTimeline":"Bu akışta alıntıları gizle", + "userBlocks":"Hesabın engellendi", + "buttonBlocked":"Engellenmiş", + "buttonUnblock":"Engeli kaldır", + "failedBlockingUser":"Kullanıcı engellenemedi.", + "failedUnblockingUser":"Kullanıcının engeli kaldırılamadı.", + "unblockUser": "{username} engelini kaldır", + "tooltipBlocksYou":"You are blocked from following {username}." +} \ No newline at end of file From 9eed5c6ed87ae35264a45bdff22e0f2a784213d3 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 11 Feb 2016 14:28:50 +0100 Subject: [PATCH 055/120] sort TWKN by id not created --- classes/PublicAndExternalNoticeStream.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/PublicAndExternalNoticeStream.php b/classes/PublicAndExternalNoticeStream.php index 3e58964..5e85aff 100644 --- a/classes/PublicAndExternalNoticeStream.php +++ b/classes/PublicAndExternalNoticeStream.php @@ -71,8 +71,13 @@ class RawPublicAndExternalNoticeStream extends NoticeStream $notice->whereAdd('is_local !='. Notice::GATEWAY); $notice->whereAdd('repeat_of IS NULL'); - Notice::addWhereSinceId($notice, $since_id); - Notice::addWhereMaxId($notice, $max_id); + if(!empty($max_id) && is_numeric($max_id)) { + $notice->whereAdd('id < '.$max_id); + } + + if(!empty($since_id) && is_numeric($since_id)) { + $notice->whereAdd('id > '.$since_id); + } $ids = array(); From 6023bf8a87de568d355c36300adb436d37c5b253 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 11 Feb 2016 14:29:02 +0100 Subject: [PATCH 056/120] terms fix --- doc/en/terms.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/terms.html b/doc/en/terms.html index 3a32f4e..52599ea 100644 --- a/doc/en/terms.html +++ b/doc/en/terms.html @@ -5,8 +5,8 @@ direction this instance is going, you are free to move to another instance or st You will still be able to follow and be followed (and blocked) by users on this instance.

    In constrast to the top-down authority of commercial social media, this creates a kind -of flat power structure. We are enabled to protect eachother from harassment and opression, -but without censorship.

    +of flat power structure. We are enabled to protect eachother from harassment and oppression, +but without centralized censorship.

    On this instance, users who harass others will be removed. We also take a strong stance against e.g. racism, sexism, ableism, homo- and transphobia. Such expressions make the From 6909aea0ba94c3d8c1611a1bb1dedcff70dbe846 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 11 Feb 2016 14:29:42 +0100 Subject: [PATCH 057/120] follow button for external users directly --- js/dom-functions.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/js/dom-functions.js b/js/dom-functions.js index d7f2cbb..156344f 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -361,21 +361,19 @@ function buildProfileCard(data) { var followButton = ''; - // only add follow button if this is a local user - if(data.is_local == true) { - if(typeof window.loggedIn.screen_name != 'undefined' && window.loggedIn.id != data.id) { - followButton = buildFollowBlockbutton(data); - } + // follow from external instance if logged out and the user is local + if(window.loggedIn === false && data.is_local == true) { + followButton = '

    '; + } - // follow from external instance if logged out - if(typeof window.loggedIn.screen_name == 'undefined') { - followButton = ''; - } + // edit profile button if it's me + else if(window.loggedIn !== false && window.loggedIn.id == data.id) { + followButton = ''; + } - // edit profile button if me - if(typeof window.loggedIn.screen_name != 'undefined' && window.loggedIn.id == data.id) { - followButton = ''; - } + // follow button for logged in users + else if(window.loggedIn !== false) { + followButton = buildFollowBlockbutton(data); } // is webpage empty? From 086991fab8ecb96e8c656c82c74ecdf0f4789f0f Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 11 Feb 2016 14:29:57 +0100 Subject: [PATCH 058/120] custom terms from menu and links --- js/qvitter.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/js/qvitter.js b/js/qvitter.js index 396ebd0..e37e59f 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -1101,11 +1101,16 @@ $('#faq-link').click(function(){ · · · · · · · · · · · · · · */ -$('#tou-link').click(function(){ +$('#tou-link,.tou-link').click(function(){ popUpAction('popup-terms', window.sL.showTerms,'
    ',false); - getDoc('terms',function(termsHtml){ - $('#terms-container').html(termsHtml); - }); + if(window.customTermsOfUse) { + $('#terms-container').html(window.customTermsOfUse); + } + else { + getDoc('terms',function(termsHtml){ + $('#terms-container').html(termsHtml); + }); + } }); From aa828e620c48066d211320a4fece82d56db528a1 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 11 Feb 2016 14:55:27 +0100 Subject: [PATCH 059/120] don't flash the no-javascript message while loading --- css/qvitter.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/css/qvitter.css b/css/qvitter.css index 1552c29..5af7e95 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -201,6 +201,13 @@ body.rtl .discard-error-message { left: 0; width:100%; text-align: center; + opacity:0; + animation: fadein 1s ease forwards 1s; + } + +@keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } } #accessibility-toggle-link { From 2816507545bb7e3da5b0a290692576b8d2ee335f Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 11 Feb 2016 17:48:57 +0100 Subject: [PATCH 060/120] twitter cards and opengraph --- actions/qvitter.php | 50 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/actions/qvitter.php b/actions/qvitter.php index b7edba9..b01cec8 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -174,24 +174,66 @@ class QvitterAction extends ApiAction } } - // oembed discovery for local notices + // oembed discovery for local notices, and twitter cards if(substr($_SERVER['REQUEST_URI'],0,8) == '/notice/' && $this->arg('notice') && array_key_exists('Oembed', StatusNet::getActivePlugins())) { $notice = Notice::getKV('id', $this->arg('notice')); + if($notice instanceof Notice) { - if ($notice->isLocal()) { + $profile = $notice->getProfile(); + if ($notice->isLocal() && $profile instanceof Profile) { + + // maybe get thumbnail url + $embed_thumbnail_url = false; + $attachments = $notice->attachments(); + if (!empty($attachments)) { + foreach ($attachments as $attachment) { + if(is_object($attachment)) { + try { + $thumb = $attachment->getThumbnail(); + } catch (ServerException $e) { + // + } + if(!empty($thumb) && method_exists('File_thumbnail','url')) { + try { + $embed_thumbnail_url = File_thumbnail::url($thumb->filename); + break; // only first one + } catch (ClientException $e) { + // + } + } + } + } + } + try { $notice_url = $notice->getUrl(); - print ''; - print ''; + print ''."\n"; + print ''."\n"; } catch (Exception $e) { // } + + // twitter cards + print ''."\n"; + print ''."\n"; + print ''."\n"; + if($embed_thumbnail_url) { + print ''."\n"; + } + + // opengraph + print ''."\n"; + print ''."\n"; + if($embed_thumbnail_url) { + print ''."\n"; + } } } } + ?> \ From 1e57eba7d1acdfdc3781ad5566ef2727e2d92a25 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 16 Feb 2016 14:37:16 +0100 Subject: [PATCH 075/120] fixes 1) in #33 --- js/misc-functions.js | 14 +++++++------- js/qvitter.js | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/js/misc-functions.js b/js/misc-functions.js index 256da91..81885fd 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -570,12 +570,12 @@ function cacheSyntaxHighlighting() { window.syntaxHighlightingRegexps = Object(); var allDomains = '(abb|abbott|abogado|ac|academy|accenture|accountant|accountants|active|actor|ad|ads|adult|ae|aero|af|afl|ag|agency|ai|aig|airforce|al|allfinanz|alsace|am|amsterdam|an|android|ao|apartments|aq|aquarelle|ar|archi|army|arpa|as|asia|associates|at|attorney|au|auction|audio|auto|autos|aw|ax|axa|az|ba|band|bank|bar|barclaycard|barclays|bargains|bauhaus|bayern|bb|bbc|bbva|bd|be|beer|berlin|best|bf|bg|bh|bi|bible|bid|bike|bingo|bio|biz|bj|bl|black|blackfriday|bloomberg|blue|bm|bmw|bn|bnpparibas|bo|boats|bond|boo|boutique|bq|br|bridgestone|broker|brother|brussels|bs|bt|budapest|build|builders|business|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|camera|camp|cancerresearch|canon|capetown|capital|caravan|cards|care|career|careers|cars|cartier|casa|cash|casino|cat|catering|cbn|cc|cd|center|ceo|cern|cf|cfa|cfd|cg|ch|channel|chat|cheap|chloe|christmas|chrome|church|ci|cisco|citic|city|ck|cl|claims|cleaning|click|clinic|clothing|club|cm|cn|co|coach|codes|coffee|college|cologne|com|community|company|computer|condos|construction|consulting|contractors|cooking|cool|coop|corsica|country|coupons|courses|cr|credit|creditcard|cricket|crs|cruises|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|date|dating|datsun|day|dclk|de|deals|degree|delivery|democrat|dental|dentist|desi|design|dev|diamonds|diet|digital|direct|directory|discount|dj|dk|dm|dnp|do|docs|dog|doha|domains|doosan|download|durban|dvag|dz|earth|eat|ec|edu|education|ee|eg|eh|email|emerck|energy|engineer|engineering|enterprises|epson|equipment|er|erni|es|esq|estate|et|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|fail|faith|fan|fans|farm|fashion|feedback|fi|film|finance|financial|firmdale|fish|fishing|fit|fitness|fj|fk|flights|florist|flowers|flsmidth|fly|fm|fo|foo|football|forex|forsale|foundation|fr|frl|frogans|fund|furniture|futbol|fyi|ga|gal|gallery|garden|gb|gbiz|gd|gdn|ge|gent|gf|gg|ggee|gh|gi|gift|gifts|gives|gl|glass|gle|global|globo|gm|gmail|gmo|gmx|gn|gold|goldpoint|golf|goo|goog|google|gop|gov|gp|gq|gr|graphics|gratis|green|gripe|gs|gt|gu|guge|guide|guitars|guru|gw|gy|hamburg|hangout|haus|healthcare|help|here|hermes|hiphop|hitachi|hiv|hk|hm|hn|hockey|holdings|holiday|homedepot|homes|honda|horse|host|hosting|house|how|hr|ht|hu|ibm|icbc|icu|id|ie|ifm|il|im|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insure|int|international|investments|io|iq|ir|irish|is|it|iwc|java|jcb|je|jetzt|jewelry|jll|jm|jo|jobs|joburg|jp|juegos|kaufen|kddi|ke|kg|kh|ki|kim|kitchen|kiwi|km|kn|koeln|komatsu|kp|kr|krd|kred|kw|ky|kyoto|kz|la|lacaixa|land|lat|latrobe|lawyer|lb|lc|lds|lease|leclerc|legal|lgbt|li|liaison|lidl|life|lighting|limited|limo|link|lk|loan|loans|lol|london|lotte|lotto|love|lr|ls|lt|ltda|lu|lupin|luxe|luxury|lv|ly|ma|madrid|maif|maison|management|mango|market|marketing|markets|marriott|mba|mc|md|me|media|meet|melbourne|meme|memorial|men|menu|mf|mg|mh|miami|mil|mini|mk|ml|mm|mma|mn|mo|mobi|moda|moe|monash|money|montblanc|mormon|mortgage|moscow|motorcycles|mov|movie|mp|mq|mr|ms|mt|mtn|mtpc|mu|museum|mv|mw|mx|my|mz|na|nadex|nagoya|name|navy|nc|ne|nec|net|network|neustar|new|news|nexus|nf|ng|ngo|nhk|ni|nico|ninja|nissan|nl|no|np|nr|nra|nrw|ntt|nu|nyc|nz|okinawa|om|one|ong|onl|online|ooo|org|organic|osaka|otsuka|ovh|pa|page|panerai|paris|partners|parts|party|pe|pf|pg|ph|pharmacy|philips|photo|photography|photos|physio|piaget|pics|pictet|pictures|pink|pizza|pk|pl|place|plumbing|plus|pm|pn|pohl|poker|porn|post|pr|praxi|press|pro|prod|productions|prof|properties|property|ps|pt|pub|pw|py|qa|qpon|quebec|racing|re|realtor|recipes|red|redstone|rehab|reise|reisen|reit|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rich|rio|rip|ro|rocks|rodeo|rs|rsvp|ru|ruhr|run|rw|ryukyu|sa|saarland|sale|samsung|sandvik|sandvikcoromant|sap|sarl|saxo|sb|sc|sca|scb|schmidt|scholarships|school|schule|schwarz|science|scot|sd|se|seat|sener|services|sew|sex|sexy|sg|sh|shiksha|shoes|show|shriram|si|singles|site|sj|sk|ski|sky|sl|sm|sn|sncf|so|soccer|social|software|sohu|solar|solutions|sony|soy|space|spiegel|spreadbetting|sr|ss|st|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swiss|sx|sy|sydney|systems|sz|taipei|tatar|tattoo|tax|taxi|tc|td|team|tech|technology|tel|temasek|tennis|tf|tg|th|thd|theater|tickets|tienda|tips|tires|tirol|tj|tk|tl|tm|tn|to|today|tokyo|tools|top|toray|toshiba|tours|town|toys|tp|tr|trade|trading|training|travel|trust|tt|tui|tv|tw|tz|ua|ug|uk|um|university|uno|uol|us|uy|uz|va|vacations|vc|ve|vegas|ventures|versicherung|vet|vg|vi|viajes|video|villas|vision|vlaanderen|vn|vodka|vote|voting|voto|voyage|vu|wales|walter|wang|watch|webcam|website|wed|wedding|weir|wf|whoswho|wien|wiki|williamhill|win|wme|work|works|world|ws|wtc|wtf|xbox|xerox|xin|测试|परीक्षा|佛山|慈善|集团|在线|한국|ভারত|八卦|موقع|বাংলা|公益|公司|移动|我爱你|москва|испытание|қаз|онлайн|сайт|срб|бел|时尚|테스트|淡马锡|орг|삼성|சிங்கப்பூர்|商标|商店|商城|дети|мкд|טעסט|工行|中文网|中信|中国|中國|娱乐|谷歌|భారత్|ලංකා|測試|ભારત|भारत|آزمایشی|பரிட்சை|网店|संगठन|餐厅|网络|укр|香港|δοκιμή|飞利浦|إختبار|台湾|台灣|手机|мон|الجزائر|عمان|ایران|امارات|بازار|پاکستان|الاردن|بھارت|المغرب|السعودية|سودان|عراق|مليسيا|澳門|政府|شبكة|გე|机构|组织机构|健康|ไทย|سورية|рус|рф|تونس|みんな|グーグル|ελ|世界|ਭਾਰਤ|网址|游戏|vermögensberater|vermögensberatung|企业|信息|مصر|قطر|广东|இலங்கை|இந்தியா|հայ|新加坡|فلسطين|テスト|政务|xxx|xyz|yachts|yandex|ye|yodobashi|yoga|yokohama|youtube|yt|za|zip|zm|zone|zuerich|zw|oracle|xn--1qqw23a|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--55qw42g|xn--55qx5d|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80asehdb|xn--80aswg|xn--90a3ac|xn--90ais|xn--9et52u|xn--b4w605ferd|xn--c1avg|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--estv75g|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--gecrj9c|xn--h2brj9c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1amh|xn--j6w193g|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a4f16a|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgberp4a5d4ar|xn--mgbpl2fh|xn--mgbx4cd0ab|xn--mxtq1m|xn--ngbc5azd|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pgbs0dh|xn--q9jyb4c|xn--qcka1pmc|xn--rhqv96g|xn--s9brj9c|xn--ses554g|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b)'; - window.syntaxHighlightingRegexps.externalMention = XRegExp.cache('(^|\\s|\\.|
    | |\\()(@)[a-zA-Z0-9]+(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); - window.syntaxHighlightingRegexps.mention = /(^|\s|\.|
    | |\()(@)[a-zA-Z0-9]+($|\s|\.|\,|\:|\-|\<|\!|\?|\&|\))/; - window.syntaxHighlightingRegexps.tag = XRegExp.cache('(^|\\s|\\.|
    | |\\()(\\#)[\\p{L}\\p{N}\\-\\.]+($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); - window.syntaxHighlightingRegexps.url = XRegExp.cache('(^|\\s|\\.|
    | |\\()(http\\:\\/\\/|https\:\\/\\/)([\\p{L}\\p{N}\\-\\.]+)?(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); - window.syntaxHighlightingRegexps.urlWithoutProtocol = XRegExp.cache('(^|\\s|\\.|
    | |\\()[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); - window.syntaxHighlightingRegexps.email = XRegExp.cache('(^|\\s|\\.|
    | |\\()([a-zA-Z0-9\\!\\#\\$\\%\\&\\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\.]+)?(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); + window.syntaxHighlightingRegexps.externalMention = XRegExp.cache('(^|\\s|\\.|
    | |\\()(@)[a-zA-Z0-9]+(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); + window.syntaxHighlightingRegexps.mention = /(^|\s|\.|
    | |\()(@)[a-zA-Z0-9]+($|\s|\.|\,|\:|\-|\<|\!|\?|\&|\)|\')/; + window.syntaxHighlightingRegexps.tag = XRegExp.cache('(^|\\s|\\.|
    | |\\()(\\#)[\\p{L}\\p{N}\\-\\.]+($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); + window.syntaxHighlightingRegexps.url = XRegExp.cache('(^|\\s|\\.|
    | |\\()(http\\:\\/\\/|https\:\\/\\/)([\\p{L}\\p{N}\\-\\.]+)?(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); + window.syntaxHighlightingRegexps.urlWithoutProtocol = XRegExp.cache('(^|\\s|\\.|
    | |\\()[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); + window.syntaxHighlightingRegexps.email = XRegExp.cache('(^|\\s|\\.|
    | |\\()([a-zA-Z0-9\\!\\#\\$\\%\\&\\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\.]+)?(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); cacheSyntaxHighlightingGroups(); } @@ -588,7 +588,7 @@ function cacheSyntaxHighlighting() { function cacheSyntaxHighlightingGroups() { if(window.groupNicknamesAndLocalAliases.length > 0) { var allGroupNicknamesAndLocalAliases = '(' + window.groupNicknamesAndLocalAliases.join('|') + ')'; - window.syntaxHighlightingRegexps.group = XRegExp.cache('(^|\\s|\\.|
    | |\\()(\\!)' + allGroupNicknamesAndLocalAliases + '($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\))'); + window.syntaxHighlightingRegexps.group = XRegExp.cache('(^|\\s|\\.|
    | |\\()(\\!)' + allGroupNicknamesAndLocalAliases + '($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); } } diff --git a/js/qvitter.js b/js/qvitter.js index f70782e..eabb09f 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -2962,7 +2962,8 @@ $('body').on('keyup paste input', 'div.queet-box-syntax', function() { || currentMatch[0].slice(-1) == ':' || currentMatch[0].slice(-1) == '.' || currentMatch[0].slice(-1) == ',' - || currentMatch[0].slice(-1) == ')') { + || currentMatch[0].slice(-1) == ')' + || currentMatch[0].slice(-1) == '\'') { currentMatch[0] = currentMatch[0].slice(0,-1); } From 4be6c25996d2cce7b7d0e10b5eed9f04900d313d Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 16 Feb 2016 19:20:20 +0100 Subject: [PATCH 076/120] use attentions for building reply strings and reply-to elements --- QvitterPlugin.php | 22 ++++++++++++++++-- js/dom-functions.js | 55 ++++++++++++++++++++++++++------------------ js/misc-functions.js | 10 ++++++++ 3 files changed, 63 insertions(+), 24 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index b4df80e..b940941 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -703,13 +703,31 @@ class QvitterPlugin extends Plugin { // reply-to profile url try { $reply = $notice->getParent(); - $twitter_status['in_reply_to_profileurl'] = $reply->getProfile()->getUrl(); - $twitter_status['in_reply_to_ostatus_uri'] = $reply->getProfile()->getUri(); + $reply_profile = $reply->getProfile(); + $twitter_status['in_reply_to_profileurl'] = $reply_profile->getUrl(); + $twitter_status['in_reply_to_ostatus_uri'] = $reply_profile->getUri(); } catch (ServerException $e) { $twitter_status['in_reply_to_profileurl'] = null; $twitter_status['in_reply_to_ostatus_uri'] = null; } + // attentions + try { + $attentions = $notice->getAttentionProfiles(); + $attentions_array = array(); + foreach ($attentions as $attn) { + $attentions_array[] = array( + 'id' => $attn->getID(), + 'screen_name' => $attn->getNickname(), + 'fullname' => $attn->getStreamName(), + 'profileurl' => $attn->getUrl(), + 'ostatus_uri' => $attn->getUri(), + ); + } + $twitter_status['attentions'] = $attentions_array; + } catch (Exception $e) { + // + } // fave number $faves = Fave::byNotice($notice); diff --git a/js/dom-functions.js b/js/dom-functions.js index c20d494..1be4b06 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -1338,32 +1338,33 @@ function replyFormHtml(streamItem,qid) { // object with ostatus-uri as key to avoid duplicates var screenNamesToAdd = {}; - // add the screen name to the one we're replying to (if it's not me) + // we don't trust attentions to be in the right order, so always add the + // screen name to the one we're replying to first (if it's not me) if(!thisIsALinkToMyProfile(streamItem.attr('data-user-profile-url'))) { screenNamesToAdd[streamItem.attr('data-user-ostatus-uri')] = streamItem.attr('data-user-screen-name'); } - // add the screen name to the one who the one we're replying to is replying to - // (if it's not me, and not if the author is replying to themselves) - if(q.find('i.addressees > span.reply-to').length > 0 - && !thisIsALinkToMyProfile(streamItem.attr('data-in-reply-to-profile-url')) - && streamItem.attr('data-in-reply-to-profile-ostatus-uri') != streamItem.attr('data-user-ostatus-uri')) { - screenNamesToAdd[streamItem.attr('data-in-reply-to-profile-ostatus-uri')] = streamItem.attr('data-in-reply-to-screen-name'); - } - - // get all other mentions (if it's not me, or reply-to user or reply-to-reply-to user - // because gnusocial in not consistent in which url it supplies in the mentions links - // we have to check both uri and profileurl - $.each(q.find('.queet-text').find('.mention'),function(key,obj){ - if(!thisIsALinkToMyProfile($(obj).attr('href')) - && $(obj).attr('href') != streamItem.attr('data-in-reply-to-profile-ostatus-uri') - && $(obj).attr('href') != streamItem.attr('data-in-reply-to-profile-url') - && $(obj).attr('href') != streamItem.attr('data-user-profile-url') - && $(obj).attr('href') != streamItem.attr('data-user-ostatus-uri')) { - var thisMention = $(obj).html().replace('@',''); - screenNamesToAdd[$(obj).attr('href')] = thisMention; + // add the rest of the attentions (not me) + if(q.children('script.attentions-json').length > 0 + && q.children('script.attentions-json').text() != 'undefined') { + try { + var attentionsParsed = JSON.parse(q.children('script.attentions-json').text()); } - }); + catch(e) { + var attentionsParsed = false; + console.log('could not parse attentions json: ' + e); + console.log("attentions-json: " + q.children('script.attentions-json').text()); + } + + if(attentionsParsed !== false) { + $.each(attentionsParsed, function() { + if(!thisIsALinkToMyProfile(this.profileurl) + && typeof screenNamesToAdd[this.ostatus_uri] == 'undefined') { + screenNamesToAdd[this.ostatus_uri] = this.screen_name; + } + }); + } + } // build reply/rant strings var repliesText = ''; @@ -2039,7 +2040,16 @@ function buildQueetHtml(obj, idInStream, extraClasses, requeeted_by, isConversat if(obj.in_reply_to_screen_name !== null && obj.in_reply_to_profileurl !== null && obj.in_reply_to_profileurl != obj.user.statusnet_profile_url) { - reply_to_html = '@' + obj.in_reply_to_screen_name + ' '; + var replyToProfileurl = obj.in_reply_to_profileurl; + var replyToScreenName = obj.in_reply_to_screen_name; + } + // if we don't have a reply-to, we might have attentions, in that case use the first one as reply + else if(typeof obj.attentions != 'undefined' && typeof obj.attentions[0] != 'undefined') { + var replyToProfileurl = obj.attentions[0].profileurl; + var replyToScreenName = obj.attentions[0].screen_name; + } + if(typeof replyToProfileurl != 'undefined' && typeof replyToScreenName != 'undefined') { + reply_to_html = '@' + replyToScreenName + ' '; } // in-groups html @@ -2120,6 +2130,7 @@ function buildQueetHtml(obj, idInStream, extraClasses, requeeted_by, isConversat ' + requeetedByMe + '>\
    \ \ + \ ' + requeetHtml + '\ ' + ostatusHtml + '\
    \ diff --git a/js/misc-functions.js b/js/misc-functions.js index 81885fd..91f437d 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -1044,6 +1044,16 @@ function searchForUpdatedNoticeData(obj) { streamItemsUpdated = true; } + // attentions might have been added to a notice + if(queetFoundInFeed.children('script.attentions-json').text() != JSON.stringify(obj.attentions)) { + if(queetFoundInFeed.children('script.attentions-json').length == 0) { + queetFoundInFeed.prepend(''); + } + else { + queetFoundInFeed.children('script.attentions-json').text(JSON.stringify(obj.attentions)); + } + } + // set favorite data queetFoundInFeed.find('.action-fav-num').attr('data-fav-num',obj.fave_num); queetFoundInFeed.find('.action-fav-num').html(obj.fave_num); From 0f9ec45a063becb96ce14bc51ee9ba1164695e0d Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 16 Feb 2016 19:20:44 +0100 Subject: [PATCH 077/120] removes error in blocked-feed when we haven't blocked anyone --- actions/apiqvitterblocks.php | 14 +++++++++----- classes/QvitterBlocked.php | 7 ++++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/actions/apiqvitterblocks.php b/actions/apiqvitterblocks.php index ebeed52..f6d7bb2 100644 --- a/actions/apiqvitterblocks.php +++ b/actions/apiqvitterblocks.php @@ -109,14 +109,18 @@ class ApiQvitterBlocksAction extends ApiPrivateAuthAction $blocks = QvitterBlocked::getBlocked($this->target->id, $offset, $limit); - $profiles = array(); + if($blocks) { + $profiles = array(); - while ($blocks->fetch()) { - $this_profile_block = clone($blocks); - $profiles[] = $this->getTargetProfile($this_profile_block->blocked); + while ($blocks->fetch()) { + $this_profile_block = clone($blocks); + $profiles[] = $this->getTargetProfile($this_profile_block->blocked); + } + return $profiles; + } else { + return false; } - return $profiles; } /** diff --git a/classes/QvitterBlocked.php b/classes/QvitterBlocked.php index a3cbc58..39f8b51 100644 --- a/classes/QvitterBlocked.php +++ b/classes/QvitterBlocked.php @@ -49,7 +49,12 @@ class QvitterBlocked extends Profile_block public static function getBlocked($profile_id, $offset = 0, $limit = PROFILES_PER_PAGE) { $ids = self::getBlockedIDs($profile_id, $offset, $limit); - return Profile_block::listFind('blocked', $ids); + try { + $blocked = Profile_block::listFind('blocked', $ids); + return $blocked; + } catch(NoResultException $e) { + return false; + } } From a4661e15ebac7f953bf18d1dd591ddc49cb98568 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 16 Feb 2016 20:00:26 +0100 Subject: [PATCH 078/120] closes #21 --- css/qvitter.css | 3 ++- js/dom-functions.js | 7 ++++++- js/misc-functions.js | 12 ++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/css/qvitter.css b/css/qvitter.css index 481f634..f05eca6 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -3218,7 +3218,8 @@ ul.stats .avatar-row .avatar { .permalink-link { color: #999999 !important; } -.permalink-link:hover { +.permalink-link:hover, +.longdate a:hover { text-decoration:underline; } diff --git a/js/dom-functions.js b/js/dom-functions.js index 1be4b06..d631a9b 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -2105,17 +2105,22 @@ function buildQueetHtml(obj, idInStream, extraClasses, requeeted_by, isConversat statusnetHTML = statusnetHTML.slice(0,-4); } + // external var ostatusHtml = ''; if(obj.is_local === false) { ostatusHtml = ''; + var qSource = '' + getHost(obj.external_url) + ''; + } + else { + var qSource = obj.source; } var queetTime = parseTwitterDate(obj.created_at); var queetHtml = '
    Date: Tue, 16 Feb 2016 23:41:29 +0100 Subject: [PATCH 079/120] fixes 2) in #33, tags can contain and end with . and - --- js/misc-functions.js | 2 +- js/qvitter.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/misc-functions.js b/js/misc-functions.js index 7dbd092..e8454c3 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -572,7 +572,7 @@ function cacheSyntaxHighlighting() { var allDomains = '(abb|abbott|abogado|ac|academy|accenture|accountant|accountants|active|actor|ad|ads|adult|ae|aero|af|afl|ag|agency|ai|aig|airforce|al|allfinanz|alsace|am|amsterdam|an|android|ao|apartments|aq|aquarelle|ar|archi|army|arpa|as|asia|associates|at|attorney|au|auction|audio|auto|autos|aw|ax|axa|az|ba|band|bank|bar|barclaycard|barclays|bargains|bauhaus|bayern|bb|bbc|bbva|bd|be|beer|berlin|best|bf|bg|bh|bi|bible|bid|bike|bingo|bio|biz|bj|bl|black|blackfriday|bloomberg|blue|bm|bmw|bn|bnpparibas|bo|boats|bond|boo|boutique|bq|br|bridgestone|broker|brother|brussels|bs|bt|budapest|build|builders|business|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|camera|camp|cancerresearch|canon|capetown|capital|caravan|cards|care|career|careers|cars|cartier|casa|cash|casino|cat|catering|cbn|cc|cd|center|ceo|cern|cf|cfa|cfd|cg|ch|channel|chat|cheap|chloe|christmas|chrome|church|ci|cisco|citic|city|ck|cl|claims|cleaning|click|clinic|clothing|club|cm|cn|co|coach|codes|coffee|college|cologne|com|community|company|computer|condos|construction|consulting|contractors|cooking|cool|coop|corsica|country|coupons|courses|cr|credit|creditcard|cricket|crs|cruises|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|date|dating|datsun|day|dclk|de|deals|degree|delivery|democrat|dental|dentist|desi|design|dev|diamonds|diet|digital|direct|directory|discount|dj|dk|dm|dnp|do|docs|dog|doha|domains|doosan|download|durban|dvag|dz|earth|eat|ec|edu|education|ee|eg|eh|email|emerck|energy|engineer|engineering|enterprises|epson|equipment|er|erni|es|esq|estate|et|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|fail|faith|fan|fans|farm|fashion|feedback|fi|film|finance|financial|firmdale|fish|fishing|fit|fitness|fj|fk|flights|florist|flowers|flsmidth|fly|fm|fo|foo|football|forex|forsale|foundation|fr|frl|frogans|fund|furniture|futbol|fyi|ga|gal|gallery|garden|gb|gbiz|gd|gdn|ge|gent|gf|gg|ggee|gh|gi|gift|gifts|gives|gl|glass|gle|global|globo|gm|gmail|gmo|gmx|gn|gold|goldpoint|golf|goo|goog|google|gop|gov|gp|gq|gr|graphics|gratis|green|gripe|gs|gt|gu|guge|guide|guitars|guru|gw|gy|hamburg|hangout|haus|healthcare|help|here|hermes|hiphop|hitachi|hiv|hk|hm|hn|hockey|holdings|holiday|homedepot|homes|honda|horse|host|hosting|house|how|hr|ht|hu|ibm|icbc|icu|id|ie|ifm|il|im|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insure|int|international|investments|io|iq|ir|irish|is|it|iwc|java|jcb|je|jetzt|jewelry|jll|jm|jo|jobs|joburg|jp|juegos|kaufen|kddi|ke|kg|kh|ki|kim|kitchen|kiwi|km|kn|koeln|komatsu|kp|kr|krd|kred|kw|ky|kyoto|kz|la|lacaixa|land|lat|latrobe|lawyer|lb|lc|lds|lease|leclerc|legal|lgbt|li|liaison|lidl|life|lighting|limited|limo|link|lk|loan|loans|lol|london|lotte|lotto|love|lr|ls|lt|ltda|lu|lupin|luxe|luxury|lv|ly|ma|madrid|maif|maison|management|mango|market|marketing|markets|marriott|mba|mc|md|me|media|meet|melbourne|meme|memorial|men|menu|mf|mg|mh|miami|mil|mini|mk|ml|mm|mma|mn|mo|mobi|moda|moe|monash|money|montblanc|mormon|mortgage|moscow|motorcycles|mov|movie|mp|mq|mr|ms|mt|mtn|mtpc|mu|museum|mv|mw|mx|my|mz|na|nadex|nagoya|name|navy|nc|ne|nec|net|network|neustar|new|news|nexus|nf|ng|ngo|nhk|ni|nico|ninja|nissan|nl|no|np|nr|nra|nrw|ntt|nu|nyc|nz|okinawa|om|one|ong|onl|online|ooo|org|organic|osaka|otsuka|ovh|pa|page|panerai|paris|partners|parts|party|pe|pf|pg|ph|pharmacy|philips|photo|photography|photos|physio|piaget|pics|pictet|pictures|pink|pizza|pk|pl|place|plumbing|plus|pm|pn|pohl|poker|porn|post|pr|praxi|press|pro|prod|productions|prof|properties|property|ps|pt|pub|pw|py|qa|qpon|quebec|racing|re|realtor|recipes|red|redstone|rehab|reise|reisen|reit|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rich|rio|rip|ro|rocks|rodeo|rs|rsvp|ru|ruhr|run|rw|ryukyu|sa|saarland|sale|samsung|sandvik|sandvikcoromant|sap|sarl|saxo|sb|sc|sca|scb|schmidt|scholarships|school|schule|schwarz|science|scot|sd|se|seat|sener|services|sew|sex|sexy|sg|sh|shiksha|shoes|show|shriram|si|singles|site|sj|sk|ski|sky|sl|sm|sn|sncf|so|soccer|social|software|sohu|solar|solutions|sony|soy|space|spiegel|spreadbetting|sr|ss|st|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swiss|sx|sy|sydney|systems|sz|taipei|tatar|tattoo|tax|taxi|tc|td|team|tech|technology|tel|temasek|tennis|tf|tg|th|thd|theater|tickets|tienda|tips|tires|tirol|tj|tk|tl|tm|tn|to|today|tokyo|tools|top|toray|toshiba|tours|town|toys|tp|tr|trade|trading|training|travel|trust|tt|tui|tv|tw|tz|ua|ug|uk|um|university|uno|uol|us|uy|uz|va|vacations|vc|ve|vegas|ventures|versicherung|vet|vg|vi|viajes|video|villas|vision|vlaanderen|vn|vodka|vote|voting|voto|voyage|vu|wales|walter|wang|watch|webcam|website|wed|wedding|weir|wf|whoswho|wien|wiki|williamhill|win|wme|work|works|world|ws|wtc|wtf|xbox|xerox|xin|测试|परीक्षा|佛山|慈善|集团|在线|한국|ভারত|八卦|موقع|বাংলা|公益|公司|移动|我爱你|москва|испытание|қаз|онлайн|сайт|срб|бел|时尚|테스트|淡马锡|орг|삼성|சிங்கப்பூர்|商标|商店|商城|дети|мкд|טעסט|工行|中文网|中信|中国|中國|娱乐|谷歌|భారత్|ලංකා|測試|ભારત|भारत|آزمایشی|பரிட்சை|网店|संगठन|餐厅|网络|укр|香港|δοκιμή|飞利浦|إختبار|台湾|台灣|手机|мон|الجزائر|عمان|ایران|امارات|بازار|پاکستان|الاردن|بھارت|المغرب|السعودية|سودان|عراق|مليسيا|澳門|政府|شبكة|გე|机构|组织机构|健康|ไทย|سورية|рус|рф|تونس|みんな|グーグル|ελ|世界|ਭਾਰਤ|网址|游戏|vermögensberater|vermögensberatung|企业|信息|مصر|قطر|广东|இலங்கை|இந்தியா|հայ|新加坡|فلسطين|テスト|政务|xxx|xyz|yachts|yandex|ye|yodobashi|yoga|yokohama|youtube|yt|za|zip|zm|zone|zuerich|zw|oracle|xn--1qqw23a|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--55qw42g|xn--55qx5d|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80asehdb|xn--80aswg|xn--90a3ac|xn--90ais|xn--9et52u|xn--b4w605ferd|xn--c1avg|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--estv75g|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--gecrj9c|xn--h2brj9c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1amh|xn--j6w193g|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a4f16a|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgberp4a5d4ar|xn--mgbpl2fh|xn--mgbx4cd0ab|xn--mxtq1m|xn--ngbc5azd|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pgbs0dh|xn--q9jyb4c|xn--qcka1pmc|xn--rhqv96g|xn--s9brj9c|xn--ses554g|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b)'; window.syntaxHighlightingRegexps.externalMention = XRegExp.cache('(^|\\s|\\.|
    | |\\()(@)[a-zA-Z0-9]+(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); window.syntaxHighlightingRegexps.mention = /(^|\s|\.|
    | |\()(@)[a-zA-Z0-9]+($|\s|\.|\,|\:|\-|\<|\!|\?|\&|\)|\')/; - window.syntaxHighlightingRegexps.tag = XRegExp.cache('(^|\\s|\\.|
    | |\\()(\\#)[\\p{L}\\p{N}\\-\\.]+($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); + window.syntaxHighlightingRegexps.tag = XRegExp.cache('(^|\\s|\\.|
    | |\\()(\\#)[\\p{L}\\p{N}\\-\\.]+($|\\s|\\,|\\:|\\<|\\!|\\?|\\&|\\)|\\\')'); window.syntaxHighlightingRegexps.url = XRegExp.cache('(^|\\s|\\.|
    | |\\()(http\\:\\/\\/|https\:\\/\\/)([\\p{L}\\p{N}\\-\\.]+)?(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); window.syntaxHighlightingRegexps.urlWithoutProtocol = XRegExp.cache('(^|\\s|\\.|
    | |\\()[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')(\\/[\\p{L}\\p{N}\\%\\!\\*\\\'\\(\\)\\;\\:\\@\\&\\=\\+\\$\\,\\/\\?\\#\\[\\]\\-\\_\\.\\~]+)?(\\/)?($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); window.syntaxHighlightingRegexps.email = XRegExp.cache('(^|\\s|\\.|
    | |\\()([a-zA-Z0-9\\!\\#\\$\\%\\&\\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\.]+)?(@)[\\p{L}\\p{N}\\-\\.]+(\\.)(' + allDomains + ')($|\\s|\\.|\\,|\\:|\\-|\\<|\\!|\\?|\\&|\\)|\\\')'); diff --git a/js/qvitter.js b/js/qvitter.js index eabb09f..5d49d81 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -2952,15 +2952,15 @@ $('body').on('keyup paste input', 'div.queet-box-syntax', function() { } // long enough match, create a mention span else { - // don't include ending char, if any of these + // don't include ending char, if any of these (but tags can contain and end with . and -) if(currentMatch[0].slice(-1) == '<' || currentMatch[0].slice(-1) == '&' || currentMatch[0].slice(-1) == '?' || currentMatch[0].slice(-1) == '!' || currentMatch[0].slice(-1) == ' ' - || currentMatch[0].slice(-1) == '-' + || (currentMatch[0].slice(-1) == '-' && k != 'tag') || currentMatch[0].slice(-1) == ':' - || currentMatch[0].slice(-1) == '.' + || (currentMatch[0].slice(-1) == '.' && k != 'tag') || currentMatch[0].slice(-1) == ',' || currentMatch[0].slice(-1) == ')' || currentMatch[0].slice(-1) == '\'') { From a6fbae59382afb26a33d5cbf802c79ae28fe7fbe Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 17 Feb 2016 00:26:18 +0100 Subject: [PATCH 080/120] better transition with cached notices without some new attributes --- js/dom-functions.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/dom-functions.js b/js/dom-functions.js index d631a9b..35fbc5a 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -1338,12 +1338,16 @@ function replyFormHtml(streamItem,qid) { // object with ostatus-uri as key to avoid duplicates var screenNamesToAdd = {}; - // we don't trust attentions to be in the right order, so always add the - // screen name to the one we're replying to first (if it's not me) - if(!thisIsALinkToMyProfile(streamItem.attr('data-user-profile-url'))) { + // add the screen name to the one we're replying to first (if it's not me) + if(!thisIsALinkToMyProfile(streamItem.attr('data-user-profile-url')) && typeof streamItem.attr('data-user-ostatus-uri') != 'undefined') { screenNamesToAdd[streamItem.attr('data-user-ostatus-uri')] = streamItem.attr('data-user-screen-name'); } + // old style notice (probably cached, this can be removed later) + else if (typeof streamItem.attr('data-user-ostatus-uri') == 'undefined') { + screenNamesToAdd[q.find('.account-group').attr('href')] = q.find('.screen-name').text().replace('@',''); + } + // add the rest of the attentions (not me) if(q.children('script.attentions-json').length > 0 && q.children('script.attentions-json').text() != 'undefined') { From 4898d83fe8d43d718257d8435f337458becb4c89 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 17 Feb 2016 00:44:38 +0100 Subject: [PATCH 081/120] notification count in front of site title, makes it show even if the tab width is small --- js/misc-functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/misc-functions.js b/js/misc-functions.js index e8454c3..64b11fa 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -1307,7 +1307,7 @@ function displayOrHideUnreadNotifications(notifications) { if(totNotif>0) { $('#unseen-notifications').html(totNotif); - document.title = window.siteTitle + ' (' + totNotif + ')'; // update html page title + document.title = '(' + totNotif + ') ' + window.siteTitle; // update html page title $('#unseen-notifications').show(); } else { From b1852c79c0fd78129a4de2c349c08f8bee5aec99 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 17 Feb 2016 01:37:15 +0100 Subject: [PATCH 082/120] don't include attentions to groups --- QvitterPlugin.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index b940941..be2f26d 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -716,13 +716,15 @@ class QvitterPlugin extends Plugin { $attentions = $notice->getAttentionProfiles(); $attentions_array = array(); foreach ($attentions as $attn) { - $attentions_array[] = array( - 'id' => $attn->getID(), - 'screen_name' => $attn->getNickname(), - 'fullname' => $attn->getStreamName(), - 'profileurl' => $attn->getUrl(), - 'ostatus_uri' => $attn->getUri(), - ); + if(!$attn->isGroup()) { + $attentions_array[] = array( + 'id' => $attn->getID(), + 'screen_name' => $attn->getNickname(), + 'fullname' => $attn->getStreamName(), + 'profileurl' => $attn->getUrl(), + 'ostatus_uri' => $attn->getUri(), + ); + } } $twitter_status['attentions'] = $attentions_array; } catch (Exception $e) { From 35f6515cab5afeed404aee48f9c57e547c52a7ac Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 23 Feb 2016 12:03:01 +0100 Subject: [PATCH 083/120] notice.is_local can be -1 for silenced remote users, we can't use that for determining if a notice is local. use user.is_local instead --- js/dom-functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/dom-functions.js b/js/dom-functions.js index 35fbc5a..d0edece 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -2112,7 +2112,7 @@ function buildQueetHtml(obj, idInStream, extraClasses, requeeted_by, isConversat // external var ostatusHtml = ''; - if(obj.is_local === false) { + if(obj.user.is_local === false) { ostatusHtml = ''; var qSource = '' + getHost(obj.external_url) + ''; } From 4592c65939d311f5fbe0d2a35d20cc52eac0d06a Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 23 Feb 2016 22:14:58 +0100 Subject: [PATCH 084/120] rel="me" links for the IndieWeb audience --- actions/qvitter.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/actions/qvitter.php b/actions/qvitter.php index 19d131d..672a655 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -158,6 +158,17 @@ class QvitterAction extends ApiAction print ' '."\n"; print ' '."\n"; + // rel="me" for the IndieWeb audience + $relMes = array( + ['href' => $user->getProfile()->getHomepage(), + 'text' => _('Homepage'), + 'image' => null], + ); + Event::handle('OtherAccountProfiles', array($user->getProfile(), &$relMes)); + foreach ($relMes as $relMe) { + print ' '."\n"; + } + // maybe openid if (array_key_exists('OpenID', StatusNet::getActivePlugins())) { print ' '."\n"; From 131f9a673d449f0bc1036870e0bc24c5ca388ee2 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 25 Feb 2016 11:08:47 +0100 Subject: [PATCH 085/120] oembed fixes --- QvitterPlugin.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index be2f26d..c3c9bf8 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -528,16 +528,16 @@ class QvitterPlugin extends Plugin { $oembed = File_oembed::getKV('file_id',$attachment->id); if($oembed instanceof File_oembed) { $oembed_html = str_replace('<!--//-->','',$oembed->html); // trash left of wordpress' javascript after htmLawed removed the tags - if($oembed->provider == 'Twitter' && strstr($oembed_html, '>— '.$oembed->author_name)) { - $oembed_html = substr($oembed_html,0,strpos($oembed_html, '>— '.$oembed->author_name)+1); // remove user data from twitter oembed html (we have it in ) - $twitter_username = substr($oembed->html,strpos($oembed->html, '>— '.$oembed->author_name)+strlen('>— '.$oembed->author_name)); + if($oembed->provider == 'Twitter' && strstr($oembed_html, '>— '.$oembed->author_name)) { + $oembed_html = substr($oembed_html,0,strpos($oembed_html, '>— '.$oembed->author_name)+1); // remove user data from twitter oembed html (we have it in ) + $twitter_username = substr($oembed->html,strpos($oembed->html, '>— '.$oembed->author_name)+strlen('>— '.$oembed->author_name)); $twitter_username = substr($twitter_username, strpos($twitter_username,'(@')+1); $twitter_username = substr($twitter_username, 0,strpos($twitter_username,')')); $oembed->title = $twitter_username; } $oembed_html = str_replace('…','...',$oembed_html); // ellipsis is sometimes stored as html in db, for some reason - $oembed_html = mb_substr(trim(strip_tags(html_entity_decode($oembed_html,ENT_QUOTES))),0,250); // sometimes we have html charachters that we want to decode and then strip - $oembed_title = trim(strip_tags(html_entity_decode($oembed->title,ENT_QUOTES))); + $oembed_html = mb_substr(trim(strip_tags($oembed_html)),0,250); + $oembed_title = trim(strip_tags(html_entity_decode($oembed->title,ENT_QUOTES))); // sometimes we have html charachters that we want to decode and then strip $oembed_provider = trim(strip_tags(html_entity_decode($oembed->provider,ENT_QUOTES))); $oembed_author_name = trim(strip_tags(html_entity_decode($oembed->author_name,ENT_QUOTES))); $attachment_url_to_id[$enclosure_o->url]['oembed'] = array( From a2a38680a324a21e968fa470c582d68b67b8abdb Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 25 Feb 2016 11:09:07 +0100 Subject: [PATCH 086/120] what's quipping? --- locale/en.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/locale/en.json b/locale/en.json index 9d546fe..d11c471 100644 --- a/locale/en.json +++ b/locale/en.json @@ -6,13 +6,13 @@ "loginSignIn": "Sign in", "loginRememberMe": "Remember me", "loginForgotPassword": "Forgot password?", - "notices": "Notices", + "notices": "Quips", "followers": "Followers", "following": "Following", "groups": "Groups", - "compose": "Compose a new notice...", + "compose": "What's quipping?", "queetVerb": "Send", - "queetsNounPlural": "Notices", + "queetsNounPlural": "Quips", "logout": "Sign out", "languageSelected": "Language:", "viewMyProfilePage": "View my profile page", @@ -21,18 +21,18 @@ "details": "Details", "expandFullConversation": "Expand full conversation", "replyVerb": "Reply", - "requeetVerb": "Repeat", + "requeetVerb": "Requip", "favoriteVerb": "Favorite", - "requeetedVerb": "Repeated", + "requeetedVerb": "Requipped", "favoritedVerb": "Favorited", "replyTo": "Reply to", - "requeetedBy": "Repeated by {requeeted-by}", + "requeetedBy": "Requipped by {requeeted-by}", "favoriteNoun": "Favorite", "favoritesNoun": "Favorites", - "requeetNoun": "Repeat", - "requeetsNoun": "Repeats", - "newQueet": "{new-notice-count} new notice", - "newQueets": "{new-notice-count} new notices", + "requeetNoun": "Requip", + "requeetsNoun": "Requips", + "newQueet": "{new-notice-count} new quip", + "newQueets": "{new-notice-count} new quips", "longmonthsJanuary": "January", "longmonthsFebruary": "February", "longmonthsMars": "March", @@ -76,7 +76,7 @@ "searchVerb": "Search", "deleteVerb": "Delete", "cancelVerb": "Cancel", - "deleteConfirmation": "Are you sure you want to delete this notice?", + "deleteConfirmation": "Are you sure you want to delete this quip?", "userExternalFollow": "Remote follow", "userExternalFollowHelp": "Your account ID (e.g. user@rainbowdash.net).", "userFollow": "Follow", @@ -108,8 +108,8 @@ "otherServers": "Alternatively you can create an account on another server of the GNU social network. Comparison", "editMyProfile": "Edit profile", "notifications": "Notifications", - "xFavedYourQueet": "favorited your Queet", - "xRepeatedYourQueet": "requeeted you", + "xFavedYourQueet": "favorited your quip", + "xRepeatedYourQueet": "requipped you", "xStartedFollowingYou": "followed you", "followsYou": "follows you", "FAQ": "FAQ", @@ -119,7 +119,7 @@ "showTerms": "Read our Terms of Use", "ellipsisMore": "More", "blockUser": "Block {username}", - "goToOriginalNotice": "Go to original notice", + "goToOriginalNotice": "Go to the original quip", "goToTheUsersRemoteProfile": "Go to the user's remote profile", "clickToDrag":"Click to drag", "keyboardShortcuts":"Keyboard shortcuts", @@ -128,7 +128,7 @@ "tooltipBookmarkStream":"Add this stream to your bookmarks", "tooltipTopMenu":"Menu and settings", "tooltipAttachImage":"Attach an image", - "tooltipShortenUrls":"Shorten all URLs in the Queet", + "tooltipShortenUrls":"Shorten all URLs in the quip", "tooltipReloadStream":"Refresh this stream", "tooltipRemoveBookmark":"Remove this bookmark", "clearHistory":"Clear browsing history", @@ -137,21 +137,21 @@ "ERRORcouldNotFindUserWithNickname":"Could not find a user with nickname \"{nickname}\" on this server", "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", - "ERRORnoticeRemoved": "This notice has been removed.", + "ERRORnoticeRemoved": "This quip has been removed.", "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connection. Please try again later!", "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large.", "hideRepliesToPeopleIDoNotFollow":"Hide replies to people I don't follow", "markAllNotificationsAsSeen":"Mark all notifications as seen", "notifyRepliesAndMentions":"Mentions and replies", "notifyFavs":"Favorites", - "notifyRepeats":"Requeets", + "notifyRepeats":"Requips", "notifyFollows":"New followers", "timelineOptions":"Timeline options", "ERRORfailedSavingYourSetting":"Failed saving your setting", "ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.", "newNotification": "{new-notice-count} new notification", "newNotifications": "{new-notice-count} new notifications", - "thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it.", + "thisIsANoticeFromABlockedUser":"Warning: This is a quip from a user you have blocked. Click to show it.", "nicknamesListWithListName":"{nickname}’s list: {list-name}", "myListWithListName":"My list: {list-name}", "listMembers":"Members", From fcd41e8c2bb5bc76c4255fd0b554d39978b89c16 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 26 Feb 2016 18:22:41 +0100 Subject: [PATCH 087/120] don't show sandboxed users in public timelines, unless you are a mod --- classes/PublicAndExternalNoticeStream.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/classes/PublicAndExternalNoticeStream.php b/classes/PublicAndExternalNoticeStream.php index 5e85aff..06fe944 100644 --- a/classes/PublicAndExternalNoticeStream.php +++ b/classes/PublicAndExternalNoticeStream.php @@ -71,6 +71,18 @@ class RawPublicAndExternalNoticeStream extends NoticeStream $notice->whereAdd('is_local !='. Notice::GATEWAY); $notice->whereAdd('repeat_of IS NULL'); + // don't show sandboxed users in public timelines, unless you are a mod + $hide_sandboxed = true; + $cur_profile = Profile::current(); + if($cur_profile instanceof Profile) { + if($cur_profile->hasRight(Right::REVIEWSPAM)) { + $hide_sandboxed = false; + } + } + if($hide_sandboxed) { + $notice->whereAdd('profile_id NOT IN (SELECT profile_id FROM profile_role WHERE role =\''.Profile_role::SANDBOXED.'\')'); + } + if(!empty($max_id) && is_numeric($max_id)) { $notice->whereAdd('id < '.$max_id); } From 11186c14b8d6678533853e4a4295bd09a5d535a8 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 26 Feb 2016 23:18:02 +0100 Subject: [PATCH 088/120] silenced & sandboxed flags and streams, only show notifications from people you follow, ghost notification fix, mentions no longer default stream, block stream link in menu, etc --- QvitterPlugin.php | 23 ++++ actions/apiqvitterchecklogin.php | 17 ++- actions/apiqvitternotifications.php | 7 +- actions/apiqvittersandboxed.php | 196 ++++++++++++++++++++++++++++ actions/apiqvittersilencecreate.php | 93 +++++++++++++ actions/apiqvittersilenced.php | 196 ++++++++++++++++++++++++++++ actions/qvitter.php | 5 +- classes/NotificationStream.php | 9 +- css/qvitter.css | 54 ++++++++ js/ajax-functions.js | 5 +- js/dom-functions.js | 100 ++++++++++++-- js/misc-functions.js | 10 ++ js/qvitter.js | 7 + js/stream-router.js | 64 ++++++++- locale/ar.json | 11 +- locale/ast.json | 11 +- locale/ca.json | 11 +- locale/de.json | 11 +- locale/en.json | 13 +- locale/eo.json | 11 +- locale/es.json | 11 +- locale/es_ahorita.json | 11 +- locale/eu.json | 11 +- locale/fa.json | 11 +- locale/fi.json | 11 +- locale/fr.json | 11 +- locale/gl.json | 11 +- locale/he.json | 11 +- locale/io.json | 11 +- locale/it.json | 11 +- locale/ja.json | 11 +- locale/nb.json | 11 +- locale/nl.json | 11 +- locale/pt.json | 11 +- locale/pt_br.json | 11 +- locale/ru.json | 11 +- locale/sq.json | 11 +- locale/sv.json | 13 +- locale/tr.json | 13 +- locale/zh_cn.json | 11 +- locale/zh_tw.json | 11 +- 41 files changed, 1040 insertions(+), 49 deletions(-) create mode 100644 actions/apiqvittersandboxed.php create mode 100644 actions/apiqvittersilencecreate.php create mode 100644 actions/apiqvittersilenced.php diff --git a/QvitterPlugin.php b/QvitterPlugin.php index c3c9bf8..8d767ef 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -153,6 +153,14 @@ class QvitterPlugin extends Plugin { // route/reroute urls public function onRouterInitialized($m) { + $m->connect('api/qvitter/sandboxed.:format', + array('action' => 'ApiQvitterSandboxed', + 'format' => '(xml|json)')); + $m->connect('api/qvitter/silenced.:format', + array('action' => 'ApiQvitterSilenced', + 'format' => '(xml|json)')); + $m->connect('api/qvitter/silence/create.json', + array('action' => 'ApiQvitterSilenceCreate')); $m->connect('services/oembed.:format', array('action' => 'apiqvitteroembednotice', 'format' => '(xml|json)')); @@ -263,6 +271,8 @@ class QvitterPlugin extends Plugin { $m->connect('', array('action' => 'qvitter')); $m->connect('main/all', array('action' => 'qvitter')); $m->connect('main/public', array('action' => 'qvitter')); + $m->connect('main/silenced', array('action' => 'qvitter')); + $m->connect('main/sandboxed', array('action' => 'qvitter')); $m->connect('search/notice', array('action' => 'qvitter')); // if the user wants the twitter style home stream with hidden replies to non-friends @@ -808,6 +818,12 @@ class QvitterPlugin extends Plugin { $twitter_user['is_local'] = $profile->isLocal(); + // silenced? + $twitter_user['is_silenced'] = $profile->isSilenced(); + + // sandboxed? + $twitter_user['is_sandboxed'] = $profile->isSandboxed(); + // ostatus uri if($twitter_user['is_local']) { $user = $profile->getUser(); @@ -1248,6 +1264,7 @@ class QvitterPlugin extends Plugin { } $user_id = $user->id; + $profile = $user->getProfile(); $notification = new QvitterNotification(); $notification->selectAdd(); @@ -1255,6 +1272,12 @@ class QvitterPlugin extends Plugin { $notification->selectAdd('count(id) as count'); $notification->whereAdd("(to_profile_id = '".$user_id."')"); + // if the user only want notifications from users they follow + $only_show_notifications_from_users_i_follow = Profile_prefs::getConfigData($profile, 'qvitter', 'only_show_notifications_from_users_i_follow'); + if($only_show_notifications_from_users_i_follow == '1') { + $notification->whereAdd(sprintf('qvitternotification.from_profile_id IN (SELECT subscribed FROM subscription WHERE subscriber = %u)', $user_id)); + } + // the user might have opted out from certain notification types $current_profile = $user->getProfile(); $disable_notify_replies_and_mentions = Profile_prefs::getConfigData($current_profile, 'qvitter', 'disable_notify_replies_and_mentions'); diff --git a/actions/apiqvitterchecklogin.php b/actions/apiqvitterchecklogin.php index db24770..5e58c9f 100644 --- a/actions/apiqvitterchecklogin.php +++ b/actions/apiqvitterchecklogin.php @@ -71,12 +71,23 @@ class ApiQvitterCheckLoginAction extends ApiAction $user = common_check_user($this->arg('username'), $this->arg('password')); - if($user) { - $user = true; + if(!$user instanceof User) { + $this->clientError(_('Incorrect credentials.'), 401); } + // silenced? + if($user->isSilenced()) { + $this->clientError(_('User '.json_encode($user->isSilenced()).' is silenced.'), 403); + } + + try { + $profile = $user->getProfile(); + } catch (UserNoProfileException $e) { + $this->clientError(_('User got no profile.'), 400); + } + $this->initDocument('json'); - $this->showJsonObjects($user); + $this->showJsonObjects($this->twitterUserArray($profile)); $this->endDocument('json'); } diff --git a/actions/apiqvitternotifications.php b/actions/apiqvitternotifications.php index c992fb2..b0f56b8 100644 --- a/actions/apiqvitternotifications.php +++ b/actions/apiqvitternotifications.php @@ -55,7 +55,7 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction { parent::prepare($args); - $this->format = 'json'; + $this->format = 'json'; $this->notifications = $this->getNotifications(); @@ -99,6 +99,8 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction if($notice_object instanceof Notice) { $notice = self::twitterSimpleStatusArray($notice_object); } else { + // if the referenced notice is missing, delete this corrupt notification! + $notification->delete(); continue; } @@ -117,6 +119,9 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction 'created_at'=>self::dateTwitter($notification->created), 'is_seen'=>$notification->is_seen ); + } else { + // if the referenced from_profile is missing, delete this corrupt notification! + $notification->delete(); } // mark as seen diff --git a/actions/apiqvittersandboxed.php b/actions/apiqvittersandboxed.php new file mode 100644 index 0000000..f0d3bd1 --- /dev/null +++ b/actions/apiqvittersandboxed.php @@ -0,0 +1,196 @@ +. + * + * @category API + * @package GNUsocial + * @author Craig Andrews + * @author Evan Prodromou + * @author Jeffery To + * @author Zach Copley + * @author Hannes Mannerheim + * @copyright 2009 StatusNet, Inc. + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://www.gnu.org/software/social/ + */ + +if (!defined('GNUSOCIAL')) { + exit(1); +} + +/** + * + * @category API + * @package GNUsocial + * @author Craig Andrews + * @author Evan Prodromou + * @author Jeffery To + * @author Zach Copley + * @author Hannes Mannerheim + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://www.gnu.org/software/social/ + */ +class ApiQvitterSandboxedAction extends ApiPrivateAuthAction +{ + var $profiles = null; + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + $this->profiles = $this->getProfiles(); + + return true; + } + + /** + * Handle the request + * + * @param array $args $_REQUEST data (unused) + * + * @return void + */ + protected function handle() + { + parent::handle(); + + // XXX: RSS and Atom + + switch($this->format) { + case 'xml': + $this->showTwitterXmlUsers($this->profiles); + break; + case 'json': + $this->showJsonUsers($this->profiles); + break; + default: + $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. + _('API method not found.'), + 404, + $this->format + ); + break; + } + } + + /** + * Fetch the sandboxed profiles + * + * @return array $profiles list of profiles + */ + function getProfiles() + { + $profiles = array(); + + $profile = $this->getSandboxed( + ($this->page - 1) * $this->count, + $this->count, + $this->since_id, + $this->max_id + ); + + while ($profile->fetch()) { + $profiles[] = clone($profile); + } + + return $profiles; + } + + /** + * Fetch the sandboxed profiles from DB + * + * @return array $profiles list of profiles + */ + + function getSandboxed($offset=null, $limit=null) // offset is null because DataObject wants it, 0 would mean no results + { + $profiles = new Profile(); + $profiles->joinAdd(array('id', 'profile_role:profile_id')); + $profiles->whereAdd(sprintf('profile_role.role = \'%s\'', Profile_role::SANDBOXED)); + $profiles->orderBy('profile_role.created DESC'); + $profiles->limit($offset, $limit); + $profiles->find(); + + return $profiles; + } + + /** + * Is this action read only? + * + * @param array $args other arguments + * + * @return boolean true + */ + function isReadOnly($args) + { + return true; + } + + /** + * When was this list of profiles last modified? + * + * @return string datestamp of the lastest profile + */ + function lastModified() + { + if (!empty($this->profiles) && (count($this->profiles) > 0)) { + return strtotime($this->profiles[0]->created); + } + + return null; + } + + /** + * An entity tag for this list + * + * Returns an Etag based on the action name, language + * and timestamps of the first and last profile + * + * @return string etag + */ + function etag() + { + if (!empty($this->profiles) && (count($this->profiles) > 0)) { + + $last = count($this->profiles) - 1; + + return '"' . implode( + ':', + array($this->arg('action'), + common_user_cache_hash($this->auth_user), + common_language(), + strtotime($this->profiles[0]->created), + strtotime($this->profiles[$last]->created)) + ) + . '"'; + } + + return null; + } +} diff --git a/actions/apiqvittersilencecreate.php b/actions/apiqvittersilencecreate.php new file mode 100644 index 0000000..1383067 --- /dev/null +++ b/actions/apiqvittersilencecreate.php @@ -0,0 +1,93 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + + +if (!defined('GNUSOCIAL')) { exit(1); } + +class ApiQvitterSilenceCreateAction extends ApiAuthAction +{ + + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + $this->other = $this->getTargetProfile($this->arg('id')); + + return true; + } + + /** + * Handle the request + * + * @param array $args $_REQUEST data (unused) + * + * @return void + */ + protected function handle() + { + parent::handle(); + + if (!$this->other instanceof Profile) { + $this->clientError(_('No such user.'), 404); + } + + if ($this->scoped->id == $this->other->id) { + $this->clientError(_("You cannot silence yourself!"), 403); + } + + try { + $this->other->silenceAs($this->scoped); + } catch (Exception $e) { + $this->clientError($e->getMessage(), $e->getCode()); + } + + $this->initDocument('json'); + $this->showJsonObjects($this->twitterUserArray($this->other)); + $this->endDocument('json'); + } +} diff --git a/actions/apiqvittersilenced.php b/actions/apiqvittersilenced.php new file mode 100644 index 0000000..1f97ab3 --- /dev/null +++ b/actions/apiqvittersilenced.php @@ -0,0 +1,196 @@ +. + * + * @category API + * @package GNUsocial + * @author Craig Andrews + * @author Evan Prodromou + * @author Jeffery To + * @author Zach Copley + * @author Hannes Mannerheim + * @copyright 2009 StatusNet, Inc. + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://www.gnu.org/software/social/ + */ + +if (!defined('GNUSOCIAL')) { + exit(1); +} + +/** + * + * @category API + * @package GNUsocial + * @author Craig Andrews + * @author Evan Prodromou + * @author Jeffery To + * @author Zach Copley + * @author Hannes Mannerheim + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://www.gnu.org/software/social/ + */ +class ApiQvitterSilencedAction extends ApiPrivateAuthAction +{ + var $profiles = null; + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + $this->profiles = $this->getProfiles(); + + return true; + } + + /** + * Handle the request + * + * @param array $args $_REQUEST data (unused) + * + * @return void + */ + protected function handle() + { + parent::handle(); + + // XXX: RSS and Atom + + switch($this->format) { + case 'xml': + $this->showTwitterXmlUsers($this->profiles); + break; + case 'json': + $this->showJsonUsers($this->profiles); + break; + default: + $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. + _('API method not found.'), + 404, + $this->format + ); + break; + } + } + + /** + * Fetch the silenced profiles + * + * @return array $profiles list of profiles + */ + function getProfiles() + { + $profiles = array(); + + $profile = $this->getSilenced( + ($this->page - 1) * $this->count, + $this->count, + $this->since_id, + $this->max_id + ); + + while ($profile->fetch()) { + $profiles[] = clone($profile); + } + + return $profiles; + } + + /** + * Fetch the silenced profiles from DB + * + * @return array $profiles list of profiles + */ + + function getSilenced($offset=null, $limit=null) // offset is null because DataObject wants it, 0 would mean no results + { + $profiles = new Profile(); + $profiles->joinAdd(array('id', 'profile_role:profile_id')); + $profiles->whereAdd(sprintf('profile_role.role = \'%s\'', Profile_role::SILENCED)); + $profiles->orderBy('profile_role.created DESC'); + $profiles->limit($offset, $limit); + $profiles->find(); + + return $profiles; + } + + /** + * Is this action read only? + * + * @param array $args other arguments + * + * @return boolean true + */ + function isReadOnly($args) + { + return true; + } + + /** + * When was this list of profiles last modified? + * + * @return string datestamp of the lastest profile + */ + function lastModified() + { + if (!empty($this->profiles) && (count($this->profiles) > 0)) { + return strtotime($this->profiles[0]->created); + } + + return null; + } + + /** + * An entity tag for this list + * + * Returns an Etag based on the action name, language + * and timestamps of the first and last profile + * + * @return string etag + */ + function etag() + { + if (!empty($this->profiles) && (count($this->profiles) > 0)) { + + $last = count($this->profiles) - 1; + + return '"' . implode( + ':', + array($this->arg('action'), + common_user_cache_hash($this->auth_user), + common_language(), + strtotime($this->profiles[0]->created), + strtotime($this->profiles[$last]->created)) + ) + . '"'; + } + + return null; + } +} diff --git a/actions/qvitter.php b/actions/qvitter.php index 672a655..fcc1c75 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -472,7 +472,8 @@ class QvitterAction extends ApiAction
  • -
  • +
  • +
  • @@ -622,7 +623,6 @@ class QvitterAction extends ApiAction if($logged_in_user) { ?> - @@ -644,6 +644,7 @@ class QvitterAction extends ApiAction

    +
    diff --git a/classes/NotificationStream.php b/classes/NotificationStream.php index eb17c9d..bf0a65f 100644 --- a/classes/NotificationStream.php +++ b/classes/NotificationStream.php @@ -34,14 +34,21 @@ class NotificationStream function getNotificationIds($offset, $limit, $since_id, $max_id) { + $current_profile = Profile::current(); + $notification = new QvitterNotification(); $notification->selectAdd(); $notification->selectAdd('id'); $notification->whereAdd(sprintf('qvitternotification.to_profile_id = "%s"', $notification->escape($this->target->id))); $notification->whereAdd(sprintf('qvitternotification.created >= "%s"', $notification->escape($this->target->created))); + // if the user only want notifications from users they follow + $only_show_notifications_from_users_i_follow = Profile_prefs::getConfigData($current_profile, 'qvitter', 'only_show_notifications_from_users_i_follow'); + if($only_show_notifications_from_users_i_follow == '1') { + $notification->whereAdd(sprintf('qvitternotification.from_profile_id IN (SELECT subscribed FROM subscription WHERE subscriber = %u)', $current_profile->id)); + } + // the user might have opted out from certain notification types - $current_profile = Profile::current(); $disable_notify_replies_and_mentions = Profile_prefs::getConfigData($current_profile, 'qvitter', 'disable_notify_replies_and_mentions'); $disable_notify_favs = Profile_prefs::getConfigData($current_profile, 'qvitter', 'disable_notify_favs'); $disable_notify_repeats = Profile_prefs::getConfigData($current_profile, 'qvitter', 'disable_notify_repeats'); diff --git a/css/qvitter.css b/css/qvitter.css index f05eca6..e138c08 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -1643,6 +1643,19 @@ body.rtl #history-container.menu-container a .chev-right { line-height: 22px; } +#feed-header-description { + background-color: #fff; + border-bottom: 1px solid #e8e8e8; + color: #66757f; + font-size: 12px; + margin-top: -1px; + padding: 0 10px 10px; + position: relative; + } +#feed-header-description:empty { + display:none; + } + #stream-menu-cog { display: inline-block; font-size: 20px; @@ -1872,6 +1885,47 @@ background-repeat: no-repeat; border-radius: 9px; } +.stream-item .account-group span.silenced-flag, +.stream-item .account-group span.sandboxed-flag { + background-color: pink; + border-radius: 3px; + font-size: 11px; + line-height: 18px; + padding: 0 5px; + display:none; + } +.stream-item .account-group span.sandboxed-flag { + background-color: #00ccff; + } +.stream-item.silenced .account-group span.silenced-flag, +.stream-item.sandboxed .account-group span.sandboxed-flag { + display:inline-block;; + } +.profile-card .profile-header-inner span.silenced-flag, +.profile-card .profile-header-inner span.sandboxed-flag { + background-color: pink; + border-radius: 3px; + color: black; + display: none; + font-size: 11px; + line-height: 24px; + margin: 0 0 0 5px; + padding: 0 5px; + text-shadow: none; + vertical-align: top; + } +.profile-card .profile-header-inner span.sandboxed-flag { + background-color: #00ccff; + } +.hover-card .profile-card .profile-header-inner span.silenced-flag, +.hover-card .profile-card .profile-header-inner span.sandboxed-flag { + line-height: 15px; + } +.profile-card .profile-header-inner.silenced span.silenced-flag, +.profile-card .profile-header-inner.sandboxed span.sandboxed-flag { + display: inline-block; + } + .show-full-conversation { bottom: 3px; color: #777; diff --git a/js/ajax-functions.js b/js/ajax-functions.js index 2cb4d3b..aec28db 100644 --- a/js/ajax-functions.js +++ b/js/ajax-functions.js @@ -112,8 +112,11 @@ function checkLogin(username,password,actionOnSuccess) { password: password }, dataType: 'json', - error: function() { + error: function(data) { shakeLoginBox(); + if(data.status === 403) { + showErrorMessage(window.sL.silenced); + } }, success: function(data) { if(typeof data.error == 'undefined' && data !== false) { diff --git a/js/dom-functions.js b/js/dom-functions.js index d0edece..6e30a0f 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -171,7 +171,7 @@ function alignMenuToParent(menu, parent, offsetLeft) { function showErrorMessage(message, after) { if(typeof after == 'undefined') { - var after = $('#user-container'); + var after = $('#user-container,#login-register-container'); } after.after('
    ' + message + '
    '); } @@ -358,6 +358,16 @@ function buildProfileCard(data) { var follows_you = '' + window.sL.followsYou + ''; } + // silenced? + var is_silenced = ''; + if(data.is_silenced === true) { + is_silenced = ' silenced'; + } + // sandboxed? + var is_sandboxed = ''; + if(data.is_sandboxed === true) { + is_sandboxed = ' sandboxed'; + } var followButton = ''; @@ -385,13 +395,15 @@ function buildProfileCard(data) { // full card html data.profileCardHtml = '\
    \ -
    \ +
    \
    \ \ \ \
    \ -

    ' + data.name + '

    \ +

    ' + data.name + '

    \ + ' + window.sL.silenced + '\ + ' + window.sL.sandboxed + '\

    \ @' + data.screen_name + '\ ' + follows_you + '\ @@ -446,6 +458,21 @@ function buildExternalProfileCard(data) { var followButton = buildFollowBlockbutton(data.local); } + // silenced? + var is_silenced = ''; + if(data.local.is_silenced === true) { + is_silenced = ' silenced'; + } + + // sandboxed? + var is_sandboxed = ''; + if(data.local.is_sandboxed === true) { + is_sandboxed = ' sandboxed'; + } + + // local id + var localUserId = data.local.id; + // empty strings and zeros instead of null data = cleanUpUserObject(data.external); @@ -480,12 +507,14 @@ function buildExternalProfileCard(data) { data.profileCardHtml = '\
    \ -
    \ +
    \
    \ \
    \ \ -

    ' + data.name + '

    \ +

    ' + data.name + '

    \ + ' + window.sL.silenced + '\ + ' + window.sL.sandboxed + '\

    \ ' + data.screenNameWithServer + '\ ' + window.sL.goToTheUsersRemoteProfile + '\ @@ -694,13 +723,19 @@ function setNewCurrentStream(streamObject,setLocation,fallbackId,actionOnSuccess // remember the most recent stream object window.currentStreamObject = streamObject; - // set the new streams header + // set the new streams header and description if(streamObject.streamSubHeader) { $('#feed-header-inner h2').html(streamObject.streamSubHeader); } else { $('#feed-header-inner h2').html(streamObject.streamHeader); } + if(streamObject.streamDescription !== false) { + $('#feed-header-description').html(streamObject.streamDescription); + } + else { + $('#feed-header-description').empty(); + } // add menu cog if this stream has a menu if(streamObject.menu && window.loggedIn) { @@ -892,14 +927,21 @@ function setNewCurrentStream(streamObject,setLocation,fallbackId,actionOnSuccess else { showErrorMessage(window.sL.ERRORcouldNotFindPage + '

    url: ' + url); } + emptyRememberAndHideFeed(); } else if(error.status == 410 && streamObject.name == 'notice') { showErrorMessage(window.sL.ERRORnoticeRemoved); + emptyRememberAndHideFeed(); } else if(error.status == 0 || (error.status == 200 && error.responseText == 'An error occurred.') ) { showErrorMessage(window.sL.ERRORnoContactWithServer + ' (' + replaceHtmlSpecialChars(error.statusText) + ')'); + // don't hide feed for these errors + } + else if (typeof error.responseJSON.error != 'undefined' && error.responseJSON.error.length > 0) { + showErrorMessage(error.responseJSON.error); + emptyRememberAndHideFeed(); } else { showErrorMessage(window.sL.ERRORsomethingWentWrong + '

    \ @@ -908,6 +950,9 @@ function setNewCurrentStream(streamObject,setLocation,fallbackId,actionOnSuccess streamObject:
    ' + replaceHtmlSpecialChars(JSON.stringify(streamObject, null, ' ')) + '
    \ '); } + + // make sure page-container is visible + $('#page-container').css('opacity','1'); } // everything seems fine, show the new stream @@ -1006,6 +1051,20 @@ function setNewCurrentStream(streamObject,setLocation,fallbackId,actionOnSuccess }); } +/* · + · + · Empties the feed body, remembers the new empty state in localstorage and hide the feed and any profile card + · and mark this stream as current + · + · · · · · · · · · */ + +function emptyRememberAndHideFeed() { + $('#feed').css('opacity','0'); + $('#feed-body').empty(); + $('.profile-card').remove(); + rememberStreamStateInLocalStorage(); + } + /* · · @@ -1915,6 +1974,17 @@ function buildUserStreamItemHtml(obj) { blockingClass = ' blocking'; } + // silenced? + var silencedClass = ''; + if(obj.is_silenced === true) { + silencedClass = ' silenced'; + } + // sandboxed? + var sandboxedClass = ''; + if(obj.is_sandboxed === true) { + sandboxedClass = ' sandboxed'; + } + var followButton = ''; if(typeof window.loggedIn.screen_name != 'undefined' // if logged in && window.loggedIn.id != obj.id) { // not if this is me @@ -1923,14 +1993,16 @@ function buildUserStreamItemHtml(obj) { } } - return '
    \ + return '
    \
    \ ' + followButton + '\
    \
    \ \ ' + ostatusHtml + '\ @@ -1965,6 +2037,14 @@ function buildQueetHtml(obj, idInStream, extraClasses, requeeted_by, isConversat }); } + // silenced? + if(obj.user.is_silenced === true) { + extraClasses += ' silenced'; + } + // sandboxed? + if(obj.user.is_sandboxed === true) { + extraClasses += ' sandboxed'; + } // deleted? if(typeof window.knownDeletedNotices[obj.uri] != 'undefined') { extraClasses += ' deleted always-hidden'; @@ -2146,7 +2226,9 @@ function buildQueetHtml(obj, idInStream, extraClasses, requeeted_by, isConversat
    \ ' + '' + reply_to_html + in_groups_html + '' + diff --git a/js/misc-functions.js b/js/misc-functions.js index 64b11fa..388a4b9 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -899,6 +899,16 @@ function updateUserDataInStream() { && typeof userArray.modified != 'undefined' && (timeNow-userArray.modified)<1000) { + // add/remove silenced class to stream items and profile cards + if(userArray.local.is_silenced === true) { + $('.stream-item[data-user-id=' + userArray.local.id + ']').addClass('silenced'); + $('.profile-card .profile-header-inner[data-user-id=' + userArray.local.id + ']').addClass('silenced'); + } + else { + $('.stream-item[data-user-id=' + userArray.local.id + ']').removeClass('silenced') + $('.profile-card .profile-header-inner[data-user-id=' + userArray.local.id + ']').removeClass('silenced'); + } + // profile size avatars (notices, users) $.each($('img.avatar.profile-size[data-user-id="' + userArray.local.id + '"]'),function(){ if($(this).attr('src') != userArray.local.profile_image_url_profile_size) { diff --git a/js/qvitter.js b/js/qvitter.js index 5d49d81..187e44e 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -935,6 +935,7 @@ function proceedToSetLanguageAndLogin(data){ $('.stream-selection.public-timeline').prepend(window.sL.publicTimeline); $('.stream-selection.public-and-external-timeline').prepend(window.sL.publicAndExtTimeline) $('#search-query').attr('placeholder',window.sL.searchVerb); + $('#blocking-link').html(window.sL.userBlocks); $('#faq-link').html(window.sL.FAQ); $('#tou-link').html(window.sL.showTerms); $('#add-edit-language-link').html(window.sL.addEditLanguageLink); @@ -2793,6 +2794,12 @@ $('body').on('click','.reload-stream',function () { }); // can be used a callback too, e.g. from profile pref toggles function reloadCurrentStream() { + + // always clear cache for this stream when reloading using this function + $('#feed-body').empty(); + rememberStreamStateInLocalStorage(); + + // reload setNewCurrentStream(URLtoStreamRouter(window.location.href),false,false,false); } diff --git a/js/stream-router.js b/js/stream-router.js index f7ed994..6cabd3d 100644 --- a/js/stream-router.js +++ b/js/stream-router.js @@ -126,6 +126,7 @@ function pathToStreamRouter(path) { name: false, // human readable name streamHeader: false, // short header, e.g. links and buttons – no html! streamSubHeader: false, // a longer header, that can include html and links + streamDescription: false, // description of the stream parentPath: false, // a parent path can e.g. be "group/qvitter" for "group/qvitter/members" stream: false, // the API path nickname: false, // if we can read a nickname/screen_name from the path, add it to this property @@ -157,6 +158,19 @@ function pathToStreamRouter(path) { topic: 'hide_quotes_in_timeline:' + streamObject.path, label: window.sL.hideQuotesInTimeline, callback: 'showOrHideQuotesInTimelineFromProfilePref' + }, + { + type: 'divider' + }, + { + type: 'link', + label: window.sL.silencedPlural, + href: window.siteInstanceURL + 'main/silenced' + }, + { + type: 'link', + label: window.sL.sandboxedPlural, + href: window.siteInstanceURL + 'main/sandboxed' } ]; streamObject.callbacks = [ @@ -188,6 +202,19 @@ function pathToStreamRouter(path) { topic: 'hide_quotes_in_timeline:' + streamObject.path, label: window.sL.hideQuotesInTimeline, callback: 'showOrHideQuotesInTimelineFromProfilePref' + }, + { + type: 'divider' + }, + { + type: 'link', + label: window.sL.silencedPlural, + href: window.siteInstanceURL + 'main/silenced' + }, + { + type: 'link', + label: window.sL.sandboxedPlural, + href: window.siteInstanceURL + 'main/sandboxed' } ]; streamObject.callbacks = [ @@ -239,6 +266,30 @@ function pathToStreamRouter(path) { } } + // main/silenced + if(path == 'main/silenced') { + streamObject.name = 'silenced profiles'; + streamObject.streamHeader = window.sL.silencedPlural; + streamObject.streamSubHeader = window.sL.silencedUsersOnThisInstance; + streamObject.streamDescription = window.sL.silencedStreamDescription; + streamObject.stream = 'qvitter/silenced.json?count=20'; + streamObject.maxIdOrPage = 'page'; + streamObject.type = 'users'; + return streamObject; + } + + // main/sandboxed + if(path == 'main/sandboxed') { + streamObject.name = 'sandboxed profiles'; + streamObject.streamHeader = window.sL.sandboxedPlural; + streamObject.streamSubHeader = window.sL.sandboxedUsersOnThisInstance; + streamObject.streamDescription = window.sL.sandboxedStreamDescription; + streamObject.stream = 'qvitter/sandboxed.json?count=20'; + streamObject.maxIdOrPage = 'page'; + streamObject.type = 'users'; + return streamObject; + } + // {screen_name} if(/^[a-zA-Z0-9]+$/.test(path)) { streamObject.name = 'profile'; @@ -443,8 +494,7 @@ function pathToStreamRouter(path) { streamObject.nickname = pathSplit[0]; if(window.loggedIn.screen_name == streamObject.nickname) { streamObject.stream = 'statuses/mentions.json'; - streamObject.streamHeader = '@' + replaceHtmlSpecialChars(streamObject.nickname); - streamObject.streamSubHeader = window.sL.mentions; + streamObject.streamHeader = window.sL.mentions; } else { streamObject.parentPath = streamObject.nickname; @@ -512,6 +562,16 @@ function pathToStreamRouter(path) { { type: 'divider' }, + { + type: 'profile-prefs-toggle', + namespace: 'qvitter', + topic: 'only_show_notifications_from_users_i_follow', + label: window.sL.onlyShowNotificationsFromUsersIFollow, + callback: 'reloadCurrentStream' + }, + { + type: 'divider' + }, { type: 'profile-prefs-toggle', namespace: 'qvitter', diff --git a/locale/ar.json b/locale/ar.json index 4d17ca9..1781224 100644 --- a/locale/ar.json +++ b/locale/ar.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/ast.json b/locale/ast.json index 453b49f..09d8c69 100644 --- a/locale/ast.json +++ b/locale/ast.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/ca.json b/locale/ca.json index f778b37..fdef729 100644 --- a/locale/ca.json +++ b/locale/ca.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/de.json b/locale/de.json index daaf1fd..6c4b087 100644 --- a/locale/de.json +++ b/locale/de.json @@ -170,5 +170,14 @@ "failedBlockingUser": "Blockieren des Benutzers fehlgeschlagen.", "failedUnblockingUser": "Entblockieren des Benutzers fehlgeschlagen.", "unblockUser": "Entblockiere {username}", - "tooltipBlocksYou": "{username} blockiert dich, sodass du ihm nicht folgen kannst." + "tooltipBlocksYou": "{username} blockiert dich, sodass du ihm nicht folgen kannst.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/en.json b/locale/en.json index d11c471..6f35c76 100644 --- a/locale/en.json +++ b/locale/en.json @@ -98,7 +98,7 @@ "signUpEmail": "Email", "signUpButtonText": "Sign up to {site-title}", "welcomeHeading": "Welcome to {site-title}.", - "welcomeText": "We are a
    \"Federation\" means that you don't need a {site-title} account to be able to follow, be followed by or interact with {site-title} users. You can register on any StatusNet or GNU social server or any service based on the the Ostatus protocol! You don't even have to join a service – try installing the lovely GNU social software on your own server! :)
    federation
    of microbloggers who care about ethics and solidarity and want to quit the centralised capitalist services.", + "welcomeText": "We are a
    \"Federation\" means that you don't need a {site-title} account to be able to follow, be followed by or interact with {site-title} users. You can register on any StatusNet or GNU social server or any service based on the the Ostatus protocol! You don't even have to join a service – try installing the lovely GNU social software on your own server! :)
    federation
    of microbloggers who care about social justice and solidarity and want to quit the centralised capitalist services.", "registerNickname": "Nickname", "registerHomepage": "Homepage", "registerBio": "Bio", @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/eo.json b/locale/eo.json index 7eb8c5b..497d017 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/es.json b/locale/es.json index a7edf80..9e35e21 100644 --- a/locale/es.json +++ b/locale/es.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Falló el bloqueo al usuario.", "failedUnblockingUser":"Falló el desbloqueo del usuario .", "unblockUser": "Desbloquear a {username}", - "tooltipBlocksYou":"Has sido bloqueado por {username}." + "tooltipBlocksYou":"Has sido bloqueado por {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/es_ahorita.json b/locale/es_ahorita.json index c83203a..edb2d8e 100644 --- a/locale/es_ahorita.json +++ b/locale/es_ahorita.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/eu.json b/locale/eu.json index e269780..00cd0a0 100644 --- a/locale/eu.json +++ b/locale/eu.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/fa.json b/locale/fa.json index bbfcff3..b3ed018 100644 --- a/locale/fa.json +++ b/locale/fa.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/fi.json b/locale/fi.json index 9d41e01..9325e30 100644 --- a/locale/fi.json +++ b/locale/fi.json @@ -171,5 +171,14 @@ "failedBlockingUser":"Käyttäjän esto epäoinnistui.", "failedUnblockingUser":"Eston poisto epäoinnistui.", "unblockUser": "Poista esto käyttäjältä {username}", - "tooltipBlocksYou":"{username} on estänyt sinut." + "tooltipBlocksYou":"{username} on estänyt sinut.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/fr.json b/locale/fr.json index f564a4e..7a40010 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/gl.json b/locale/gl.json index d092e18..5a966f0 100644 --- a/locale/gl.json +++ b/locale/gl.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/he.json b/locale/he.json index cffad42..a905a65 100644 --- a/locale/he.json +++ b/locale/he.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/io.json b/locale/io.json index 157989a..025c2be 100644 --- a/locale/io.json +++ b/locale/io.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/it.json b/locale/it.json index 39a0793..840c0fe 100644 --- a/locale/it.json +++ b/locale/it.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/ja.json b/locale/ja.json index 27c3e72..bc56840 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/nb.json b/locale/nb.json index 4a472d7..dc8e3a8 100644 --- a/locale/nb.json +++ b/locale/nb.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Kunne ikke blokkere brukeren.", "failedUnblockingUser":"Kunne ikke oppheve blokkeringen av bruker.", "unblockUser": "Opphev blokkering {username}", - "tooltipBlocksYou":"Du er blokkert fra å følge profilen {username}." + "tooltipBlocksYou":"Du er blokkert fra å følge profilen {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/nl.json b/locale/nl.json index 3001145..48d8320 100644 --- a/locale/nl.json +++ b/locale/nl.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Gefaald om de gebruiker te blokkeren.", "failedUnblockingUser":"Gefaald om de gebruiker te deblokkeren.", "unblockUser": "Deblokkeer {username}", - "tooltipBlocksYou":"Je wordt geblokkeerd van het volgen van {username}." + "tooltipBlocksYou":"Je wordt geblokkeerd van het volgen van {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/pt.json b/locale/pt.json index b801895..b1bdc67 100644 --- a/locale/pt.json +++ b/locale/pt.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/pt_br.json b/locale/pt_br.json index 787a5a8..873b759 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Falha ao bloquear usuário.", "failedUnblockingUser":"Falha ao desbloquear usuário.", "unblockUser": "Desbloquear {username}", - "tooltipBlocksYou":"Você está impedido de seguir {username}." + "tooltipBlocksYou":"Você está impedido de seguir {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/ru.json b/locale/ru.json index 703c866..fb0e07f 100644 --- a/locale/ru.json +++ b/locale/ru.json @@ -168,5 +168,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/sq.json b/locale/sq.json index a8ccbe1..a90184b 100644 --- a/locale/sq.json +++ b/locale/sq.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/sv.json b/locale/sv.json index 7496751..5b591c8 100644 --- a/locale/sv.json +++ b/locale/sv.json @@ -98,7 +98,7 @@ "signUpEmail": "E-post", "signUpButtonText": "Registrera dig på {site-title}", "welcomeHeading": "Välkommen till {site-title}.", - "welcomeText": "Vi är en
    \"Federering\" betyder att du inte behöver ha ett {site-title}-konto för att följa, följas av eller prata med quittrare. Du kan registrera dig på vilken sajt som helst som stödjer protokollet Ostatus, eller mikroblogga på en helt egen server, förslagsvis med den fria programvaran GNU social (som {site-title} bygger på).
    federerad
    allmänning, där du som har hoppat av de centraliserade kapitalistiska tjänsterna kan mikroblogga etiskt och solidariskt.", + "welcomeText": "Vi är en
    \"Federering\" betyder att du inte behöver ha ett {site-title}-konto för att följa, följas av eller prata med quittrare. Du kan registrera dig på vilken sajt som helst som stödjer protokollet Ostatus, eller mikroblogga på en helt egen server, förslagsvis med den fria programvaran GNU social (som {site-title} bygger på).
    federerad
    allmänning, där du som har hoppat av de centraliserade kapitalistiska tjänsterna kan mikroblogga rättvist och solidariskt.", "registerNickname": "Användarnamn", "registerHomepage": "Webbplats", "registerBio": "Biografi", @@ -170,5 +170,14 @@ "failedBlockingUser":"Misslyckades med att blockera användaren.", "failedUnblockingUser":"Misslyckades med att avblockera användaren.", "unblockUser": "Avblockera {username}", - "tooltipBlocksYou":"Du är blockerad från att följa {username}." + "tooltipBlocksYou":"Du är blockerad från att följa {username}.", + "silenced":"Nedtystad", + "silencedPlural":"Nedtystade användare", + "silencedUsersOnThisInstance":"Nedtystade användare på {site-title}", + "sandboxed":"I sandlådan", + "sandboxedPlural":"Användare i sandlådan", + "sandboxedUsersOnThisInstance":"Användare i sandlådan på {site-title}", + "silencedStreamDescription":"Nedtystade användare kan inte logga in eller skriva qvittringar. Qvittringar som de redan skrivit är dolda. För lokala användare är det som en borttagning som kan ångras, och för externa användare är det som att blockera användaren från instansen.", + "sandboxedStreamDescription":"Qvittringar från användare som är i sandlådan visas inte i "Hela sajtens flöde" eller "Hela det kända nätverket". Qvittringar som användaren skriver under tiden den är i sandlådan kommer inte visas i de offentliga flödena om hen tas ur sandlådan senare.", + "onlyShowNotificationsFromUsersIFollow":"Visa bara notiser från användare som jag följer" } diff --git a/locale/tr.json b/locale/tr.json index d5e2fa6..cf98047 100644 --- a/locale/tr.json +++ b/locale/tr.json @@ -170,5 +170,14 @@ "failedBlockingUser":"Kullanıcı engellenemedi.", "failedUnblockingUser":"Kullanıcının engeli kaldırılamadı.", "unblockUser": "{username} engelini kaldır", - "tooltipBlocksYou":"You are blocked from following {username}." -} \ No newline at end of file + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" +} diff --git a/locale/zh_cn.json b/locale/zh_cn.json index 3cc8d2a..8b754fe 100644 --- a/locale/zh_cn.json +++ b/locale/zh_cn.json @@ -169,5 +169,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } diff --git a/locale/zh_tw.json b/locale/zh_tw.json index ee9cde6..c5f430f 100644 --- a/locale/zh_tw.json +++ b/locale/zh_tw.json @@ -169,5 +169,14 @@ "failedBlockingUser":"Failed to block the user.", "failedUnblockingUser":"Failed to unblock the user.", "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}." + "tooltipBlocksYou":"You are blocked from following {username}.", + "silenced":"Silenced", + "silencedPlural":"Silenced profiles", + "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", + "sandboxed":"Sandboxed", + "sandboxedPlural":"Sandboxed profiles", + "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", + "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", + "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" } From 09b7d070f6f57592bb4bb1025fd07ca86a8fc25e Mon Sep 17 00:00:00 2001 From: abjectio Date: Fri, 26 Feb 2016 23:59:47 +0100 Subject: [PATCH 089/120] updated norwegian translation --- locale/nb.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/locale/nb.json b/locale/nb.json index dc8e3a8..6ebc9da 100644 --- a/locale/nb.json +++ b/locale/nb.json @@ -171,13 +171,13 @@ "failedUnblockingUser":"Kunne ikke oppheve blokkeringen av bruker.", "unblockUser": "Opphev blokkering {username}", "tooltipBlocksYou":"Du er blokkert fra å følge profilen {username}.", - "silenced":"Silenced", - "silencedPlural":"Silenced profiles", - "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", - "sandboxed":"Sandboxed", - "sandboxedPlural":"Sandboxed profiles", - "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", - "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", - "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "silenced":"Forstummet", + "silencedPlural":"Forstummede profiler", + "silencedUsersOnThisInstance":"Forstummede profiler på {site-title}", + "sandboxed":"Lekekasse", + "sandboxedPlural":"Profiler satt i lekekasse", + "sandboxedUsersOnThisInstance":"Profiler satt i lekekasse på {site-title}", + "silencedStreamDescription":"Forstummede brukere can ikke logge på tjenesten, sende status meldinger, samt allerede status meldinger er skjult. For lokale brukere vil dette oppleves som å bli slettet, men beslutnignen kan reverseres. For brukere på andre instanser vil det oppleves som en utvidet blokkering.", + "sandboxedStreamDescription":"Statusmeldinger fra brukere satt i lekekassen, så vil meldingene bli ekskludert fra den offentlige tidslinjen og hele nettverks tidslinjen. Statusmeldinger send når man er i lekekasse vil ikke bli inkludert i den offentlige tidslinjen hvis brukeren blir tatt ut av lekekassen.", + "onlyShowNotificationsFromUsersIFollow":"Vis kun notifikasjoner fra brukere jeg følger" } From f2a6bbf6855b2f7e72de054467aecad828dfc13a Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 27 Feb 2016 01:59:31 +0100 Subject: [PATCH 090/120] fixed width stream-item menu --- css/qvitter.css | 106 ++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/css/qvitter.css b/css/qvitter.css index e138c08..6b61f1d 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -508,7 +508,8 @@ body.rtl .dropdown-menu li:not(.dropdown-caret) { text-decoration: none; } .quitter-settings.dropdown-menu li.fullwidth:not(.dropdown-caret) a, -#stream-menu-cog .dropdown-menu li.fullwidth:not(.dropdown-caret) a { +#stream-menu-cog .dropdown-menu li.fullwidth:not(.dropdown-caret) a, +.action-ellipsis-container .dropdown-menu li.fullwidth:not(.dropdown-caret) a { white-space: normal; width: 100%; box-sizing:border-box; @@ -526,10 +527,8 @@ body.rtl .dropdown-menu li:not(.dropdown-caret) { display: block; right: auto; } -.action-ellipsis-container .dropdown-menu, -.action-ellipsis-container .dropdown-menu li:not(.dropdown-caret), -.action-ellipsis-container .dropdown-menu a { - width:auto; +.action-ellipsis-container .dropdown-menu { + width:150px; } .dropdown-menu .row-type-profile-prefs-toggle::before { @@ -1893,6 +1892,7 @@ background-repeat: no-repeat; line-height: 18px; padding: 0 5px; display:none; + color:rgba(0,0,0,0.5); } .stream-item .account-group span.sandboxed-flag { background-color: #00ccff; @@ -1905,7 +1905,7 @@ background-repeat: no-repeat; .profile-card .profile-header-inner span.sandboxed-flag { background-color: pink; border-radius: 3px; - color: black; + color:rgba(0,0,0,0.5); display: none; font-size: 11px; line-height: 24px; @@ -2803,7 +2803,7 @@ ul.queet-actions { } -ul.queet-actions a { +ul.queet-actions > li > a { color: #ddd; display: block; height: 26px; @@ -2819,12 +2819,12 @@ ul.queet-actions a { .stream-item.expanded > .stream-item.expanded .queet ul.queet-actions { display: block; } -ul.queet-actions li { +ul.queet-actions > li { display: inline-block; height: 26px; line-height: 26px; } -ul.queet-actions li .icon { +ul.queet-actions > li .icon { background-repeat: no-repeat; display: inline-block; font-size: 17px; @@ -2834,34 +2834,34 @@ ul.queet-actions li .icon { margin-right:7px; position: relative; } -ul.queet-actions li:not(:first-child) .icon { +ul.queet-actions > li:not(:first-child) .icon { margin-left:52px; } .queet.rtl ul.queet-actions .icon { margin-left:26px; } -.queet.rtl ul.queet-actions li .icon { +.queet.rtl ul.queet-actions > li .icon { margin-right:0; } -ul.queet-actions li.action-rt-container .with-icn.done .icon:before { +ul.queet-actions > li.action-rt-container .with-icn.done .icon:before { color: #609928; } -ul.queet-actions li.action-rt-container .with-icn .icon:not(.is-mine):hover:before { +ul.queet-actions > li.action-rt-container .with-icn .icon:not(.is-mine):hover:before { color: #609928; } -ul.queet-actions li.action-fav-container .with-icn.done .icon:before { +ul.queet-actions > li.action-fav-container .with-icn.done .icon:before { color: #ffac33; } -.stream-item:not(.temp-post) ul.queet-actions li.action-fav-container .with-icn .icon:hover:before { +.stream-item:not(.temp-post) ul.queet-actions > li.action-fav-container .with-icn .icon:hover:before { color: #ffac33; } -.stream-item:not(.temp-post) ul.queet-actions li.action-rt-container .with-icn .icon:not(.is-mine):hover:before { +.stream-item:not(.temp-post) ul.queet-actions > li.action-rt-container .with-icn .icon:not(.is-mine):hover:before { color: #609928; } -ul.queet-actions li.action-rq-num, -ul.queet-actions li.action-fav-num { +ul.queet-actions > li.action-rq-num, +ul.queet-actions > li.action-fav-num { color: rgba(0, 0, 0, 0.45); display: inline-block; font-size: 12px; @@ -2870,21 +2870,21 @@ ul.queet-actions li.action-fav-num { line-height: 32px; vertical-align: top; } -.stream-item.expanded:not(.collapsing) > .queet ul.queet-actions li.action-rq-num, -.stream-item.expanded:not(.collapsing) > .queet ul.queet-actions li.action-fav-num, -ul.queet-actions li.action-rq-num[data-rq-num="0"], -ul.queet-actions li.action-fav-num[data-fav-num="0"] { +.stream-item.expanded:not(.collapsing) > .queet ul.queet-actions > li.action-rq-num, +.stream-item.expanded:not(.collapsing) > .queet ul.queet-actions > li.action-fav-num, +ul.queet-actions > li.action-rq-num[data-rq-num="0"], +ul.queet-actions > li.action-fav-num[data-fav-num="0"] { display:none; } -.stream-item.requeeted > .queet ul.queet-actions li.action-rq-num { +.stream-item.requeeted > .queet ul.queet-actions > li.action-rq-num { color:#609928; } -.stream-item.favorited > .queet ul.queet-actions li.action-fav-num { +.stream-item.favorited > .queet ul.queet-actions > li.action-fav-num { color:#ffac33; } -ul.queet-actions li .icon:before { +ul.queet-actions > li .icon:before { color: rgba(0, 0, 0, 0.15); display: inline-block; font-family: FontAwesome; @@ -2895,15 +2895,15 @@ ul.queet-actions li .icon:before { vertical-align:text-top; width:21px; } -.stream-item.temp-post ul.queet-actions li .icon:before { +.stream-item.temp-post ul.queet-actions > li .icon:before { color:rgba(0,0,0,0.05); } -ul.queet-actions li .icon.sm-fav:before { +ul.queet-actions > li .icon.sm-fav:before { transition: font-size 0.2s cubic-bezier(0, 0, 1, 1) 0s; } -ul.queet-actions li .icon.sm-fav.pulse:before { +ul.queet-actions > li .icon.sm-fav.pulse:before { animation: starpulse 0.4s; animation-timing-function: ease-in-out; } @@ -2914,7 +2914,7 @@ ul.queet-actions li .icon.sm-fav.pulse:before { } -ul.queet-actions li .icon.sm-rt:before { +ul.queet-actions > li .icon.sm-rt:before { -webkit-transition-duration: 0.8s; -moz-transition-duration: 0.8s; -o-transition-duration: 0.8s; @@ -2924,30 +2924,30 @@ ul.queet-actions li .icon.sm-rt:before { -o-transition-property: -o-transform; transition-property: transform; } -ul.queet-actions li .icon.sm-rt.rotate:before { +ul.queet-actions > li .icon.sm-rt.rotate:before { -webkit-transform:rotate(360deg); -moz-transform:rotate(360deg); -o-transform:rotate(360deg); transform:rotate(360deg); } -ul.queet-actions li .icon.sm-reply:before { +ul.queet-actions > li .icon.sm-reply:before { content: "\f112"; } -ul.queet-actions li .icon.sm-rt:before { +ul.queet-actions > li .icon.sm-rt:before { content: "\f079"; } -ul.queet-actions li .icon.sm-trash:before { +ul.queet-actions > li .icon.sm-trash:before { content: "\f1f8"; } -ul.queet-actions li .icon.sm-fav:before { +ul.queet-actions > li .icon.sm-fav:before { content: "\f005"; } -ul.queet-actions li .icon.sm-ellipsis:before { +ul.queet-actions > li .icon.sm-ellipsis:before { content: "\f141"; font-size: 22px; } -ul.queet-actions li .icon.is-mine:before { +ul.queet-actions > li .icon.is-mine:before { opacity:0.4; cursor:default; } @@ -6045,15 +6045,15 @@ body.rtl #feed-header-inner h2 { right:-10px; } - ul.queet-actions li { + ul.queet-actions > li { margin-right: 0; text-align: center; width: 25%; } - ul.queet-actions li .icon { + ul.queet-actions > li .icon { margin-left: 26px; } - ul.queet-actions li .with-icn { + ul.queet-actions > li .with-icn { margin-left: 0; } .stream-item:hover > .queet ul.queet-actions { @@ -6078,19 +6078,19 @@ body.rtl #feed-header-inner h2 { /* .stream-item.collapsing > .queet ul.queet-actions { display:none !important; } */ - ul.queet-actions li .icon.sm-fav, - ul.queet-actions li .icon.sm-rt, - ul.queet-actions li .icon.sm-trash, - ul.queet-actions li .icon.sm-reply { + ul.queet-actions > li .icon.sm-fav, + ul.queet-actions > li .icon.sm-rt, + ul.queet-actions > li .icon.sm-trash, + ul.queet-actions > li .icon.sm-reply { font-size: 25px; height: 45px; width: 45px; margin-right:20px; } - ul.queet-actions li .icon.sm-fav { + ul.queet-actions > li .icon.sm-fav { margin-right:0px; } - ul.queet-actions li .icon:before { + ul.queet-actions > li .icon:before { line-height: 45px; width:45px; height: 45px; @@ -6101,28 +6101,28 @@ body.rtl #feed-header-inner h2 { 100% {font-size: 25px;} } - ul.queet-actions li .icon.sm-reply { + ul.queet-actions > li .icon.sm-reply { background-position: -10px -920px; } - ul.queet-actions li .icon.sm-rt { + ul.queet-actions > li .icon.sm-rt { background-position: -60px -920px; } - ul.queet-actions li .icon.sm-fav { + ul.queet-actions > li .icon.sm-fav { background-position:-110px -920px; } - ul.queet-actions li .icon.sm-trash { + ul.queet-actions > li .icon.sm-trash { background-position:-145px -921px; } - .stream-item.expanded > .stream-item.expanded .queet ul.queet-actions li .icon.sm-reply { + .stream-item.expanded > .stream-item.expanded .queet ul.queet-actions > li .icon.sm-reply { background-position: -10px -962px; } - .stream-item.expanded > .stream-item.expanded .queet ul.queet-actions li .icon.sm-rt { + .stream-item.expanded > .stream-item.expanded .queet ul.queet-actions > li .icon.sm-rt { background-position: -60px -962px; } - .stream-item.expanded > .stream-item.expanded .queet ul.queet-actions li .icon.sm-fav { + .stream-item.expanded > .stream-item.expanded .queet ul.queet-actions > li .icon.sm-fav { background-position:-110px -962px; } - .stream-item.expanded > .stream-item.expanded .queet ul.queet-actions li .icon.sm-trash { + .stream-item.expanded > .stream-item.expanded .queet ul.queet-actions > li .icon.sm-trash { background-position:-145px -963px; } From 5dc4b74fb749e3f87e3a08dcaabb1d84e16be45b Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 27 Feb 2016 02:00:25 +0100 Subject: [PATCH 091/120] user rights in api user array --- QvitterPlugin.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 8d767ef..36a1db5 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -821,6 +821,13 @@ class QvitterPlugin extends Plugin { // silenced? $twitter_user['is_silenced'] = $profile->isSilenced(); + // rights + $twitter_user['rights'] = array(); + $twitter_user['rights']['delete_user'] = $profile->hasRight(Right::DELETEUSER); + $twitter_user['rights']['delete_others_notice'] = $profile->hasRight(Right::DELETEOTHERSNOTICE); + $twitter_user['rights']['silence'] = $profile->hasRight(Right::SILENCEUSER); + $twitter_user['rights']['sandbox'] = $profile->hasRight(Right::SANDBOXUSER); + // sandboxed? $twitter_user['is_sandboxed'] = $profile->isSandboxed(); From 1d63aa14f01dbd7b3a43f6947e2f8be551f8495b Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 27 Feb 2016 02:01:09 +0100 Subject: [PATCH 092/120] link to sandboxed from silenced and vice versa --- js/stream-router.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/js/stream-router.js b/js/stream-router.js index 6cabd3d..83157f4 100644 --- a/js/stream-router.js +++ b/js/stream-router.js @@ -275,6 +275,13 @@ function pathToStreamRouter(path) { streamObject.stream = 'qvitter/silenced.json?count=20'; streamObject.maxIdOrPage = 'page'; streamObject.type = 'users'; + streamObject.menu = [ + { + type: 'link', + label: window.sL.sandboxedPlural, + href: window.siteInstanceURL + 'main/sandboxed' + } + ]; return streamObject; } @@ -287,6 +294,13 @@ function pathToStreamRouter(path) { streamObject.stream = 'qvitter/sandboxed.json?count=20'; streamObject.maxIdOrPage = 'page'; streamObject.type = 'users'; + streamObject.menu = [ + { + type: 'link', + label: window.sL.silencedPlural, + href: window.siteInstanceURL + 'main/silenced' + } + ]; return streamObject; } @@ -567,7 +581,7 @@ function pathToStreamRouter(path) { namespace: 'qvitter', topic: 'only_show_notifications_from_users_i_follow', label: window.sL.onlyShowNotificationsFromUsersIFollow, - callback: 'reloadCurrentStream' + callback: 'reloadCurrentStreamAndClearCache' }, { type: 'divider' @@ -577,28 +591,28 @@ function pathToStreamRouter(path) { namespace: 'qvitter', topic: 'disable_notify_replies_and_mentions', label: window.sL.notifyRepliesAndMentions, - callback: 'reloadCurrentStream' + callback: 'reloadCurrentStreamAndClearCache' }, { type: 'profile-prefs-toggle', namespace: 'qvitter', topic: 'disable_notify_favs', label: window.sL.notifyFavs, - callback: 'reloadCurrentStream' + callback: 'reloadCurrentStreamAndClearCache' }, { type: 'profile-prefs-toggle', namespace: 'qvitter', topic: 'disable_notify_repeats', label: window.sL.notifyRepeats, - callback: 'reloadCurrentStream' + callback: 'reloadCurrentStreamAndClearCache' }, { type: 'profile-prefs-toggle', namespace: 'qvitter', topic: 'disable_notify_follows', label: window.sL.notifyFollows, - callback: 'reloadCurrentStream' + callback: 'reloadCurrentStreamAndClearCache' } ]; streamObject.callbacks = [ From 80a8ad5f301680ccb6691571d49813245c7d34d1 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 27 Feb 2016 02:01:27 +0100 Subject: [PATCH 093/120] mods can delete others notices --- js/qvitter.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/js/qvitter.js b/js/qvitter.js index 187e44e..95ff545 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -1238,8 +1238,8 @@ $('body').on('click','.sm-ellipsis',function(e){ // menu var menuArray = []; - // my notice - if(streamItemUserID == window.loggedIn.id) { + // delete my notice, or others notices for mods with rights + if(streamItemUserID == window.loggedIn.id || window.loggedIn.rights.delete_others_notice === true) { menuArray.push({ type: 'function', functionName: 'deleteQueet', @@ -1249,8 +1249,8 @@ $('body').on('click','.sm-ellipsis',function(e){ label: window.sL.deleteVerb }); } - // other users' notices - else { + // block/unblock if it's not me + if(streamItemUserID != window.loggedIn.id) { if(userIsBlocked(streamItemUserID)) { menuArray.push({ type: 'function', @@ -2794,13 +2794,23 @@ $('body').on('click','.reload-stream',function () { }); // can be used a callback too, e.g. from profile pref toggles function reloadCurrentStream() { + setNewCurrentStream(URLtoStreamRouter(window.location.href),false,false,false); + } - // always clear cache for this stream when reloading using this function + +/* · + · + · Reload current stream and clear cache + · + · · · · · · · · · · · · · */ + +function reloadCurrentStreamAndClearCache() { + $('#feed-body').empty(); rememberStreamStateInLocalStorage(); // reload - setNewCurrentStream(URLtoStreamRouter(window.location.href),false,false,false); + reloadCurrentStream(); } /* · From 9271c4e5f0c3ed1c769850623bb45fd6f0260ff6 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 27 Feb 2016 03:12:06 +0100 Subject: [PATCH 094/120] keep stream-item container for notices in reply and delete popups --- css/qvitter.css | 31 +++++++++---------------------- js/dom-functions.js | 4 ++-- js/qvitter.js | 23 ++++++++++------------- 3 files changed, 21 insertions(+), 37 deletions(-) diff --git a/css/qvitter.css b/css/qvitter.css index 6b61f1d..a274d70 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -2646,21 +2646,6 @@ body.rtl .view-more-container-bottom { direction:rtl; } right:12px; left:auto; } -.modal-container .modal-body .stream-item-header .avatar { - left:10px; - } -.modal-container .modal-footer .stream-item-header .avatar, -.modal-container .modal-footer .stream-item-header .name:before { - left:0px; - } -.modal-container .modal-footer .queet > .context { - margin-bottom: 0; - margin-top: -10px; - padding-left: 59px; - } -.modal-container .modal-footer .queet > .context .with-icn .badge-requeeted { - left: 32px; - } .stream-item-header .name { color: #333333; @@ -4632,6 +4617,7 @@ background:rgba(0,0,0,0.2); border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.5) inset; position: relative; + overflow: hidden; } .modal-close { margin: 0; @@ -4704,18 +4690,19 @@ background:rgba(0,0,0,0.2); content: " "; clear: both; } -.modal-footer .queet { - border-bottom:0 none; +.modal-container[id*="popup-reply-"] .modal-footer { + padding:0; + } +.modal-container[id*="popup-reply-"] .modal-footer {} +.modal-footer .queet, +.modal-footer .stream-item { + border:0 none; cursor:auto; - min-height:53px; } .modal-footer .queet:hover { background-color:#fff; } -.modal-footer .queet-content { - padding:0; - cursor:auto; - } +.modal-footer .queet-content, .modal-footer .queet-text { cursor:auto; } diff --git a/js/dom-functions.js b/js/dom-functions.js index 6e30a0f..f370e7f 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -1119,8 +1119,8 @@ function expand_queet(q,doScrolling) { return; } - // don't expand if this is a remote profile popup - if(q.closest('#popup-external-profile, #popup-local-profile').length>0) { + // don't expand if this is a popup + if(q.closest('.modal-container').length>0) { return; } diff --git a/js/qvitter.js b/js/qvitter.js index 95ff545..8ce87a4 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -2282,10 +2282,11 @@ function deleteQueet(arg) { } var this_qid = this_stream_item.attr('data-quitter-id'); - var $queetHtml = $('
    ').append(this_stream_item.html()); - var $stuffToRemove = $queetHtml.find('.stream-item-footer, .expanded-content, .inline-reply-queetbox, .stream-item.conversation, .view-more-container-top, .view-more-container-bottom'); - $stuffToRemove.remove(); - var queetHtmlWithoutFooterAndConversation = $queetHtml.html(); + + var $queetHtml = $(this_stream_item.outerHTML()); + $queetHtml.children('.stream-item.conversation').remove(); + $queetHtml.find('.context,.stream-item-footer,.inline-reply-queetbox,.expanded-content').remove(); + var queetHtmlWithoutFooterAndConversation = $queetHtml.outerHTML(); popUpAction('popup-delete-' + this_qid, window.sL.deleteConfirmation,queetHtmlWithoutFooterAndConversation,'
    '); @@ -2501,14 +2502,10 @@ $('body').on('click','.action-reply-container',function(){ this_stream_item.addClass('replying-to'); // grabbing the queet and view it in the popup, stripped of footer, reply box and other sruff - var $queetHtml = $('
    ').append(this_stream_item.children('.queet').outerHTML()); - var $queetHtmlFooter = $queetHtml.find('.stream-item-footer'); - $queetHtmlFooter.remove(); - var $queetHtmlQueetBox = $queetHtml.find('.inline-reply-queetbox'); - $queetHtmlQueetBox.remove(); - var $queetHtmlExpandedContent = $queetHtml.find('.expanded-content'); - $queetHtmlExpandedContent.remove(); - var queetHtmlWithoutFooter = $queetHtml.html(); + var $queetHtml = $(this_stream_item.outerHTML()); + $queetHtml.children('.stream-item.conversation').remove(); + $queetHtml.find('.context,.stream-item-footer,.inline-reply-queetbox,.expanded-content').remove(); + var queetHtmlWithoutFooter = $queetHtml.outerHTML(); popUpAction('popup-reply-' + this_stream_item_id, window.sL.replyTo + ' ' + this_stream_item.children('.queet').find('.screen-name').html(),replyFormHtml(this_stream_item,this_stream_item_id),queetHtmlWithoutFooter); $('#popup-reply-' + this_stream_item_id).find('.modal-body').find('.queet-box').trigger('click'); // expand @@ -2805,7 +2802,7 @@ function reloadCurrentStream() { · · · · · · · · · · · · · */ function reloadCurrentStreamAndClearCache() { - + $('#feed-body').empty(); rememberStreamStateInLocalStorage(); From e9d4634fb059ca46641545be36f8b91b1b8c4000 Mon Sep 17 00:00:00 2001 From: postblue Date: Sat, 27 Feb 2016 08:08:43 +0100 Subject: [PATCH 095/120] Complete french translation --- locale/fr.json | 54 +++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/locale/fr.json b/locale/fr.json index 7a40010..dfc1347 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -151,33 +151,33 @@ "ERRORfailedMarkingAllNotificationsAsRead":"Échec du marquage de toutes les notifications comme vues", "newNotification": "{new-notice-count} nouvelle notification", "newNotifications": "{new-notice-count} nouvelles notifications", - "thisIsANoticeFromABlockedUser":"Warning: This is a notice from a user you have blocked. Click to show it.", - "nicknamesListWithListName":"{nickname}’s list: {list-name}", - "myListWithListName":"My list: {list-name}", - "listMembers":"Members", - "listSubscribers":"Subscribers", - "ERRORcouldNotFindList":"There is no such list.", - "emailAlreadyInUse":"Already in use", - "addEditLanguageLink":"Help translate {site-title} to another language", - "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", - "startRant":"Start a rant", - "continueRant":"Continue the rant", + "thisIsANoticeFromABlockedUser":"Attention : il s’agit d’un message d’une personne que vous avez bloquée. Cliquez pour l’afficher.", + "nicknamesListWithListName":"Liste de {nickname} : {list-name}", + "myListWithListName":"Ma liste : {list-name}", + "listMembers":"Membres", + "listSubscribers":"Abonné·e·s", + "ERRORcouldNotFindList":"Cette liste n’existe pas.", + "emailAlreadyInUse":"Déjà utilisé", + "addEditLanguageLink":"Aidez à traduire {site-title} dans une autre langue", + "onlyPartlyTranslated":"{site-title} n’est que partiellement traduit en {language-name} ({percent}%). Vous pouvez aider à compléter la traduction sur la page d’accueil du dépôt de Qvitter", + "startRant":"Commencer une diatribe", + "continueRant":"Poursuivre la diatribe", "hideEmbeddedInTimeline":"Cacher le contenu intégré dans ces avis", "hideQuotesInTimeline":"Cacher les citations dans ces avis", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}.", - "silenced":"Silenced", - "silencedPlural":"Silenced profiles", - "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", - "sandboxed":"Sandboxed", - "sandboxedPlural":"Sandboxed profiles", - "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", - "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", - "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "userBlocks":"Comptes bloqués", + "buttonBlocked":"Bloqué", + "buttonUnblock":"Débloquer", + "failedBlockingUser":"Impossible de bloquer le compte.", + "failedUnblockingUser":"Impossible de débloquer le compte.", + "unblockUser": "Débloquer {username}", + "tooltipBlocksYou":"Votre compte est bloqué par {username}, vous ne pouvez pas la/le suivre.", + "silenced":"Réduit au silence", + "silencedPlural":"Profils réduits au silence", + "silencedUsersOnThisInstance":"Profils réduits au silence sur {site-title}", + "sandboxed":"Bac à sable", + "sandboxedPlural":"Profils dans le bac à sable", + "sandboxedUsersOnThisInstance":"Profils dans le bac à sable sur {site-title}", + "silencedStreamDescription":"Le profils réduits au silence ne peuvent pas se connecter, commencer des diatribes et celles déjà postées sont cachées. Pour les comptes locaux, le résultat est similaire à une suppression de compte qui peut être annulée. Pour les comptes distants, c’est un blocage sur l’entièreté du site.", + "sandboxedStreamDescription":"Les mises à jour des profils du bac à sable sont exclues de l’Accueil et de l’Ensemble de la Fédération. Les messages postés tout en étant dans le bac à sable ne seront pas inclus dans les flux publics si le profil est remis en dehors du bac à sable.", + "onlyShowNotificationsFromUsersIFollow":"Afficher uniquement les notifications des utilisateurs que je suis" } From 75aec590caddf06a558edf3f21347886beeba2fe Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 29 Feb 2016 16:07:31 +0100 Subject: [PATCH 096/120] bugfixes --- js/dom-functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/dom-functions.js b/js/dom-functions.js index f370e7f..ac46b15 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -507,7 +507,7 @@ function buildExternalProfileCard(data) { data.profileCardHtml = '\
    \ -
    \ +
    \
    \ \
    \ @@ -939,7 +939,7 @@ function setNewCurrentStream(streamObject,setLocation,fallbackId,actionOnSuccess showErrorMessage(window.sL.ERRORnoContactWithServer + ' (' + replaceHtmlSpecialChars(error.statusText) + ')'); // don't hide feed for these errors } - else if (typeof error.responseJSON.error != 'undefined' && error.responseJSON.error.length > 0) { + else if (typeof error.responseJSON != 'undefined' && typeof error.responseJSON.error != 'undefined' && error.responseJSON.error.length > 0) { showErrorMessage(error.responseJSON.error); emptyRememberAndHideFeed(); } From 9f24af8a023fef533c223e0fb261ff12aa992b3e Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 29 Feb 2016 19:36:50 +0100 Subject: [PATCH 097/120] user cog wheel menu --- css/qvitter.css | 35 ++++++++++++++-- js/ajax-functions.js | 1 + js/dom-functions.js | 23 ++++++++--- js/misc-functions.js | 18 ++++++++ js/qvitter.js | 94 +++++++++++++++++++++++++++++++++++++++++- locale/ar.json | 3 +- locale/ast.json | 3 +- locale/ca.json | 3 +- locale/de.json | 3 +- locale/en.json | 3 +- locale/eo.json | 3 +- locale/es.json | 3 +- locale/es_ahorita.json | 3 +- locale/eu.json | 3 +- locale/fa.json | 3 +- locale/fi.json | 3 +- locale/fr.json | 3 +- locale/gl.json | 3 +- locale/he.json | 3 +- locale/io.json | 3 +- locale/it.json | 3 +- locale/ja.json | 3 +- locale/nb.json | 3 +- locale/nl.json | 3 +- locale/pt.json | 3 +- locale/pt_br.json | 3 +- locale/ru.json | 3 +- locale/sq.json | 3 +- locale/sv.json | 3 +- locale/tr.json | 3 +- locale/zh_cn.json | 3 +- locale/zh_tw.json | 3 +- 32 files changed, 214 insertions(+), 38 deletions(-) diff --git a/css/qvitter.css b/css/qvitter.css index a274d70..042cda1 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -424,6 +424,9 @@ button.icon.nav-search span { top: 100%; z-index: 900; } +.user-menu-cog .dropdown-menu { + width:150px; + } .quitter-settings.dropdown-menu { margin-right: -400px; right: 50%; @@ -1655,7 +1658,8 @@ body.rtl #history-container.menu-container a .chev-right { display:none; } -#stream-menu-cog { +#stream-menu-cog, +.user-menu-cog { display: inline-block; font-size: 20px; line-height: 20px; @@ -1664,14 +1668,37 @@ body.rtl #history-container.menu-container a .chev-right { position: relative; cursor:pointer; } -#stream-menu-cog::before { +.user-menu-cog { + float: right; + line-height: 26px; + margin: 13px 0 0; + opacity: 0.6; + padding: 0 5px 12px 10px; + } +.hover-card .user-menu-cog { + color: #fff; + display: block; + float: none; + font-size: 16px; + margin: -32px 0 0; + opacity: 0.8; + position: absolute; + text-shadow: none; + } +.profile-card:not(.logged-in) .user-menu-cog { + display:none !important; + } +#stream-menu-cog::before, +.user-menu-cog::before { content:'\f013'; font-family: fontAwesome; } -#stream-menu-cog.dropped { +#stream-menu-cog.dropped, +.user-menu-cog.dropped { opacity:1; } -#stream-menu-cog .dropdown-menu { +#stream-menu-cog .dropdown-menu, +.user-menu-cog .dropdown-menu { z-index:1000; display:block; } diff --git a/js/ajax-functions.js b/js/ajax-functions.js index aec28db..a58d06b 100644 --- a/js/ajax-functions.js +++ b/js/ajax-functions.js @@ -261,6 +261,7 @@ function getAllFollowsMembershipsAndBlocks(callback) { if(data.blocks) { window.allBlocking = data.blocks; + markAllNoticesFromBlockedUsersAsBlockedInJQueryObject($('body')); } if(typeof callback == 'function') { diff --git a/js/dom-functions.js b/js/dom-functions.js index ac46b15..154e7f5 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -358,6 +358,18 @@ function buildProfileCard(data) { var follows_you = '' + window.sL.followsYou + ''; } + // me? + var is_me = ''; + if(window.loggedIn !== false && window.loggedIn.id == data.id) { + var is_me = ' is-me'; + } + + // logged in? + var logged_in = ''; + if(window.loggedIn !== false) { + var logged_in = ' logged-in'; + } + // silenced? var is_silenced = ''; if(data.is_silenced === true) { @@ -394,8 +406,8 @@ function buildProfileCard(data) { // full card html data.profileCardHtml = '\ -
    \ -
    \ + \ @@ -538,6 +551,7 @@ function buildExternalProfileCard(data) {
  • ' + window.sL.followers + '' + data.followers_count + '
  • \ \ ' + followButton + '\ +
    \
    \
    \
    \ @@ -783,10 +797,7 @@ function setNewCurrentStream(streamObject,setLocation,fallbackId,actionOnSuccess // hide all notices from blocked users (not for user lists) if(window.currentStreamObject.type != 'users' && typeof window.allBlocking != 'undefined') { - $.each(window.allBlocking,function(){ - oldStreamState.find('strong.name[data-user-id="' + this + '"]').closest('.stream-item').addClass('profile-blocked-by-me'); - oldStreamState.find('strong.name[data-user-id="' + this + '"]').closest('.stream-item').children('.queet').attr('data-tooltip',window.sL.thisIsANoticeFromABlockedUser); - }); + markAllNoticesFromBlockedUsersAsBlockedInJQueryObject(oldStreamState); } // hide dublicate repeats, only show the first/oldest instance of a notice diff --git a/js/misc-functions.js b/js/misc-functions.js index 388a4b9..b00385e 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -309,6 +309,8 @@ function localStorageIsEnabled() { function blockUser(arg, callback) { + $('body').click(); // a click somewhere hides any open menus + // arguments is sent as an object, for easier use with a menu's function-row var userId = arg.userId; var blockButton_jQueryElement = arg.blockButton_jQueryElement; @@ -337,6 +339,8 @@ function blockUser(arg, callback) { } function unblockUser(arg, callback) { + $('body').click(); // a click somewhere hides any open menus + // arguments is sent as an object, for easier use with a menu's function-row var userId = arg.userId; var blockButton_jQueryElement = arg.blockButton_jQueryElement; @@ -431,6 +435,20 @@ function userIsBlocked(userId) { } } +/* · + · + · Marks all notices from blocked users in an jQuery object as blocked + · + · · · · · · · · · */ + + +function markAllNoticesFromBlockedUsersAsBlockedInJQueryObject(obj) { + $.each(window.allBlocking,function(){ + obj.find('.stream-item[data-user-id="' + this + '"]').addClass('profile-blocked-by-me'); + obj.find('.stream-item[data-user-id="' + this + '"]').children('.queet').attr('data-tooltip',window.sL.thisIsANoticeFromABlockedUser); + }); + + } /* · · diff --git a/js/qvitter.js b/js/qvitter.js index 8ce87a4..1302eda 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -1174,6 +1174,95 @@ $('#settingslink').click(function(){ }); + +/* · + · + · Show/hide the user menu dropdown on click + · + · · · · · · · · · · · · · */ + +$('body').on('click','.user-menu-cog',function(e){ + if(!$(e.target).is($(this))) { + // don't show/hide when clicking inside the menu + } + + // hide + else if($(this).hasClass('dropped')) { + $(this).removeClass('dropped'); + $(this).children('.dropdown-menu').remove(); + } + + // show + else { + + $(this).addClass('dropped'); + + var profileCard = $(this).closest('.profile-card'); + var profileHeaderInner = profileCard.children('.profile-header-inner'); + var userID = profileHeaderInner.attr('data-user-id'); + var userScreenName = profileHeaderInner.attr('data-screen-name'); + var silenced = profileHeaderInner.hasClass('silenced'); + var sandboxed = profileHeaderInner.hasClass('sandboxed'); + + // menu + var menuArray = []; + + // block/unblock if it's not me + if(userID == window.loggedIn.id) { + menuArray.push({ + type: 'function', + functionName: 'triggerEditProfileButtonClick', + label: window.sL.editMyProfile + }); + menuArray.push({ + type: 'link', + href: window.siteInstanceURL + 'settings/profile', + label: window.sL.settings + }); + menuArray.push({ + type: 'link', + href: window.siteInstanceURL + window.loggedIn.screen_name + '/blocks', + label: window.sL.userBlocks + }); + } + else { + if(userIsBlocked(userID)) { + menuArray.push({ + type: 'function', + functionName: 'unblockUser', + functionArguments: { + userId: userID + }, + label: window.sL.unblockUser.replace('{username}','@' + userScreenName) + }); + } + else { + menuArray.push({ + type: 'function', + functionName: 'blockUser', + functionArguments: { + userId: userID + }, + label: window.sL.blockUser.replace('{username}','@' + userScreenName) + }); + } + } + + var menu = $(getMenu(menuArray)).appendTo(this); + alignMenuToParent(menu,$(this)); + } + }); + +// hide the stream menu when clicking outside it +$('body').on('click',function(e){ + if(!$(e.target).is('.user-menu-cog') && $('.user-menu-cog').hasClass('dropped') && !$(e.target).closest('.user-menu-cog').length>0) { + $('.user-menu-cog').children('.dropdown-menu').remove(); + $('.user-menu-cog').removeClass('dropped'); + } + }); + + + /* · · · Show/hide the stream menu dropdown on click @@ -4048,7 +4137,7 @@ function uploadAttachment(e, thisUploadButton) { · · · · · · · · · · · · · · */ -$('body').on('click','#mini-edit-profile-button, #edit-profile-header-link, .hover-card .edit-profile-button',function(){ +$('body').on('click','#mini-edit-profile-button, #edit-profile-header-link, .hover-card .edit-profile-button, .row-type-edit-profile-menu-link',function(){ if(window.currentStreamObject.name == 'my profile') { $('#page-container > .profile-card .edit-profile-button').trigger('click'); } @@ -4058,3 +4147,6 @@ $('body').on('click','#mini-edit-profile-button, #edit-profile-header-link, .hov }); } }); +function triggerEditProfileButtonClick() { + $('#user-header #mini-edit-profile-button').trigger('click'); + } diff --git a/locale/ar.json b/locale/ar.json index 1781224..8592b4e 100644 --- a/locale/ar.json +++ b/locale/ar.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/ast.json b/locale/ast.json index 09d8c69..160076b 100644 --- a/locale/ast.json +++ b/locale/ast.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/ca.json b/locale/ca.json index fdef729..0b4f676 100644 --- a/locale/ca.json +++ b/locale/ca.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/de.json b/locale/de.json index 6c4b087..5a6c59e 100644 --- a/locale/de.json +++ b/locale/de.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/en.json b/locale/en.json index 6f35c76..04bbc8a 100644 --- a/locale/en.json +++ b/locale/en.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/eo.json b/locale/eo.json index 497d017..65b5193 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/es.json b/locale/es.json index 9e35e21..8fe0816 100644 --- a/locale/es.json +++ b/locale/es.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/es_ahorita.json b/locale/es_ahorita.json index edb2d8e..8b2457a 100644 --- a/locale/es_ahorita.json +++ b/locale/es_ahorita.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/eu.json b/locale/eu.json index 00cd0a0..fad0a25 100644 --- a/locale/eu.json +++ b/locale/eu.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/fa.json b/locale/fa.json index b3ed018..03c8cc4 100644 --- a/locale/fa.json +++ b/locale/fa.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/fi.json b/locale/fi.json index 9325e30..5fe6757 100644 --- a/locale/fi.json +++ b/locale/fi.json @@ -180,5 +180,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/fr.json b/locale/fr.json index dfc1347..e245d8e 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Profils dans le bac à sable sur {site-title}", "silencedStreamDescription":"Le profils réduits au silence ne peuvent pas se connecter, commencer des diatribes et celles déjà postées sont cachées. Pour les comptes locaux, le résultat est similaire à une suppression de compte qui peut être annulée. Pour les comptes distants, c’est un blocage sur l’entièreté du site.", "sandboxedStreamDescription":"Les mises à jour des profils du bac à sable sont exclues de l’Accueil et de l’Ensemble de la Fédération. Les messages postés tout en étant dans le bac à sable ne seront pas inclus dans les flux publics si le profil est remis en dehors du bac à sable.", - "onlyShowNotificationsFromUsersIFollow":"Afficher uniquement les notifications des utilisateurs que je suis" + "onlyShowNotificationsFromUsersIFollow":"Afficher uniquement les notifications des utilisateurs que je suis", + "userOptions":"More user actions" } diff --git a/locale/gl.json b/locale/gl.json index 5a966f0..9162b36 100644 --- a/locale/gl.json +++ b/locale/gl.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/he.json b/locale/he.json index a905a65..c4e0117 100644 --- a/locale/he.json +++ b/locale/he.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/io.json b/locale/io.json index 025c2be..d95d61e 100644 --- a/locale/io.json +++ b/locale/io.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/it.json b/locale/it.json index 840c0fe..c9ba509 100644 --- a/locale/it.json +++ b/locale/it.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/ja.json b/locale/ja.json index bc56840..39ee791 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/nb.json b/locale/nb.json index 6ebc9da..f2c21b7 100644 --- a/locale/nb.json +++ b/locale/nb.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Profiler satt i lekekasse på {site-title}", "silencedStreamDescription":"Forstummede brukere can ikke logge på tjenesten, sende status meldinger, samt allerede status meldinger er skjult. For lokale brukere vil dette oppleves som å bli slettet, men beslutnignen kan reverseres. For brukere på andre instanser vil det oppleves som en utvidet blokkering.", "sandboxedStreamDescription":"Statusmeldinger fra brukere satt i lekekassen, så vil meldingene bli ekskludert fra den offentlige tidslinjen og hele nettverks tidslinjen. Statusmeldinger send når man er i lekekasse vil ikke bli inkludert i den offentlige tidslinjen hvis brukeren blir tatt ut av lekekassen.", - "onlyShowNotificationsFromUsersIFollow":"Vis kun notifikasjoner fra brukere jeg følger" + "onlyShowNotificationsFromUsersIFollow":"Vis kun notifikasjoner fra brukere jeg følger", + "userOptions":"More user actions" } diff --git a/locale/nl.json b/locale/nl.json index 48d8320..7c8f923 100644 --- a/locale/nl.json +++ b/locale/nl.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/pt.json b/locale/pt.json index b1bdc67..1bc31cc 100644 --- a/locale/pt.json +++ b/locale/pt.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/pt_br.json b/locale/pt_br.json index 873b759..3570bff 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/ru.json b/locale/ru.json index fb0e07f..f354b21 100644 --- a/locale/ru.json +++ b/locale/ru.json @@ -177,5 +177,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/sq.json b/locale/sq.json index a90184b..f327382 100644 --- a/locale/sq.json +++ b/locale/sq.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/sv.json b/locale/sv.json index 5b591c8..b8ce0ac 100644 --- a/locale/sv.json +++ b/locale/sv.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Användare i sandlådan på {site-title}", "silencedStreamDescription":"Nedtystade användare kan inte logga in eller skriva qvittringar. Qvittringar som de redan skrivit är dolda. För lokala användare är det som en borttagning som kan ångras, och för externa användare är det som att blockera användaren från instansen.", "sandboxedStreamDescription":"Qvittringar från användare som är i sandlådan visas inte i "Hela sajtens flöde" eller "Hela det kända nätverket". Qvittringar som användaren skriver under tiden den är i sandlådan kommer inte visas i de offentliga flödena om hen tas ur sandlådan senare.", - "onlyShowNotificationsFromUsersIFollow":"Visa bara notiser från användare som jag följer" + "onlyShowNotificationsFromUsersIFollow":"Visa bara notiser från användare som jag följer", + "userOptions":"Fler användaråtgärder" } diff --git a/locale/tr.json b/locale/tr.json index cf98047..a1828ee 100644 --- a/locale/tr.json +++ b/locale/tr.json @@ -179,5 +179,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/zh_cn.json b/locale/zh_cn.json index 8b754fe..ed9c859 100644 --- a/locale/zh_cn.json +++ b/locale/zh_cn.json @@ -178,5 +178,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } diff --git a/locale/zh_tw.json b/locale/zh_tw.json index c5f430f..97355b1 100644 --- a/locale/zh_tw.json +++ b/locale/zh_tw.json @@ -178,5 +178,6 @@ "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow" + "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userOptions":"More user actions" } From 876b15a5cd79f443b43a98886c4d695f0de5f6ce Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 29 Feb 2016 19:37:06 +0100 Subject: [PATCH 098/120] silence&sandbox api --- QvitterPlugin.php | 6 ++ actions/apiqvittersandboxcreate.php | 104 +++++++++++++++++++++++++++ actions/apiqvittersandboxdestroy.php | 100 ++++++++++++++++++++++++++ actions/apiqvittersandboxed.php | 6 +- actions/apiqvittersilencecreate.php | 4 ++ actions/apiqvittersilenced.php | 5 +- actions/apiqvittersilencedestroy.php | 97 +++++++++++++++++++++++++ 7 files changed, 314 insertions(+), 8 deletions(-) create mode 100644 actions/apiqvittersandboxcreate.php create mode 100644 actions/apiqvittersandboxdestroy.php create mode 100644 actions/apiqvittersilencedestroy.php diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 36a1db5..2c3992e 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -159,8 +159,14 @@ class QvitterPlugin extends Plugin { $m->connect('api/qvitter/silenced.:format', array('action' => 'ApiQvitterSilenced', 'format' => '(xml|json)')); + $m->connect('api/qvitter/sandbox/create.json', + array('action' => 'ApiQvitterSandboxCreate')); + $m->connect('api/qvitter/sandbox/destroy.json', + array('action' => 'ApiQvitterSandboxDestroy')); $m->connect('api/qvitter/silence/create.json', array('action' => 'ApiQvitterSilenceCreate')); + $m->connect('api/qvitter/silence/destroy.json', + array('action' => 'ApiQvitterSilenceDestroy')); $m->connect('services/oembed.:format', array('action' => 'apiqvitteroembednotice', 'format' => '(xml|json)')); diff --git a/actions/apiqvittersandboxcreate.php b/actions/apiqvittersandboxcreate.php new file mode 100644 index 0000000..41f1603 --- /dev/null +++ b/actions/apiqvittersandboxcreate.php @@ -0,0 +1,104 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + + +if (!defined('GNUSOCIAL')) { exit(1); } + +class ApiQvitterSandboxCreateAction extends ApiAuthAction +{ + + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + $this->other = $this->getTargetProfile($this->arg('id')); + + return true; + } + + /** + * Handle the request + * + * @param array $args $_REQUEST data (unused) + * + * @return void + */ + protected function handle() + { + parent::handle(); + + if (!$this->other instanceof Profile) { + $this->clientError(_('No such user.'), 404); + } + + if ($this->scoped->id == $this->other->id) { + $this->clientError(_("You cannot sandbox yourself!"), 403); + } + + if (!$this->scoped->hasRight(Right::SANDBOXUSER)) { + $this->clientError(_('You cannot sandbox users on this site.'), 403); + } + // Only administrators can sandbox other privileged users (such as others who have the right to sandbox). + if ($this->scoped->isPrivileged() && !$this->scoped->hasRole(Profile_role::ADMINISTRATOR)) { + $this->clientError(_('You cannot sandbox other privileged users.'), 403); + } + + // only sandbox of the user isn't sandboxed + if (!$this->isSandboxed()) { + try { + $this->other->sandbox(); + } catch (Exception $e) { + $this->clientError($e->getMessage(), $e->getCode()); + } + } + + $this->initDocument('json'); + $this->showJsonObjects($this->twitterUserArray($this->other)); + $this->endDocument('json'); + } +} diff --git a/actions/apiqvittersandboxdestroy.php b/actions/apiqvittersandboxdestroy.php new file mode 100644 index 0000000..551d4b5 --- /dev/null +++ b/actions/apiqvittersandboxdestroy.php @@ -0,0 +1,100 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + + +if (!defined('GNUSOCIAL')) { exit(1); } + +class ApiQvitterSandboxDestroyAction extends ApiAuthAction +{ + + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + $this->other = $this->getTargetProfile($this->arg('id')); + + return true; + } + + /** + * Handle the request + * + * @param array $args $_REQUEST data (unused) + * + * @return void + */ + protected function handle() + { + parent::handle(); + + if (!$this->other instanceof Profile) { + $this->clientError(_('No such user.'), 404); + } + + if ($this->scoped->id == $this->other->id) { + $this->clientError(_("You cannot unsandbox yourself!"), 403); + } + + if (!$this->scoped->hasRight(Right::SANDBOXUSER)) { + $this->clientError(_('You cannot unsandbox users on this site.'), 403); + } + + // only unsandbox if the user is sandboxed + if ($this->isSandboxed()) { + try { + $this->other->sandbox(); + } catch (Exception $e) { + $this->clientError($e->getMessage(), $e->getCode()); + } + } + + $this->initDocument('json'); + $this->showJsonObjects($this->twitterUserArray($this->other)); + $this->endDocument('json'); + } +} diff --git a/actions/apiqvittersandboxed.php b/actions/apiqvittersandboxed.php index f0d3bd1..cc87210 100644 --- a/actions/apiqvittersandboxed.php +++ b/actions/apiqvittersandboxed.php @@ -110,10 +110,7 @@ class ApiQvitterSandboxedAction extends ApiPrivateAuthAction $profile = $this->getSandboxed( ($this->page - 1) * $this->count, - $this->count, - $this->since_id, - $this->max_id - ); + $this->count); while ($profile->fetch()) { $profiles[] = clone($profile); @@ -130,6 +127,7 @@ class ApiQvitterSandboxedAction extends ApiPrivateAuthAction function getSandboxed($offset=null, $limit=null) // offset is null because DataObject wants it, 0 would mean no results { + $profiles = new Profile(); $profiles->joinAdd(array('id', 'profile_role:profile_id')); $profiles->whereAdd(sprintf('profile_role.role = \'%s\'', Profile_role::SANDBOXED)); diff --git a/actions/apiqvittersilencecreate.php b/actions/apiqvittersilencecreate.php index 1383067..bc4378b 100644 --- a/actions/apiqvittersilencecreate.php +++ b/actions/apiqvittersilencecreate.php @@ -82,6 +82,10 @@ class ApiQvitterSilenceCreateAction extends ApiAuthAction try { $this->other->silenceAs($this->scoped); + } catch (AlreadyFulfilledException $e) { + // don't throw client error here, just return the user array like + // if we successfully silenced the user. the client is only interested + // in making sure the user is silenced. } catch (Exception $e) { $this->clientError($e->getMessage(), $e->getCode()); } diff --git a/actions/apiqvittersilenced.php b/actions/apiqvittersilenced.php index 1f97ab3..5f29169 100644 --- a/actions/apiqvittersilenced.php +++ b/actions/apiqvittersilenced.php @@ -110,10 +110,7 @@ class ApiQvitterSilencedAction extends ApiPrivateAuthAction $profile = $this->getSilenced( ($this->page - 1) * $this->count, - $this->count, - $this->since_id, - $this->max_id - ); + $this->count); while ($profile->fetch()) { $profiles[] = clone($profile); diff --git a/actions/apiqvittersilencedestroy.php b/actions/apiqvittersilencedestroy.php new file mode 100644 index 0000000..66dc09c --- /dev/null +++ b/actions/apiqvittersilencedestroy.php @@ -0,0 +1,97 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + + +if (!defined('GNUSOCIAL')) { exit(1); } + +class ApiQvitterSilenceDestroyAction extends ApiAuthAction +{ + + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + $this->other = $this->getTargetProfile($this->arg('id')); + + return true; + } + + /** + * Handle the request + * + * @param array $args $_REQUEST data (unused) + * + * @return void + */ + protected function handle() + { + parent::handle(); + + if (!$this->other instanceof Profile) { + $this->clientError(_('No such user.'), 404); + } + + if ($this->scoped->id == $this->other->id) { + $this->clientError(_("You cannot unsilence yourself!"), 403); + } + + try { + $this->other->unsilenceAs($this->scoped); + } catch (AlreadyFulfilledException $e) { + // don't throw client error here, just return the user array like + // if we successfully unsilenced the user. the client is only interested + // in making sure the user is unsilenced. + } catch (Exception $e) { + $this->clientError($e->getMessage(), $e->getCode()); + } + + $this->initDocument('json'); + $this->showJsonObjects($this->twitterUserArray($this->other)); + $this->endDocument('json'); + } +} From fbc5cdfba5d6d5ceef81f2f4aa73145c077c48b6 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 29 Feb 2016 19:45:28 +0100 Subject: [PATCH 099/120] hidden-conversations that are always-hidden are really always hidden so we don't count those in --- js/dom-functions.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/dom-functions.js b/js/dom-functions.js index 154e7f5..12fa459 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -1605,8 +1605,8 @@ function showConversation(q, qid, data, offsetScroll) { function findAndMarkLastVisibleInConversation(streamItem) { streamItem.children().removeClass('last-visible'); streamItem.children().removeClass('first-visible-after-parent'); - streamItem.children().not('.hidden-conversation').last().addClass('last-visible'); - streamItem.children('.queet').nextAll().not('.hidden-conversation').first().addClass('first-visible-after-parent'); + streamItem.children().not('.hidden-conversation').not('.always-hidden').last().addClass('last-visible'); + streamItem.children('.queet').nextAll().not('.hidden-conversation').not('.always-hidden').first().addClass('first-visible-after-parent'); } @@ -1624,7 +1624,7 @@ function findInReplyToStatusAndShow(q, qid,reply,only_first,onlyINreplyto) { reply_found.css('opacity','1'); if(only_first && reply_found_reply_to.length>0) { if(q.children('.view-more-container-top').length < 1) { - if(q.children('.queet').prevAll('.hidden-conversation').length>0) { + if(q.children('.queet').prevAll('.hidden-conversation:not(.always-hidden)').length>0) { q.prepend(''); } } @@ -1658,7 +1658,7 @@ function findReplyToStatusAndShow(q, qid,this_id,only_first) { } if(only_first && reply_founds_reply.length>0) { if(q.children('.view-more-container-bottom').length < 1) { - if(q.children('.queet').nextAll('.hidden-conversation').length>0) { + if(q.children('.queet').nextAll('.hidden-conversation:not(.always-hidden)').length>0) { q.append(''); } } @@ -1671,7 +1671,7 @@ function findReplyToStatusAndShow(q, qid,this_id,only_first) { // helper function for the above recursive functions function checkForHiddenConversationQueets(q, qid) { // here we check if there are any remaining hidden queets in conversation, if there are, we put a "show full conversation"-link - if(q.find('.hidden-conversation').length>0) { + if(q.find('.hidden-conversation:not(.always-hidden)').length>0) { if(q.children('.queet').find('.show-full-conversation').length == 0) { q.children('.queet').find('.stream-item-footer').append('' + window.sL.expandFullConversation + ''); } From bab2335cd9452e06abd48051abd6c129f572e254 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 29 Feb 2016 21:38:08 +0100 Subject: [PATCH 100/120] japanese by @akionux !25 --- locale/ja.json | 72 +++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/locale/ja.json b/locale/ja.json index 39ee791..7702d42 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -6,13 +6,13 @@ "loginSignIn": "サインイン", "loginRememberMe": "記憶する", "loginForgotPassword": "パスワードを忘れましたか?", - "notices": "クイート", + "notices": "クイップ", "followers": "フォロワー", "following": "フォロー", "groups": "グループ", - "compose": "クイートする", + "compose": "クイップする", "queetVerb": "送る", - "queetsNounPlural": "クイート", + "queetsNounPlural": "クイップ", "logout": "サインアウト", "languageSelected": "言語:", "viewMyProfilePage": "自分のプロフィールページを見る", @@ -21,18 +21,18 @@ "details": "詳細", "expandFullConversation": "会話を全て表示する", "replyVerb": "返信する", - "requeetVerb": "リクイートする", + "requeetVerb": "リクイップする", "favoriteVerb": "お気に入りに追加する", - "requeetedVerb": "リクイートされました", + "requeetedVerb": "リクイップされました", "favoritedVerb": "お気に入りに追加されました", "replyTo": "返信先は", - "requeetedBy": "リクイートした人は {requeeted-by}", + "requeetedBy": "リクイップした人は {requeeted-by}", "favoriteNoun": "お気に入り", "favoritesNoun": "お気に入り", - "requeetNoun": "リクイート", - "requeetsNoun": "リクイート", - "newQueet": "{new-notice-count} 件の新着クイートを表示", - "newQueets": "{new-notice-count} 件の新着クイートを表示", + "requeetNoun": "リクイップ", + "requeetsNoun": "リクイップ", + "newQueet": "{new-notice-count} 件の新着クイップを表示", + "newQueets": "{new-notice-count} 件の新着クイップを表示", "longmonthsJanuary": "1月", "longmonthsFebruary": "2月", "longmonthsMars": "3月", @@ -69,14 +69,14 @@ "posting": "投稿中", "viewMoreInConvBefore": "← 会話を詳しく見る", "viewMoreInConvAfter": "会話を詳しく見る →", - "mentions": "@クイート", + "mentions": "@クイップ", "timeline": "タイムライン", "publicTimeline": "パブリックタイムライン", "publicAndExtTimeline": "関連ネットワーク全体", "searchVerb": "検索する", "deleteVerb": "削除する", "cancelVerb": "キャンセル", - "deleteConfirmation": "このクイートを本当に削除しますか?", + "deleteConfirmation": "このクイップを本当に削除しますか?", "userExternalFollow": "リモートフォロー", "userExternalFollowHelp": "あなたのアカウントID (例: user@rainbowdash.net).", "userFollow": "フォロー", @@ -108,8 +108,8 @@ "otherServers": "もしくはGNU socialネットワークの別のサーバーでアカウントを作ることができます。サーバーの比較", "editMyProfile": "プロフィールを編集する", "notifications": "お知らせ", - "xFavedYourQueet": "があなたのクイートをお気に入りに追加しました", - "xRepeatedYourQueet": "があなたをリクイートしました", + "xFavedYourQueet": "があなたのクイップをお気に入りに追加しました", + "xRepeatedYourQueet": "があなたをリクイップしました", "xStartedFollowingYou": "があなたをフォローしました", "followsYou": "フォローされています", "FAQ": "よくある質問", @@ -119,7 +119,7 @@ "showTerms": "利用条件を読む", "ellipsisMore": "もっと", "blockUser": "{username}をブロックする", - "goToOriginalNotice": "元のクイートを見る", + "goToOriginalNotice": "元のクイップを見る", "goToTheUsersRemoteProfile": "このユーザーのリモートにあるプロフィールを見る", "clickToDrag":"クリックしてドラッグ", "keyboardShortcuts":"キーボードショートカット", @@ -128,7 +128,7 @@ "tooltipBookmarkStream":"このストリームをブックマークに保存する", "tooltipTopMenu":"メニューと設定", "tooltipAttachImage":"画像を添付", - "tooltipShortenUrls":"クイート中の全てのURLを短縮する", + "tooltipShortenUrls":"クイップ中の全てのURLを短縮する", "tooltipReloadStream":"このストリームを再読み込みする", "tooltipRemoveBookmark":"このブックマークを削除する", "clearHistory":"閲覧履歴を消去する", @@ -137,21 +137,21 @@ "ERRORcouldNotFindUserWithNickname":"\"{nickname}\"というニックネームのユーザーはこのサーバーでは見付かりませんでした。", "ERRORcouldNotFindGroupWithNickname":"\"{nickname}\"というニックネームのグループはこのサーバーでは見付かりませんでした。", "ERRORcouldNotFindPage":"そのようなページは見付かりませんでした。", - "ERRORnoticeRemoved": "このクイートは削除されています。", + "ERRORnoticeRemoved": "このクイップは削除されています。", "ERRORnoContactWithServer": "サーバーへの接続を確立できませんでした。サーバーが混雑しているもしくはインターネットの接続に問題がある可能性があります。後でまたお試しください。", "ERRORattachmentUploadFailed": "アップロードに失敗しました。ファイル形式がサポートされていないか、ファイルサイズが大きすぎます。", "hideRepliesToPeopleIDoNotFollow":"フォローしていない人からの返信を隠す", "markAllNotificationsAsSeen":"全てのお知らせを既読にする", - "notifyRepliesAndMentions":"@クイートと返信", + "notifyRepliesAndMentions":"@クイップと返信", "notifyFavs":"お気に入り", - "notifyRepeats":"リクイート", + "notifyRepeats":"リクイップ", "notifyFollows":"新しいフォロワー", "timelineOptions":"タイムラインの設定", "ERRORfailedSavingYourSetting":"設定の保存に失敗しました。", "ERRORfailedMarkingAllNotificationsAsRead":"全てのお知らせを既読にすることに失敗しました。", "newNotification": "{new-notice-count}件の新しいお知らせ", "newNotifications": "{new-notice-count}件の新しいお知らせ", - "thisIsANoticeFromABlockedUser":"警告: これはあなたがブロックしているユーザーからのクイートです。表示するにはクリックしてください。", + "thisIsANoticeFromABlockedUser":"警告: これはあなたがブロックしているユーザーからのクイップです。表示するにはクリックしてください。", "nicknamesListWithListName":"{nickname}のリスト: {list-name}", "myListWithListName":"マイリスト: {list-name}", "listMembers":"メンバー", @@ -164,21 +164,21 @@ "continueRant":"連投を続ける", "hideEmbeddedInTimeline":"タイムライン上の埋め込まれたコンテンツを隠す", "hideQuotesInTimeline":"タイムライン上の引用を隠す", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}.", - "silenced":"Silenced", - "silencedPlural":"Silenced profiles", - "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", - "sandboxed":"Sandboxed", - "sandboxedPlural":"Sandboxed profiles", - "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", - "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", - "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userBlocks":"あなたがブロックしているユーザー", + "buttonBlocked":"ブロック中", + "buttonUnblock":"アンブロック", + "failedBlockingUser":"このユーザーをブロックするのに失敗しました。", + "failedUnblockingUser":"このユーザーをブロックするのに失敗しました。", + "unblockUser": "{username} をアンブロックする", + "tooltipBlocksYou":"ブロックされているため、 {username} をフォローできません。", + "silenced":"サイレンス中", + "silencedPlural":"サイレンスされているユーザー", + "silencedUsersOnThisInstance":"{site-title} でサイレンスされているユーザー", + "sandboxed":"サンドボックス中", + "sandboxedPlural":"サンドボックスされているユーザー", + "sandboxedUsersOnThisInstance":"{site-title} でサンドボックスされているユーザー", + "silencedStreamDescription":"サイレンスされたユーザーはログインおよびクイップの投稿ができなくなり、そのユーザーの既に投稿されたクイップは非表示になります。ローカルユーザーにとっては復旧可能な削除のような状態で、リモートユーザーにとっては全サイトでブロックされているような状態になります。", + "sandboxedStreamDescription":"サンドボックスされたユーザーからのクイップは「パブリックタイムライン」および「関連ネットワーク全体」から除外されます。アンサンドボックスされたユーザーのサンドボックス期間中に投稿されたクイップはパブリックタイムラインに含まれません", + "onlyShowNotificationsFromUsersIFollow":"フォローしているユーザーのお知らせのみ表示する", "userOptions":"More user actions" } From c3aed808ba5c3d05dfc16be6c3babd561f210b9d Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 1 Mar 2016 01:08:55 +0100 Subject: [PATCH 101/120] silence & sandbox in user cog wheel menu and stream item ellipsis menu --- actions/apiqvittersandboxcreate.php | 5 +- actions/apiqvittersandboxdestroy.php | 7 +- actions/apiqvittersilencecreate.php | 3 + actions/apiqvittersilencedestroy.php | 3 + actions/qvitter.php | 14 ++- css/qvitter.css | 10 +- js/ajax-functions.js | 65 ++++++++++- js/misc-functions.js | 155 +++++++++++++++++++++++++++ js/qvitter.js | 19 +++- locale/ar.json | 8 +- locale/ast.json | 8 +- locale/ca.json | 8 +- locale/de.json | 8 +- locale/en.json | 8 +- locale/eo.json | 8 +- locale/es.json | 8 +- locale/es_ahorita.json | 8 +- locale/eu.json | 8 +- locale/fa.json | 8 +- locale/fi.json | 8 +- locale/fr.json | 8 +- locale/gl.json | 8 +- locale/he.json | 8 +- locale/io.json | 8 +- locale/it.json | 8 +- locale/ja.json | 8 +- locale/nb.json | 8 +- locale/nl.json | 8 +- locale/pt.json | 8 +- locale/pt_br.json | 8 +- locale/ru.json | 8 +- locale/sq.json | 8 +- locale/sv.json | 8 +- locale/tr.json | 8 +- locale/zh_cn.json | 8 +- locale/zh_tw.json | 8 +- 36 files changed, 453 insertions(+), 44 deletions(-) diff --git a/actions/apiqvittersandboxcreate.php b/actions/apiqvittersandboxcreate.php index 41f1603..f713e61 100644 --- a/actions/apiqvittersandboxcreate.php +++ b/actions/apiqvittersandboxcreate.php @@ -44,6 +44,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } class ApiQvitterSandboxCreateAction extends ApiAuthAction { + protected $needPost = true; /** * Take arguments for running @@ -56,6 +57,8 @@ class ApiQvitterSandboxCreateAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->other = $this->getTargetProfile($this->arg('id')); return true; @@ -89,7 +92,7 @@ class ApiQvitterSandboxCreateAction extends ApiAuthAction } // only sandbox of the user isn't sandboxed - if (!$this->isSandboxed()) { + if (!$this->other->isSandboxed()) { try { $this->other->sandbox(); } catch (Exception $e) { diff --git a/actions/apiqvittersandboxdestroy.php b/actions/apiqvittersandboxdestroy.php index 551d4b5..1b55e23 100644 --- a/actions/apiqvittersandboxdestroy.php +++ b/actions/apiqvittersandboxdestroy.php @@ -44,6 +44,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } class ApiQvitterSandboxDestroyAction extends ApiAuthAction { + protected $needPost = true; /** * Take arguments for running @@ -56,6 +57,8 @@ class ApiQvitterSandboxDestroyAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->other = $this->getTargetProfile($this->arg('id')); return true; @@ -85,9 +88,9 @@ class ApiQvitterSandboxDestroyAction extends ApiAuthAction } // only unsandbox if the user is sandboxed - if ($this->isSandboxed()) { + if ($this->other->isSandboxed()) { try { - $this->other->sandbox(); + $this->other->unsandbox(); } catch (Exception $e) { $this->clientError($e->getMessage(), $e->getCode()); } diff --git a/actions/apiqvittersilencecreate.php b/actions/apiqvittersilencecreate.php index bc4378b..b465077 100644 --- a/actions/apiqvittersilencecreate.php +++ b/actions/apiqvittersilencecreate.php @@ -44,6 +44,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } class ApiQvitterSilenceCreateAction extends ApiAuthAction { + protected $needPost = true; /** * Take arguments for running @@ -56,6 +57,8 @@ class ApiQvitterSilenceCreateAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->other = $this->getTargetProfile($this->arg('id')); return true; diff --git a/actions/apiqvittersilencedestroy.php b/actions/apiqvittersilencedestroy.php index 66dc09c..92e206a 100644 --- a/actions/apiqvittersilencedestroy.php +++ b/actions/apiqvittersilencedestroy.php @@ -44,6 +44,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } class ApiQvitterSilenceDestroyAction extends ApiAuthAction { + protected $needPost = true; /** * Take arguments for running @@ -56,6 +57,8 @@ class ApiQvitterSilenceDestroyAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->other = $this->getTargetProfile($this->arg('id')); return true; diff --git a/actions/qvitter.php b/actions/qvitter.php index fcc1c75..50f8081 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -429,7 +429,19 @@ class QvitterAction extends ApiAction ?> - "> + "> Date: Tue, 1 Mar 2016 01:58:12 +0100 Subject: [PATCH 102/120] user cog menu in user lists too --- css/qvitter.css | 13 +++--------- js/ajax-functions.js | 2 ++ js/dom-functions.js | 33 ++++++++++++++++++++++++------ js/misc-functions.js | 48 ++++++++++++-------------------------------- js/qvitter.js | 10 ++++----- 5 files changed, 49 insertions(+), 57 deletions(-) diff --git a/css/qvitter.css b/css/qvitter.css index df9360a..d0f2a61 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -1685,7 +1685,7 @@ body.rtl #history-container.menu-container a .chev-right { position: absolute; text-shadow: none; } -.profile-card:not(.logged-in) .user-menu-cog { +.user-menu-cog:not(.logged-in) { display:none !important; } #stream-menu-cog::before, @@ -2042,8 +2042,8 @@ body.has-right-to-sandbox .profile-card .profile-header-inner.sandboxed span.san body.rtl .queet.rtl .expanded-content { direction:rtl; } -.stream-item.expanded > div:first-child, -.stream-item.expanded > div:first-child > .queet { +.stream-item.expanded > div.first-visible, +.stream-item.expanded > div.first-visible > .queet { border-top-left-radius:6px; border-top-right-radius:6px; } @@ -2118,16 +2118,9 @@ body.rtl .queet.rtl .expanded-content { box-sizing: border-box; } -/* only show activity notices if they are conversation starters - we never need to see these, but sometimes someone replies to - an activity notice, and then it can be good to know what the - user is replying to... */ #feed-body > .stream-item.activity { display:none; } -.stream-item > .stream-item.activity:first-child { - display:block; - } .quoted-notices, .oembed-data { diff --git a/js/ajax-functions.js b/js/ajax-functions.js index d83a631..de37732 100644 --- a/js/ajax-functions.js +++ b/js/ajax-functions.js @@ -523,6 +523,7 @@ function APISandboxCreateOrDestroy(createOrDestroy,userId,actionOnSuccess) { data = iterateRecursiveReplaceHtmlSpecialChars(data); searchForUserDataToCache(data); updateUserDataInStream(); + rememberStreamStateInLocalStorage(); actionOnSuccess(data); } }); @@ -552,6 +553,7 @@ function APISilenceCreateOrDestroy(createOrDestroy,userId,actionOnSuccess) { data = iterateRecursiveReplaceHtmlSpecialChars(data); searchForUserDataToCache(data); updateUserDataInStream(); + rememberStreamStateInLocalStorage(); actionOnSuccess(data); } }); diff --git a/js/dom-functions.js b/js/dom-functions.js index 12fa459..d5779c0 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -438,7 +438,7 @@ function buildProfileCard(data) {
  • ' + window.sL.groups + '' + data.groups_count + '
  • \ \ ' + followButton + '\ -
    \ +
    \
    \
    \
    \ @@ -471,6 +471,18 @@ function buildExternalProfileCard(data) { var followButton = buildFollowBlockbutton(data.local); } + // me? + var is_me = ''; + if(window.loggedIn !== false && window.loggedIn.id == data.local.id) { + var is_me = ' is-me'; + } + + // logged in? + var logged_in = ''; + if(window.loggedIn !== false) { + var logged_in = ' logged-in'; + } + // silenced? var is_silenced = ''; if(data.local.is_silenced === true) { @@ -483,8 +495,9 @@ function buildExternalProfileCard(data) { is_sandboxed = ' sandboxed'; } - // local id + // local id/screen_name var localUserId = data.local.id; + var localUserScreenName = data.local.screen_name; // empty strings and zeros instead of null data = cleanUpUserObject(data.external); @@ -519,8 +532,8 @@ function buildExternalProfileCard(data) { data.screenNameWithServer = '@' + data.screen_name + '@' + serverUrl; data.profileCardHtml = '\ -
    \ -
    \ +
    \ +
    \
    \ \
    \ @@ -551,7 +564,7 @@ function buildExternalProfileCard(data) {
  • ' + window.sL.followers + '' + data.followers_count + '
  • \ \ ' + followButton + '\ -
    \ +
    \
    \
    \
    \ @@ -1599,7 +1612,7 @@ function showConversation(q, qid, data, offsetScroll) { /* · · - · Add last visible class, since that's not possible to select in pure css + · Add last&first visible class, since that's not possible to select in pure css · · · · · · · · · · · · · · */ function findAndMarkLastVisibleInConversation(streamItem) { @@ -1607,6 +1620,8 @@ function findAndMarkLastVisibleInConversation(streamItem) { streamItem.children().removeClass('first-visible-after-parent'); streamItem.children().not('.hidden-conversation').not('.always-hidden').last().addClass('last-visible'); streamItem.children('.queet').nextAll().not('.hidden-conversation').not('.always-hidden').first().addClass('first-visible-after-parent'); + streamItem.children().removeClass('first-visible'); + streamItem.children().not('.hidden-conversation').not('.always-hidden').first().addClass('first-visible'); } @@ -1995,6 +2010,11 @@ function buildUserStreamItemHtml(obj) { if(obj.is_sandboxed === true) { sandboxedClass = ' sandboxed'; } + // logged in? + var loggedInClass = ''; + if(window.loggedIn !== false) { + loggedInClass = ' logged-in'; + } var followButton = ''; if(typeof window.loggedIn.screen_name != 'undefined' // if logged in @@ -2007,6 +2027,7 @@ function buildUserStreamItemHtml(obj) { return '
    \
    \ ' + followButton + '\ +
    \
    \
    \ Comparativo", "editMyProfile": "Editar perfil", "notifications": "Notificações", - "xFavedYourQueet": "curtiu seu Queet", - "xRepeatedYourQueet": "requeetou você", + "xFavedYourQueet": "curtiu seu quip", + "xRepeatedYourQueet": "requipou você", "xStartedFollowingYou": "seguiu você", "followsYou": "segue você", "FAQ": "FAQ", @@ -119,7 +119,7 @@ "showTerms": "Leia nossos Termos de Uso", "ellipsisMore": "Mais", "blockUser": "Bloquear {username}", - "goToOriginalNotice": "Ir para mensagem original", + "goToOriginalNotice": "Ir para quip original", "goToTheUsersRemoteProfile": "Ir para o perfil do usuário", "clickToDrag":"Clique para arrastar", "keyboardShortcuts":"Atalhos do teclado", @@ -128,7 +128,7 @@ "tooltipBookmarkStream":"Adicione este fluxo aos favoritos", "tooltipTopMenu":"Menu e configurações", "tooltipAttachImage":"Anexar uma imagem", - "tooltipShortenUrls":"Encurtar todas as URLs no Queet", + "tooltipShortenUrls":"Encurtar todas as URLs no quip", "tooltipReloadStream":"Atualizar este fluxo", "tooltipRemoveBookmark":"Remover este favorito", "clearHistory":"Limpar histórico de navegação", @@ -137,14 +137,14 @@ "ERRORcouldNotFindUserWithNickname":"Não foi possível encontrar um usuário com o apelido \"{nickname}\" neste servidor", "ERRORcouldNotFindGroupWithNickname":"Não foi possível encontrar um grupo com o nome \"{nickname}\" neste servidor", "ERRORcouldNotFindPage":"Não foi possível encontrar aquela página.", - "ERRORnoticeRemoved": "Esta mensagem foi removida.", + "ERRORnoticeRemoved": "Este quip foi removido.", "ERRORnoContactWithServer": "Não foi possível estabelecer uma conexão com o servidor. O servidor pode estar sobrecarregado, ou pode haver um problema com sua conexão de internet. Por favor tente novamente mais tarde!", "ERRORattachmentUploadFailed": "O envio falhou. O formato pode não ser suportado ou o tamanho é muito grande.", "hideRepliesToPeopleIDoNotFollow":"Ocultar respostas para pessoas que eu não sigo", "markAllNotificationsAsSeen":"Marcar todas notificações como vistas", "notifyRepliesAndMentions":"Menções e respostas", - "notifyFavs":"Favoritos", - "notifyRepeats":"Requeets", + "notifyFavs":"Curtidas", + "notifyRepeats":"Requips", "notifyFollows":"Novos seguidores", "timelineOptions":"Opções da linha do tempo", "ERRORfailedSavingYourSetting":"Falha ao salvar suas configurações", @@ -171,20 +171,20 @@ "failedUnblockingUser":"Falha ao desbloquear usuário.", "unblockUser": "Desbloquear {username}", "tooltipBlocksYou":"Você está impedido de seguir {username}.", - "silenced":"Silenced", - "silencedPlural":"Silenced profiles", - "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", - "sandboxed":"Sandboxed", - "sandboxedPlural":"Sandboxed profiles", - "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", - "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", - "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", - "userOptions":"More user actions", - "silenceThisUser":"Silence {nickname}", - "sandboxThisUser":"Sandbox {nickname}", - "unSilenceThisUser":"Unsilence {nickname}", - "unSandboxThisUser":"Unsandbox {nickname}", - "ERRORfailedSandboxingUser":"Failed sandboxing/unsandboxing the user", - "ERRORfailedSilencingUser":"Failed silencing/unsilencing the user" + "silenced":"Silenciado", + "silencedPlural":"Perfis silenciados", + "silencedUsersOnThisInstance":"Perfis silenciados em {site-title}", + "sandboxed":"Restringido", + "sandboxedPlural":"Perfis restringidos", + "sandboxedUsersOnThisInstance":"Perfis restringidos em {site-title}", + "silencedStreamDescription":"Usuários silenciados não podem logar ou postar quips e os quips postados por eles estão ocultos. Para usuários locais é como uma remoção que pode ser anulada, para usuários remotos é como se fosse um bloqueio do site inteiro.", + "sandboxedStreamDescription":"Quips de usuários restringidos são excluídos da Linha do Tempo Pública e de Toda a Rede Conhecida. Quips postados enquanto um perfil estiver restringido não serão incluídos nas linhas do tempo públicas.", + "onlyShowNotificationsFromUsersIFollow":"Mostrar notificações somente de usuários que eu sigo", + "userOptions":"Mais ações do usuário", + "silenceThisUser":"Silenciar {nickname}", + "sandboxThisUser":"Restringir {nickname}", + "unSilenceThisUser":"Permitir {nickname}", + "unSandboxThisUser":"Liberar {nickname}", + "ERRORfailedSandboxingUser":"Falha ao restringir/liberar o usuário", + "ERRORfailedSilencingUser":"Falha ao silenciar/permitir o usuário" } From db30b4487b29163c8eac44bf7a182d56ba5848c1 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 3 Mar 2016 12:17:54 +0000 Subject: [PATCH 108/120] esperanto translations --- locale/eo.json | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/locale/eo.json b/locale/eo.json index 1eb7393..c49e3a4 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -78,7 +78,7 @@ "cancelVerb": "Nuligi", "deleteConfirmation": "Ĉu vi certas, ke vi volas forigi tiun ĉi pepon?", "userExternalFollow": "Sekvi", - "userExternalFollowHelp": "Identigilo de via konto(Ekz. uzanto@rainbowdash.net)", + "userExternalFollowHelp": "Identigilo de via konto (Ekz. uzanto@rainbowdash.net)", "userFollow": "Sekvi", "userFollowing": "Sekvato", "userUnfollow": "Malsekvi", @@ -164,27 +164,27 @@ "continueRant":"Daŭrigi la plendon", "hideEmbeddedInTimeline":"Kaŝi enkorpigitajn enhavojn en ĉi tiu tempolinio", "hideQuotesInTimeline":"Kaŝi citaĵojn en ĉi tiu tempolinio", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}.", - "silenced":"Silenced", - "silencedPlural":"Silenced profiles", - "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", - "sandboxed":"Sandboxed", - "sandboxedPlural":"Sandboxed profiles", - "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", - "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", - "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Quips posted while being in the sandbox will not be included in the public timelines if the user is unsandboxed.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", + "userBlocks":"Blokaj kontoj", + "buttonBlocked":"Blokita", + "buttonUnblock":"Malbloki", + "failedBlockingUser":"Malsukcesis bloki la uzanto.", + "failedUnblockingUser":"Malsukcesis malbloki la uzanto.", + "unblockUser": "Malbloki {username}", + "tooltipBlocksYou":"Vi blokitas de sekvato al {username}.", + "silenced":"Silenca", + "silencedPlural":"Silencaj profiloj", + "silencedUsersOnThisInstance":"Silencaj profiloj sur {site-title}", + "sandboxed":"Sablokesta", + "sandboxedPlural":"Sablokestaj profiloj", + "sandboxedUsersOnThisInstance":"Sablokestaj profiloj sur {site-title}", + "silencedStreamDescription":"Silencaj uzantoj ne povas ensaluti aux sendadi pepoj, kaj la pepoj ili jam sendadis kasxan. Por loka uzantoj, gxi estas simila al forigo, kiu povas inversi, sed por fora uzantoj estas simila al loko-largxa bloko.", + "sandboxedStreamDescription":"Pepoj de sablokesta uzantoj ekskludas de la publika tempolinio kaj la tuta konata reto. Pepoj sendadis dum sablokesta ne enhavos en la publikaj tempolinioj se la uzantoj malsablokesti.", + "onlyShowNotificationsFromUsersIFollow":"Nur spektaklo sciigoj de uzantoj mi sekvas", "userOptions":"More user actions", - "silenceThisUser":"Silence {nickname}", - "sandboxThisUser":"Sandbox {nickname}", - "unSilenceThisUser":"Unsilence {nickname}", - "unSandboxThisUser":"Unsandbox {nickname}", - "ERRORfailedSandboxingUser":"Failed sandboxing/unsandboxing the user", - "ERRORfailedSilencingUser":"Failed silencing/unsilencing the user" + "silenceThisUser":"Silenci {nickname}", + "sandboxThisUser":"Sablokesti {nickname}", + "unSilenceThisUser":"Malsilenci {nickname}", + "unSandboxThisUser":"Malsablokesti {nickname}", + "ERRORfailedSandboxingUser":"Malsukcesis sablokesti/malsablokesti la uzanto", + "ERRORfailedSilencingUser":"Malsukcesis silenci/malsilenci la uzanto" } From 1f0e63cfa896422a1bd6e5e792aa3fa808c93383 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 3 Mar 2016 13:58:32 +0000 Subject: [PATCH 109/120] some fixes after review --- locale/eo.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/locale/eo.json b/locale/eo.json index c49e3a4..082d584 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -171,20 +171,20 @@ "failedUnblockingUser":"Malsukcesis malbloki la uzanto.", "unblockUser": "Malbloki {username}", "tooltipBlocksYou":"Vi blokitas de sekvato al {username}.", - "silenced":"Silenca", - "silencedPlural":"Silencaj profiloj", - "silencedUsersOnThisInstance":"Silencaj profiloj sur {site-title}", + "silenced":"Silentiĝa", + "silencedPlural":"Silentiĝaj profiloj", + "silencedUsersOnThisInstance":"Silenctiĝaj profiloj sur {site-title}", "sandboxed":"Sablokesta", "sandboxedPlural":"Sablokestaj profiloj", "sandboxedUsersOnThisInstance":"Sablokestaj profiloj sur {site-title}", - "silencedStreamDescription":"Silencaj uzantoj ne povas ensaluti aux sendadi pepoj, kaj la pepoj ili jam sendadis kasxan. Por loka uzantoj, gxi estas simila al forigo, kiu povas inversi, sed por fora uzantoj estas simila al loko-largxa bloko.", + "silencedStreamDescription":"Silencaj uzantoj ne povas ensaluti aŭ sendadi pepoj, kaj la pepoj ili jam sendadis kasxan. Por loka uzantoj, ĝi estas simila al forigo, kiu povas inversi, sed por fora uzantoj estas simila al loko-larĝa bloko.", "sandboxedStreamDescription":"Pepoj de sablokesta uzantoj ekskludas de la publika tempolinio kaj la tuta konata reto. Pepoj sendadis dum sablokesta ne enhavos en la publikaj tempolinioj se la uzantoj malsablokesti.", - "onlyShowNotificationsFromUsersIFollow":"Nur spektaklo sciigoj de uzantoj mi sekvas", + "onlyShowNotificationsFromUsersIFollow":"Nur montri sciigoj de uzantoj mi sekvas", "userOptions":"More user actions", - "silenceThisUser":"Silenci {nickname}", + "silenceThisUser":"Silentiĝi {nickname}", "sandboxThisUser":"Sablokesti {nickname}", - "unSilenceThisUser":"Malsilenci {nickname}", + "unSilenceThisUser":"Malsilentiĝi {nickname}", "unSandboxThisUser":"Malsablokesti {nickname}", "ERRORfailedSandboxingUser":"Malsukcesis sablokesti/malsablokesti la uzanto", - "ERRORfailedSilencingUser":"Malsukcesis silenci/malsilenci la uzanto" + "ERRORfailedSilencingUser":"Malsukcesis silentiĝi/malsilentiĝi la uzanto" } From 08a35313a134f52169c5f35564c0b997d067f2de Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 3 Mar 2016 14:00:01 +0000 Subject: [PATCH 110/120] oops forgot one --- locale/eo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/eo.json b/locale/eo.json index 082d584..d62657d 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -180,7 +180,7 @@ "silencedStreamDescription":"Silencaj uzantoj ne povas ensaluti aŭ sendadi pepoj, kaj la pepoj ili jam sendadis kasxan. Por loka uzantoj, ĝi estas simila al forigo, kiu povas inversi, sed por fora uzantoj estas simila al loko-larĝa bloko.", "sandboxedStreamDescription":"Pepoj de sablokesta uzantoj ekskludas de la publika tempolinio kaj la tuta konata reto. Pepoj sendadis dum sablokesta ne enhavos en la publikaj tempolinioj se la uzantoj malsablokesti.", "onlyShowNotificationsFromUsersIFollow":"Nur montri sciigoj de uzantoj mi sekvas", - "userOptions":"More user actions", + "userOptions":"Pli ukazo agoj", "silenceThisUser":"Silentiĝi {nickname}", "sandboxThisUser":"Sablokesti {nickname}", "unSilenceThisUser":"Malsilentiĝi {nickname}", From d87cc71034eec928f0b9e3ed9e0806bde34707b2 Mon Sep 17 00:00:00 2001 From: Nicolas Maia Date: Fri, 4 Mar 2016 16:46:49 -0300 Subject: [PATCH 111/120] various grammar fixes to the eo translation --- locale/eo.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/locale/eo.json b/locale/eo.json index d62657d..2fe613d 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -164,27 +164,27 @@ "continueRant":"Daŭrigi la plendon", "hideEmbeddedInTimeline":"Kaŝi enkorpigitajn enhavojn en ĉi tiu tempolinio", "hideQuotesInTimeline":"Kaŝi citaĵojn en ĉi tiu tempolinio", - "userBlocks":"Blokaj kontoj", + "userBlocks":"Blokitaj kontoj", "buttonBlocked":"Blokita", "buttonUnblock":"Malbloki", - "failedBlockingUser":"Malsukcesis bloki la uzanto.", - "failedUnblockingUser":"Malsukcesis malbloki la uzanto.", + "failedBlockingUser":"Malsukcesis bloki la uzanton.", + "failedUnblockingUser":"Malsukcesis malbloki la uzanton.", "unblockUser": "Malbloki {username}", - "tooltipBlocksYou":"Vi blokitas de sekvato al {username}.", - "silenced":"Silentiĝa", - "silencedPlural":"Silentiĝaj profiloj", - "silencedUsersOnThisInstance":"Silenctiĝaj profiloj sur {site-title}", - "sandboxed":"Sablokesta", - "sandboxedPlural":"Sablokestaj profiloj", - "sandboxedUsersOnThisInstance":"Sablokestaj profiloj sur {site-title}", - "silencedStreamDescription":"Silencaj uzantoj ne povas ensaluti aŭ sendadi pepoj, kaj la pepoj ili jam sendadis kasxan. Por loka uzantoj, ĝi estas simila al forigo, kiu povas inversi, sed por fora uzantoj estas simila al loko-larĝa bloko.", - "sandboxedStreamDescription":"Pepoj de sablokesta uzantoj ekskludas de la publika tempolinio kaj la tuta konata reto. Pepoj sendadis dum sablokesta ne enhavos en la publikaj tempolinioj se la uzantoj malsablokesti.", - "onlyShowNotificationsFromUsersIFollow":"Nur montri sciigoj de uzantoj mi sekvas", - "userOptions":"Pli ukazo agoj", - "silenceThisUser":"Silentiĝi {nickname}", + "tooltipBlocksYou":"Vi estas blokita por sekvi {username}.", + "silenced":"Silentita", + "silencedPlural":"Silentitaj profiloj", + "silencedUsersOnThisInstance":"Silentitaj profiloj sur {site-title}", + "sandboxed":"Sablokestiga", + "sandboxedPlural":"Sablokestigaj profiloj", + "sandboxedUsersOnThisInstance":"Sablokestigaj profiloj sur {site-title}", + "silencedStreamDescription":"Silentigaj uzantoj ne povas ensaluti aŭ sendi pepojn, kaj la pepoj ili jam sendis estas kaŝitaj. Por lokaj uzantoj, ĝi estas simila al forigo, kiu povas inversi, sed por foraj uzantoj estas simila al tutreteja bloko.", + "sandboxedStreamDescription":"Pepoj de sablokestigaj uzantoj estas forviŝitaj el la publika tempolinio kaj la tuta konata reto. Pepoj senditaj dum tempo en la sablokesto ne estos en la publikaj tempolinioj se la uzanto estas malsablokestigita.", + "onlyShowNotificationsFromUsersIFollow":"Nur montri sciigojn de uzantoj, kiujn mi sekvas", + "userOptions":"Pliaj uzantaj agoj", + "silenceThisUser":"Silentigi {nickname}", "sandboxThisUser":"Sablokesti {nickname}", - "unSilenceThisUser":"Malsilentiĝi {nickname}", + "unSilenceThisUser":"Malsilentigi {nickname}", "unSandboxThisUser":"Malsablokesti {nickname}", - "ERRORfailedSandboxingUser":"Malsukcesis sablokesti/malsablokesti la uzanto", - "ERRORfailedSilencingUser":"Malsukcesis silentiĝi/malsilentiĝi la uzanto" + "ERRORfailedSandboxingUser":"Malsukcesis sablokestigi/malsablokestigi la uzanton", + "ERRORfailedSilencingUser":"Malsukcesis silentigi/malsilentigi la uzanton" } From 974d9649057ec700c5ee13ae679a8ac785501668 Mon Sep 17 00:00:00 2001 From: abjectio Date: Fri, 4 Mar 2016 20:57:11 +0100 Subject: [PATCH 112/120] Updated norwegian translation --- locale/nb.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locale/nb.json b/locale/nb.json index 81fe810..540c4fe 100644 --- a/locale/nb.json +++ b/locale/nb.json @@ -180,11 +180,11 @@ "silencedStreamDescription":"Forstummede brukere can ikke logge på tjenesten, sende status meldinger, samt allerede status meldinger er skjult. For lokale brukere vil dette oppleves som å bli slettet, men beslutnignen kan reverseres. For brukere på andre instanser vil det oppleves som en utvidet blokkering.", "sandboxedStreamDescription":"Statusmeldinger fra brukere satt i lekekassen, så vil meldingene bli ekskludert fra den offentlige tidslinjen og hele nettverks tidslinjen. Statusmeldinger send når man er i lekekasse vil ikke bli inkludert i den offentlige tidslinjen hvis brukeren blir tatt ut av lekekassen.", "onlyShowNotificationsFromUsersIFollow":"Vis kun notifikasjoner fra brukere jeg følger", - "userOptions":"More user actions", - "silenceThisUser":"Silence {nickname}", - "sandboxThisUser":"Sandbox {nickname}", - "unSilenceThisUser":"Unsilence {nickname}", - "unSandboxThisUser":"Unsandbox {nickname}", - "ERRORfailedSandboxingUser":"Failed sandboxing/unsandboxing the user", - "ERRORfailedSilencingUser":"Failed silencing/unsilencing the user" + "userOptions":"Flere hendelser fra bruker", + "silenceThisUser":"Forstumme {nickname}", + "sandboxThisUser":"Sett i lekekasse {nickname}", + "unSilenceThisUser":"Opphev forstumming for {nickname}", + "unSandboxThisUser":"Opphev lekekasse for {nickname}", + "ERRORfailedSandboxingUser":"Feilet ved forsøk på å sette i lekekasse/oppheve lekekasse av bruker", + "ERRORfailedSilencingUser":"Feilet ved forstumming/oppheving av forstumming av bruker" } From 9bf92d11aaca27f9ee0d7de0ea2ab0397497b1bc Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 4 Mar 2016 23:07:15 +0100 Subject: [PATCH 113/120] mute and bugfixes --- QvitterPlugin.php | 15 +++ actions/apiqvitterblocks.php | 2 +- actions/apiqvittermutes.php | 182 ++++++++++++++++++++++++++++ actions/qvitter.php | 9 +- classes/NotificationStream.php | 10 ++ classes/QvitterMuted.php | 105 +++++++++++++++++ css/qvitter.css | 99 +++++++++++++--- js/dom-functions.js | 71 ++++++++--- js/lib/bowser.min.js | 2 +- js/misc-functions.js | 210 +++++++++++++++++++++++++++++---- js/qvitter.js | 173 +++++++++++++++++++-------- js/stream-router.js | 26 +++- locale/ar.json | 16 ++- locale/ast.json | 12 +- locale/ca.json | 12 +- locale/de.json | 12 +- locale/en.json | 16 ++- locale/eo.json | 12 +- locale/es.json | 12 +- locale/es_ahorita.json | 12 +- locale/eu.json | 12 +- locale/fa.json | 12 +- locale/fi.json | 12 +- locale/fr.json | 12 +- locale/gl.json | 12 +- locale/he.json | 12 +- locale/io.json | 12 +- locale/it.json | 12 +- locale/ja.json | 12 +- locale/nb.json | 12 +- locale/nl.json | 12 +- locale/pt.json | 12 +- locale/pt_br.json | 12 +- locale/ru.json | 12 +- locale/sq.json | 12 +- locale/sv.json | 14 ++- locale/tr.json | 12 +- locale/zh_cn.json | 12 +- locale/zh_tw.json | 12 +- 39 files changed, 1094 insertions(+), 144 deletions(-) create mode 100644 actions/apiqvittermutes.php create mode 100644 classes/QvitterMuted.php diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 2c3992e..742a1ff 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -153,6 +153,11 @@ class QvitterPlugin extends Plugin { // route/reroute urls public function onRouterInitialized($m) { + $m->connect(':nickname/mutes', + array('action' => 'qvitter', + 'nickname' => Nickname::INPUT_FMT)); + $m->connect('api/qvitter/mutes.json', + array('action' => 'ApiQvitterMutes')); $m->connect('api/qvitter/sandboxed.:format', array('action' => 'ApiQvitterSandboxed', 'format' => '(xml|json)')); @@ -1291,6 +1296,16 @@ class QvitterPlugin extends Plugin { $notification->whereAdd(sprintf('qvitternotification.from_profile_id IN (SELECT subscribed FROM subscription WHERE subscriber = %u)', $user_id)); } + // the user might have opted out from notifications from profiles they have muted + $hide_notifications_from_muted_users = Profile_prefs::getConfigData($profile, 'qvitter', 'hide_notifications_from_muted_users'); + if($hide_notifications_from_muted_users == '1') { + $muted_ids = QvitterMuted::getMutedIDs($profile->id,0,10000); // get all (hopefully not more than 10 000...) + if($muted_ids !== false && count($muted_ids) > 0) { + $ids_imploded = implode(',',$muted_ids); + $notification->whereAdd('qvitternotification.from_profile_id NOT IN ('.$ids_imploded.')'); + } + } + // the user might have opted out from certain notification types $current_profile = $user->getProfile(); $disable_notify_replies_and_mentions = Profile_prefs::getConfigData($current_profile, 'qvitter', 'disable_notify_replies_and_mentions'); diff --git a/actions/apiqvitterblocks.php b/actions/apiqvitterblocks.php index f6d7bb2..d970605 100644 --- a/actions/apiqvitterblocks.php +++ b/actions/apiqvitterblocks.php @@ -96,7 +96,7 @@ class ApiQvitterBlocksAction extends ApiPrivateAuthAction } /** - * Get the user's subscribers (followers) as an array of profiles + * Get the user's blocked profiles * * @return array Profiles */ diff --git a/actions/apiqvittermutes.php b/actions/apiqvittermutes.php new file mode 100644 index 0000000..ec56189 --- /dev/null +++ b/actions/apiqvittermutes.php @@ -0,0 +1,182 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + +if (!defined('GNUSOCIAL')) { exit(1); } + + +class ApiQvitterMutesAction extends ApiPrivateAuthAction +{ + var $profiles = null; + + /** + * Take arguments for running + * + * @param array $args $_REQUEST args + * + * @return boolean success flag + */ + protected function prepare(array $args=array()) + { + parent::prepare($args); + + $this->format = 'json'; + + $this->count = (int)$this->arg('count', 100); + + return true; + } + + /** + * Handle the request + * + * Show the profiles + * + * @return void + */ + protected function handle() + { + parent::handle(); + + $this->target = Profile::current(); + + if(!$this->target instanceof Profile) { + $this->clientError(_('You have to be logged in to view your mutes.'), 403); + } + + $this->profiles = $this->getProfiles(); + + $this->initDocument('json'); + print json_encode($this->showProfiles()); + $this->endDocument('json'); + } + + /** + * Get the user's muted profiles + * + * @return array Profiles + */ + protected function getProfiles() + { + $offset = ($this->page - 1) * $this->count; + $limit = $this->count; + + $mutes = QvitterMuted::getMutedProfiles($this->target->id, $offset, $limit); + + if($mutes) { + return $mutes; + } else { + return false; + } + } + + /** + * Is this action read only? + * + * @param array $args other arguments + * + * @return boolean true + */ + function isReadOnly($args) + { + return true; + } + + /** + * When was this feed last modified? + * + * @return string datestamp of the latest profile in the stream + */ + function lastModified() + { + if (!empty($this->profiles) && (count($this->profiles) > 0)) { + return strtotime($this->profiles[0]->modified); + } + + return null; + } + + /** + * An entity tag for this action + * + * Returns an Etag based on the action name, language, user ID, and + * timestamps of the first and last profiles in the subscriptions list + * There's also an indicator to show whether this action is being called + * as /api/statuses/(friends|followers) or /api/(friends|followers)/ids + * + * @return string etag + */ + function etag() + { + if (!empty($this->profiles) && (count($this->profiles) > 0)) { + + $last = count($this->profiles) - 1; + + return '"' . implode( + ':', + array($this->arg('action'), + common_user_cache_hash($this->auth_user), + common_language(), + $this->target->id, + 'Profiles', + strtotime($this->profiles[0]->modified), + strtotime($this->profiles[$last]->modified)) + ) + . '"'; + } + + return null; + } + + /** + * Show the profiles as Twitter-style useres and statuses + * + * @return void + */ + function showProfiles() + { + $user_arrays = array(); + if($this->profiles !== false) { + foreach ($this->profiles as $profile) { + $user_arrays[] = $this->twitterUserArray($profile, false ); + } + } + return $user_arrays; + } +} diff --git a/actions/qvitter.php b/actions/qvitter.php index 50f8081..79f263b 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -480,11 +480,8 @@ class QvitterAction extends ApiAction -
  • +
  • -
  • -
  • -
  • @@ -492,6 +489,8 @@ class QvitterAction extends ApiAction
  • + +