From 9a34cd7ea6d92bd79a3d393775cb67f3400f0001 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 22 Jan 2016 21:41:37 +0100 Subject: [PATCH 01/35] 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 02/35] 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 03/35] 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 04/35] 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 05/35] 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 06/35] 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 07/35] 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 08/35] =?UTF-8?q?updated=20Portugu=C3=AAs-Brasil=20transla?= =?UTF-8?q?tion=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 09/35] =?UTF-8?q?Portugu=C3=AAs=20is=20not=20Portugu=C3=AA?= =?UTF-8?q?s-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 10/35] 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 11/35] 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 12/35] 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 13/35] 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 14/35] 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 15/35] 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 16/35] 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 17/35] 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 18/35] 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 19/35] 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 20/35] 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 21/35] 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 22/35] 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 23/35] 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 24/35] 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 25/35] 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 26/35] 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 27/35] 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 28/35] 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 29/35] 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 30/35] 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 31/35] 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 32/35] 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 33/35] 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 34/35] 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 35/35] 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) == ' ') {