From 4dea81c5067f0747b43136896abeaaffb272cba1 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 30 Dec 2016 13:25:38 +0100 Subject: [PATCH 01/16] csrf fix --- QvitterPlugin.php | 28 ++++++++++++++++++++++++++++ actions/qvitter.php | 9 +++++++++ actions/qvitterlogin.php | 11 +++++++++++ js/ajax-functions.js | 33 +++++++++++++++++++++++++++++++++ js/misc-functions.js | 12 ++++++++++++ 5 files changed, 93 insertions(+) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index e1540da..8ebeae5 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -422,6 +422,16 @@ class QvitterPlugin extends Plugin { } + /** + * Remove CSRF cookie on logout + * + */ + + function onEndLogout($action) { + common_set_cookie('Qvitter-CSRF', '', 0); + return true; + } + /** * Add script to default ui, to be able to toggle Qvitter with one click @@ -1285,6 +1295,24 @@ class QvitterPlugin extends Plugin { */ public function onEndSetApiUser($user) { + // if we're POST:ing and are logged in using a regular session (i.e. not basic auth or oauth) + // check that we have a correct csrf cookie and header, otherwise deny + if(common_logged_in() && $_SERVER['REQUEST_METHOD'] === 'POST') { + if(!isset($_COOKIE['Qvitter-CSRF'])) { + throw new ServerException(_('Error setting user. Missing authorization cookie data. Please logout and login again.')); + } + $csrf_token = sha1(common_config('qvitter', 'appid').session_id()); + if($_COOKIE['Qvitter-CSRF'] != $csrf_token) { + throw new ServerException(_('Error setting user. Invalid authorization cookie data. Please logout and login again.')); + } + if(!isset($_SERVER['HTTP_X_QVITTER_CSRF'])) { + throw new ServerException(_('Error setting user. Missing authorization header data. Please logout and login again.')); + } + if($_SERVER['HTTP_X_QVITTER_CSRF'] != $csrf_token) { + throw new ServerException(_('Error setting user. Invalid authorization header data. Please logout and login again.')); + } + } + // cleanup sessions, to allow for simultaneous http-requests, // e.g. if posting a notice takes a very long time Session::cleanup(); diff --git a/actions/qvitter.php b/actions/qvitter.php index 5b8e790..61ad204 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -45,6 +45,15 @@ class QvitterAction extends ApiAction { parent::prepare($args); + // if we're logged in but we have missing or incorrect csrf cookie, logout + if(common_logged_in()) { + $csrf_token = sha1(common_config('qvitter', 'appid').session_id()); + if(!isset($_COOKIE['Qvitter-CSRF']) || $_COOKIE['Qvitter-CSRF'] != $csrf_token) { + header('Location: '.common_path('').'main/logout'); + die(); + } + } + $user = common_current_user(); return true; diff --git a/actions/qvitterlogin.php b/actions/qvitterlogin.php index 800cc84..f350662 100644 --- a/actions/qvitterlogin.php +++ b/actions/qvitterlogin.php @@ -112,6 +112,17 @@ class QvitterLoginAction extends FormAction common_rememberme($user); } + // make sure we have a unique app id for this Qvitter installation in config + // to use for creating a csrf token + if(common_config('qvitter', 'appid') == false) { + Config::save('qvitter', 'appid', sha1(common_random_hexstr(16))); + } + + // set csrf-cookie + $csrf_token = sha1(common_config('qvitter', 'appid').session_id()); + common_set_cookie('Qvitter-CSRF', $csrf_token, time() + 60*60*24*30); // 1 month + + $url = common_get_returnto(); if ($url) { diff --git a/js/ajax-functions.js b/js/ajax-functions.js index 9f2734d..fcab8d8 100644 --- a/js/ajax-functions.js +++ b/js/ajax-functions.js @@ -334,6 +334,9 @@ function postUpdateBookmarks(newBookmarks) { $.ajax({ url: window.apiRoot + 'qvitter/update_bookmarks.json', cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { bookmarks: bookmarksString }, @@ -358,6 +361,9 @@ function postNewLinkColor(newLinkColor) { $.ajax({ url: window.apiRoot + 'qvitter/update_link_color.json', cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { linkcolor: newLinkColor }, @@ -383,6 +389,9 @@ function postNewBackgroundColor(newBackgroundColor) { $.ajax({ url: window.apiRoot + 'qvitter/update_background_color.json', cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { backgroundcolor: newBackgroundColor }, @@ -412,6 +421,9 @@ function postSetProfilePref(namespace, topic, data, callback) { $.ajax({ url: window.apiRoot + 'qvitter/set_profile_pref.json', cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { namespace: namespace, topic: topic, @@ -448,6 +460,9 @@ function APIFollowOrUnfollowUser(followOrUnfollow,user_id,this_element,actionOnS $.ajax({ url: window.apiRoot + postRequest, cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { user_id: user_id }, @@ -485,6 +500,9 @@ function APIBlockOrUnblockUser(blockOrUnblock,user_id,actionOnSuccess) { $.ajax({ url: window.apiRoot + postRequest, cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { id: user_id }, @@ -515,6 +533,9 @@ function APISandboxCreateOrDestroy(createOrDestroy,userId,actionOnSuccess) { $.ajax({ url: window.apiRoot + 'qvitter/sandbox/' + createOrDestroy + '.json', cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { id: userId }, @@ -545,6 +566,9 @@ function APISilenceCreateOrDestroy(createOrDestroy,userId,actionOnSuccess) { $.ajax({ url: window.apiRoot + 'qvitter/silence/' + createOrDestroy + '.json', cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { id: userId }, @@ -577,6 +601,9 @@ function APIJoinOrLeaveGroup(joinOrLeave,group_id,this_element,actionOnSuccess) $.ajax({ url: window.apiRoot + 'statusnet/groups/' + joinOrLeave + '.json', cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { id: group_id }, @@ -608,6 +635,9 @@ function postQueetToAPI(queetText_txt, in_reply_to_status_id, postToGroups, acti $.ajax({ url: window.apiRoot + 'qvitter/statuses/update.json', cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { status: queetText_txt, source: 'Qvitter', @@ -643,6 +673,9 @@ function postActionToAPI(action, actionOnSuccess) { $.ajax({ url: window.apiRoot + action, cache: false, type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { source: 'Qvitter' }, diff --git a/js/misc-functions.js b/js/misc-functions.js index 50bbe6b..b0a8823 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -37,6 +37,18 @@ · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ +/* · + · + · Get cookie by name + · + · @param a: cookie name + · + · · · · · · · · · */ + +function getCookieValue(a) { + var b = document.cookie.match('(^|;)\\s*' + a + '\\s*=\\s*([^;]+)'); + return b ? b.pop() : ''; +} /* · · From a7f82628402db3a7579bb9b2877da3c5737da77b Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Fri, 30 Dec 2016 16:02:29 +0100 Subject: [PATCH 02/16] forgot there were ajax stuff in qvitter.js also, sry, sloppy --- js/qvitter.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/js/qvitter.js b/js/qvitter.js index 3db4271..87220a9 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -1672,6 +1672,9 @@ $('body').on('click','.qvitter-follow-button',function(event){ // if there's no local user id, we have to take a detour $.ajax({ url: window.siteInstanceURL + 'main/ostatussub', type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { token: window.commonSessionToken, profile: $(this).attr('data-follow-user'), @@ -3845,6 +3848,9 @@ $('body').on('click','.crop-and-save-button',function(){ $.ajax({ url: window.apiRoot + 'account/update_profile_banner.json', type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: coverImgFormData, processData: false, contentType: false, @@ -3878,6 +3884,9 @@ $('body').on('click','.crop-and-save-button',function(){ else if($('#edit-profile-popup .jwc_frame.avatar-to-crop').length>0) { $.ajax({ url: window.apiRoot + 'qvitter/update_avatar.json', type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { cropH: window.jwc.result.cropH, cropW: window.jwc.result.cropW, @@ -3910,6 +3919,9 @@ $('body').on('click','.crop-and-save-button',function(){ else if($('#edit-profile-popup .jwc_frame.background-to-crop').length>0) { $.ajax({ url: window.apiRoot + 'qvitter/update_background_image.json', type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { cropH: window.jwc.result.cropH, cropW: window.jwc.result.cropW, @@ -3949,6 +3961,9 @@ $('body').on('click','.save-profile-button',function(){ if(validateEditProfileForm($('#edit-profile-popup'))) { $.ajax({ url: window.apiRoot + 'account/update_profile.json', type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: { name: $('#edit-profile-popup input.fullname').val(), url: $('#edit-profile-popup input.url').val(), @@ -4142,6 +4157,9 @@ function uploadAttachment(e, thisUploadButton) { // upload $.ajax({ url: window.apiRoot + 'statusnet/media/upload', type: "POST", + beforeSend: function (xhr) { + xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); + }, data: imgFormData, contentType: false, processData: false, From a5a027e57f1936e6eb9fdd1eaff22b27e29331f0 Mon Sep 17 00:00:00 2001 From: Maliktunga Date: Sun, 15 Jan 2017 09:27:05 +0000 Subject: [PATCH 03/16] Update io.json --- locale/io.json | 266 ++++++++++++++++++++++++------------------------- 1 file changed, 133 insertions(+), 133 deletions(-) diff --git a/locale/io.json b/locale/io.json index e7779b4..45ee5f8 100644 --- a/locale/io.json +++ b/locale/io.json @@ -1,38 +1,38 @@ { "directionality":"ltr", "languageName": "Ido", - "loginUsername": "Uzer-nomo o e-adreso", - "loginPassword": "Pas-vorto", - "loginSignIn": "Konektar me", + "loginUsername": "Uzeronomo o retpostadreso", + "loginPassword": "Pasovorto", + "loginSignIn": "Enirar", "loginRememberMe": "Memorar me", - "loginForgotPassword": "Ka vu obliviis vua pas-vorto?", - "notices": "Mesaji", + "loginForgotPassword": "Ka vu obliviis vua pasovorto?", + "notices": "Pepii", "followers": "Sequanti", "following": "Sequati", "groups": "Grupi", - "compose": "Kompozez nova mesajo…", + "compose": "Krear nova pipio…", "queetVerb": "Sendar", - "queetsNounPlural": "Mesaji", - "logout": "Deskonektar me", + "queetsNounPlural": "Pipii", + "logout": "Ekirar", "languageSelected": "Linguo:", - "viewMyProfilePage": "Vidar mea profil-pagino", - "expand": "Estalar", - "collapse": "Faldar", + "viewMyProfilePage": "Vidar mea profilpagino", + "expand": "Revelar", + "collapse": "Celar", "details": "Detali", - "expandFullConversation": "Estalar la tota konverso", + "expandFullConversation": "Revelar la tota konverso", "replyVerb": "Respondar", - "requeetVerb": "Repetar", - "favoriteVerb": "Favorar", - "requeetedVerb": "Repetita", - "favoritedVerb": "Favorata", + "requeetVerb": "Ripipiar", + "favoriteVerb": "Stelizar", + "requeetedVerb": "Ripipiita", + "favoritedVerb": "Stelizita", "replyTo": "Respondar ad", - "requeetedBy": "Repetita da {requeeted-by}", - "favoriteNoun": "Favoro", - "favoritesNoun": "Favori", - "requeetNoun": "Repeto", - "requeetsNoun": "Repeti", - "newQueet": "{new-notice-count} nova mesajo", - "newQueets": "{new-notice-count} nova mesaji", + "requeetedBy": "Ripipiita da {requeeted-by}", + "favoriteNoun": "Stelizito", + "favoritesNoun": "Steliziti", + "requeetNoun": "Ripipio", + "requeetsNoun": "Ripipii", + "newQueet": "{new-notice-count} nova pipio", + "newQueets": "{new-notice-count} nova pipii", "longmonthsJanuary": "januaro", "longmonthsFebruary": "februaro", "longmonthsMars": "marto", @@ -58,144 +58,144 @@ "shortmonthsNovember": "nov", "shortmonthsDecember": "dec", "time12am": "{time} matine", - "time12pm": "{time} posdimeze", - "longDateFormat": "{time12}, {day}ma di {month} {year}", + "time12pm": "{time} vespere", + "longDateFormat": "{time12} - {day}-ma {month} {year}", "shortDateFormatSeconds": "{seconds}s", - "shortDateFormatMinutes": "{minutes}m", + "shortDateFormatMinutes": "{minutes}min", "shortDateFormatHours": "{hours}h", - "shortDateFormatDate": "{day} {month}", - "shortDateFormatDateAndY": "{day} {month} {year}", + "shortDateFormatDate": "{day}-ma di {month}", + "shortDateFormatDateAndY": "{day}-ma {month} {year}", "now": "nun", - "posting": "publikeske", - "viewMoreInConvBefore": "← Vidar plu multe dil konverso", - "viewMoreInConvAfter": "Vidar plu multe dil konverso →", + "posting": "sendo", + "viewMoreInConvBefore": "← Vidar plue en la konverso", + "viewMoreInConvAfter": "Vidar plue en la konverso →", "mentions": "Mencioni", "timeline": "Tempolineo", - "publicTimeline": "Che {site-title}", - "publicAndExtTimeline": "Del tota retaro", - "searchVerb": "Serchez…", - "deleteVerb": "Supresar", + "publicTimeline": "Publika tempolineo", + "publicAndExtTimeline": "La tota konocata reto", + "searchVerb": "Serchar…", + "deleteVerb": "Efacar", "cancelVerb": "Anular", - "deleteConfirmation": "Ka vu certe volas supresar la mesajo?", + "deleteConfirmation": "Ka vu esas certa, ke vu volas efacar ca pipio?", "userExternalFollow": "Sequar", - "userExternalFollowHelp": "L'identifikilo di vua konto (ex. uzero@quitter.no)", + "userExternalFollowHelp": "Identifikilo di vua konto (ex. uzero@quitter.no)", "userFollow": "Sequar", - "userFollowing": "Sequanta", + "userFollowing": "Sequato", "userUnfollow": "Cesar sequar", "joinGroup": "Membreskar", "joinExternalGroup": "Membreskar", "isMemberOfGroup": "Membro", - "leaveGroup": "Abandonar", + "leaveGroup": "Livar", "memberCount": "Membri", "adminCount": "Administranti", "settings": "Ajusti", - "saveChanges": "Konservar la chanji", - "linkColor": "Ligili", - "backgroundColor": "Fundo", - "newToQuitter": "Nova che {site-title}?", - "signUp": "Registragez vu", + "saveChanges": "Konservar chanji", + "linkColor": "Koloro di la ligili", + "backgroundColor": "Funda koloro", + "newToQuitter": "Ka vu esas nova che {site-title}?", + "signUp": "Enrejistrar su", "signUpFullName": "Kompleta nomo", - "signUpEmail": "E-adreso", - "signUpButtonText": "Registragar me che {site-title}", - "welcomeHeading": "Bonvenez che {site-title}!", + "signUpEmail": "Retpostadreso", + "signUpButtonText": "Enrejistrar su che {site-title}", + "welcomeHeading": "Bonvenez ad {site-title}.", "welcomeText": "Ni esas
\"Federo\" signifikas, ke konto che {site-title} esas fakultativa por sequar, esar sequata da, od interagar kun uzeri di {site-title}. Vu povas registragar vu en servilo di GNU Social od en irga servado fondita sur la protokolo OStatus! Vu ne mem mustas juntar vu a servado: probez instalar l'aminda programo GNU Social en vua propra servilo! :)
federo
de mikroblogeri qui sucias etiko e solidareso, e qui deziras abandonar la centraligita e kapitalista servadi.", - "registerNickname": "Uzer-nomo", - "registerHomepage": "Hemopagino", + "registerNickname": "Uzeronomo", + "registerHomepage": "Retoloko", "registerBio": "Biografio", "registerLocation": "Loko", - "registerRepeatPassword": "Repetez la pas-vorto", - "moreSettings": "Plusa ajusti", - "otherServers": "Altre vu povas krear konto en altra servilo di la reto GNU Social. Komparar", - "editMyProfile": "Modifikar mea profilo", + "registerRepeatPassword": "Repetar pasovorto", + "moreSettings": "Plua ajusti", + "otherServers": "Alternative, vu povas krear konto en altra servero di la reto GNU Social.", + "editMyProfile": "Modifikar profilo", "notifications": "Notifiki", - "xFavedYourQueet": "favoras vua mesajo", - "xRepeatedYourQueet": "repetis vua mesajo", - "xStartedFollowingYou": "sequeskis vu", + "xFavedYourQueet": "vua pipio stelizesis", + "xRepeatedYourQueet": "ripipiis vu", + "xStartedFollowingYou": "sequas vu", "followsYou": "sequas vu", - "FAQ": "Ofta questioni", - "inviteAFriend": "Invitez amiko!", - "goToExternalProfile": "Irar al kompleta profilo", - "cropAndSave": "Rekortar e konservar", - "showTerms": "Lektez nia uzokondicioni", - "ellipsisMore": "Pluse", - "blockUser": "Blokusar {username}", - "goToOriginalNotice": "Irar al original mesajo", - "goToTheUsersRemoteProfile": "Irar al profilo di la uzero", - "clickToDrag":"Kliktigez por tranar", - "keyboardShortcuts":"Agi klavarala", + "FAQ": "Ofta demandi", + "inviteAFriend": "Invitez vua amiki!", + "goToExternalProfile": "Irar a kompleta profilo", + "cropAndSave": "Rekortar e salvar", + "showTerms": "Lektez la uzokondicioni", + "ellipsisMore": "Plue", + "blockUser": "Impedar {username}", + "goToOriginalNotice": "Irar ad originala pipio", + "goToTheUsersRemoteProfile": "Irar a la uzerala fora profilo", + "clickToDrag":"Kliktez por tranar", + "keyboardShortcuts":"Kurtavoyala menuo", "classicInterface":"Klasika {site-title}", - "accessibilityToggleLink":"Por plu bona acesebleso, kliktigez sur la ligilo por enswichar la klasika uzer-interfacio.", - "tooltipBookmarkStream":"Adjuntar la disktuto-fluo a mea marko-rubandi", + "accessibilityToggleLink":"Por plu bona acesebleso, kliktez sur ca ligilo por chanjar a la klasika interfacio", + "tooltipBookmarkStream":"Adjuntar ca fluo a vua markorubandi", "tooltipTopMenu":"Menuo ed ajusti", "tooltipAttachImage":"Atachar imajo", - "tooltipShortenUrls":"Plukurtigar omna ret-adresi en la mesajo", - "tooltipReloadStream":"Aktualigar la diskuto-fluo", - "tooltipRemoveBookmark":"Supresar la marko-rubando", - "clearHistory":"Vakuigar la navigo-historio", + "tooltipShortenUrls":"Kurtigar omna URL-i en la pipio", + "tooltipReloadStream":"Aktualigar ca fluo", + "tooltipRemoveBookmark":"Efacar ca markorubando", + "clearHistory":"Vakuigar navigala historio", "ERRORsomethingWentWrong":"Ulo miseventis.", - "ERRORmustBeLoggedIn":"Vu mustas esar identifikita por vidar la diskuto-fluo.", - "ERRORcouldNotFindUserWithNickname":"On ne trovis uzero kun la nomo \"{nickname}\" en la servilo.", - "ERRORcouldNotFindGroupWithNickname":"On ne trovis grupo kun la nomo \"{nickname}\" en la servilo.", - "ERRORcouldNotFindPage":"On ne trovis la pagino.", - "ERRORnoticeRemoved": "On supresis la mesajo.", - "ERRORnoContactWithServer": "On ne povis konektar su kun la servilo. Forsan ol esas supercharjata, od esas problemo pri vua Interret-konekto. Probez itere plu tarde! ", - "ERRORattachmentUploadFailed": "La kargo faliis. Forsan la formato ne suportesas o la grandeso esas tro multa.", - "hideRepliesToPeopleIDoNotFollow":"Celar la respondi ad iti quin me ne sequas", + "ERRORmustBeLoggedIn":"Vu bezonas enirir por vidar ca fluo.", + "ERRORcouldNotFindUserWithNickname":"Ne esis posibla trovar uzero kun la nomo \"{nickname}\" en ca servero.", + "ERRORcouldNotFindGroupWithNickname":"Ne esis posibla trovar grupo kun la nomo \"{nickname}\" en ca servero.", + "ERRORcouldNotFindPage":"Ne esis posibla trovar ca pagino.", + "ERRORnoticeRemoved": "Ca pipio efacesis.", + "ERRORnoContactWithServer": "Ne esis posibla konektar kun la servero. Forsan la servero esas supercharjita, od esas problemo kun vua Interretala konekto. Voluntez riprobar pose! ", + "ERRORattachmentUploadFailed": "La kargo faliis. La dosierformo forsan ne suportesas o lu esas tro granda.", + "hideRepliesToPeopleIDoNotFollow":"Celar respondi a homi quin me ne sequas", "markAllNotificationsAsSeen":"Markizar omna notifiki kom vidita", "notifyRepliesAndMentions":"Mencioni e respondi", - "notifyFavs":"Favori", - "notifyRepeats":"Repeti", + "notifyFavs":"Steliziti", + "notifyRepeats":"Ripipii", "notifyFollows":"Nova sequanti", - "timelineOptions":"Ajusti dil tempolineo", - "ERRORfailedSavingYourSetting":"On faliis, ke on konservez vua ajusti.", - "ERRORfailedMarkingAllNotificationsAsRead":"On faliis, ke on markizez omna notifiki kom vidita.", + "timelineOptions":"Tempolineala ajusti", + "ERRORfailedSavingYourSetting":"Faliis salvar vua ajusti.", + "ERRORfailedMarkingAllNotificationsAsRead":"Faliis markizar omna notifiki kom vidita.", "newNotification": "{new-notice-count} nova notifiko", "newNotifications": "{new-notice-count} nova notifiki", - "thisIsANoticeFromABlockedUser":"Averto: Ita mesajo esas da uzero quan vu blokusis. Kliktigez por ke on montrez olu.", - "nicknamesListWithListName":"{nickname}’s list: {list-name}", - "myListWithListName":"My list: {list-name}", - "listMembers":"Members", - "listSubscribers":"Subscribers", - "ERRORcouldNotFindList":"There is no such list.", - "emailAlreadyInUse":"Already in use", - "addEditLanguageLink":"Help translate {site-title} to another language", - "onlyPartlyTranslated":"{site-title} is only partly translated to {language-name} ({percent}%). You can help complete the translation at Qvitter's repository homepage", - "startRant":"Start a rant", - "continueRant":"Continue the rant", - "hideEmbeddedInTimeline":"Hide embedded content in this timeline", - "hideQuotesInTimeline":"Hide quotes in this timeline", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}.", - "silenced":"Silenced", - "silencedPlural":"Silenced profiles", - "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", - "sandboxed":"Sandboxed", - "sandboxedPlural":"Sandboxed profiles", - "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", - "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", - "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Apart from that, they can use the site like any other user.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", - "userOptions":"More user actions", - "silenceThisUser":"Silence {nickname}", - "sandboxThisUser":"Sandbox {nickname}", - "unSilenceThisUser":"Unsilence {nickname}", - "unSandboxThisUser":"Unsandbox {nickname}", - "ERRORfailedSandboxingUser":"Failed sandboxing/unsandboxing the user", - "ERRORfailedSilencingUser":"Failed silencing/unsilencing the user", - "muteUser":"Mute", - "unmuteUser":"Unmute", - "hideNotificationsFromMutedUsers":"Hide notifications from muted users", - "thisIsANoticeFromAMutedUser":"You have muted the author of this quip. Click here to show it anyway.", - "userMutes":"Accounts you're muting", - "userBlocked":"Blocked accounts", - "userMuted":"Muted accounts", - "mutedStreamDescription":"You've hidden these accounts from your timeline. You will still recieve notifications from these accounts, unless you select "Hide notifications from muted users" from the cog wheel menu on the notifications page.", - "profileAndSettings":"Profile and settings", - "profileSettings":"Profile settings", - "thisIsABookmark":"This is a bookmark created in the Classic interface" + "thisIsANoticeFromABlockedUser":"Averto: ca esas pipio da uzero, quan vu impedis. Kliktez por montrar olu.", + "nicknamesListWithListName":"Listo di {nickname}: {list-name}", + "myListWithListName":"Mea listo: {list-name}", + "listMembers":"Membri", + "listSubscribers":"Aboninti", + "ERRORcouldNotFindList":"Ne esas tala listo.", + "emailAlreadyInUse":"Ulu ja uzas lu", + "addEditLanguageLink":"Helpez tradukar {site-title} ad altra linguo", + "onlyPartlyTranslated":"{site-title} esas nur partale tradukita ad {language-name} ({percent}%). Vu povas kompletigar la traduko che la depozeyo di Qvitter", + "startRant":"Plendeskar", + "continueRant":"Durigar la plendo", + "hideEmbeddedInTimeline":"Celar enkorpigita kontenaji en ca tempolineo", + "hideQuotesInTimeline":"Celar citaji en ca tempolineo", + "userBlocks":"Impedata konti", + "buttonBlocked":"Impedata", + "buttonUnblock":"Cesar impedar", + "failedBlockingUser":"Faliis impedar la uzero.", + "failedUnblockingUser":"Faliis cesar impedar la uzero.", + "unblockUser": "Cesar impedar {username}", + "tooltipBlocksYou":"Vu impedesas sequar {username}.", + "silenced":"Silencigita", + "silencedPlural":"Silencigita profili", + "silencedUsersOnThisInstance":"Silencigita profili sur {site-title}", + "sandboxed":"Ensabluya", + "sandboxedPlural":"Ensabluya profili", + "sandboxedUsersOnThisInstance":"Ensabluya profili sur {site-title}", + "silencedStreamDescription":"Silencigita uzeri ne povas enirar o sendar pipii, e la pipii quin li ja sendis celesas. A lokal uzeri, to esas simila ad efaco, qua povas anulesar, ma a fora uzeri esas simila a totaretoloka impedo.", + "sandboxedStreamDescription":"Pipii da ensabluya uzeri efacesas de la publika tempolineo e la tota konocata reto. Pipii sendita dum tempo en la sabluyo ne esos en la publika tempolinei se la uzero eksabluyeskas.", + "onlyShowNotificationsFromUsersIFollow":"Nur montrar notifiki de uzeri, quin me sequas", + "userOptions":"Plua uzerala agi", + "silenceThisUser":"Silencigar {nickname}", + "sandboxThisUser":"Ensabluyigar {nickname}", + "unSilenceThisUser":"Dessilencigar {nickname}", + "unSandboxThisUser":"Eksabluyigar {nickname}", + "ERRORfailedSandboxingUser":"Faliis ensabluyigar/eksabluyigar la uzero", + "ERRORfailedSilencingUser":"Faliis silencigar/dessilencigar la uzero", + "muteUser":"Mutigar", + "unmuteUser":"Desmutigar", + "hideNotificationsFromMutedUsers":"Celar notifiki de muta uzeri", + "thisIsANoticeFromAMutedUser":"Vu mutigis la autoro di ca pipio. Kliktez hike por montrar olu.", + "userMutes":"Konti quin vu mutigas", + "userBlocked":"Impedata konti", + "userMuted":"Muta konti", + "mutedStreamDescription":"Vu celis ca konti de vua tempolineo. Vu ankore recevos notifiki de ca konti, ecepte se vu selektus "Celar notifiki de muta uzeri" per la dentorota menuo en la notifikala pagino.", + "profileAndSettings":"Profilo ed ajusti", + "profileSettings":"Profilala ajusti", + "thisIsABookmark":"Ca esas markorubando kreita en la klasika interfacio" } From 960bd1f15e994e1e8f1a822d56fdcb4d527ce176 Mon Sep 17 00:00:00 2001 From: Maliktunga Date: Sun, 15 Jan 2017 19:48:26 +0000 Subject: [PATCH 04/16] Update io.json: the welcome text --- locale/io.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/io.json b/locale/io.json index 45ee5f8..d0c66b2 100644 --- a/locale/io.json +++ b/locale/io.json @@ -98,7 +98,7 @@ "signUpEmail": "Retpostadreso", "signUpButtonText": "Enrejistrar su che {site-title}", "welcomeHeading": "Bonvenez ad {site-title}.", - "welcomeText": "Ni esas
\"Federo\" signifikas, ke konto che {site-title} esas fakultativa por sequar, esar sequata da, od interagar kun uzeri di {site-title}. Vu povas registragar vu en servilo di GNU Social od en irga servado fondita sur la protokolo OStatus! Vu ne mem mustas juntar vu a servado: probez instalar l'aminda programo GNU Social en vua propra servilo! :)
federo
de mikroblogeri qui sucias etiko e solidareso, e qui deziras abandonar la centraligita e kapitalista servadi.", + "welcomeText": "Ni esas
Notico por «federo»: «federo» signifikas, ke vu ne bezonas konto che {site-title} por povar sequar lia uzeri, o ke li povez sequar vu ed/od interagar kun la uzeri di {site-title}. Vu povas enrejistrar vu che irga servero di StatusNet o GNU social, o irga servero, qua fondesas sur la protokolo OStatus! Mem ne esas necesa enrejistrar su en una ek la existanta serveri – Vu ipsa povas instalar la bela programo GNU social en vua propra servero! :)
federo
de mikroblogeri, qui sucias etiko e solidareso, e qui deziras desertar la centraligita kapitalista servadi.", "registerNickname": "Uzeronomo", "registerHomepage": "Retoloko", "registerBio": "Biografio", From 1c1b4b19e132675c260335a957aa43ad8394e0a5 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 17 Jan 2017 16:53:46 +0100 Subject: [PATCH 05/16] revert the crappy csrf fix. already fixed by @mmn in newer gnusocial. --- QvitterPlugin.php | 28 ---------------------------- actions/qvitter.php | 9 --------- actions/qvitterlogin.php | 11 ----------- js/ajax-functions.js | 33 --------------------------------- js/misc-functions.js | 12 ------------ js/qvitter.js | 18 ------------------ 6 files changed, 111 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 8ebeae5..e1540da 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -422,16 +422,6 @@ class QvitterPlugin extends Plugin { } - /** - * Remove CSRF cookie on logout - * - */ - - function onEndLogout($action) { - common_set_cookie('Qvitter-CSRF', '', 0); - return true; - } - /** * Add script to default ui, to be able to toggle Qvitter with one click @@ -1295,24 +1285,6 @@ class QvitterPlugin extends Plugin { */ public function onEndSetApiUser($user) { - // if we're POST:ing and are logged in using a regular session (i.e. not basic auth or oauth) - // check that we have a correct csrf cookie and header, otherwise deny - if(common_logged_in() && $_SERVER['REQUEST_METHOD'] === 'POST') { - if(!isset($_COOKIE['Qvitter-CSRF'])) { - throw new ServerException(_('Error setting user. Missing authorization cookie data. Please logout and login again.')); - } - $csrf_token = sha1(common_config('qvitter', 'appid').session_id()); - if($_COOKIE['Qvitter-CSRF'] != $csrf_token) { - throw new ServerException(_('Error setting user. Invalid authorization cookie data. Please logout and login again.')); - } - if(!isset($_SERVER['HTTP_X_QVITTER_CSRF'])) { - throw new ServerException(_('Error setting user. Missing authorization header data. Please logout and login again.')); - } - if($_SERVER['HTTP_X_QVITTER_CSRF'] != $csrf_token) { - throw new ServerException(_('Error setting user. Invalid authorization header data. Please logout and login again.')); - } - } - // cleanup sessions, to allow for simultaneous http-requests, // e.g. if posting a notice takes a very long time Session::cleanup(); diff --git a/actions/qvitter.php b/actions/qvitter.php index 61ad204..5b8e790 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -45,15 +45,6 @@ class QvitterAction extends ApiAction { parent::prepare($args); - // if we're logged in but we have missing or incorrect csrf cookie, logout - if(common_logged_in()) { - $csrf_token = sha1(common_config('qvitter', 'appid').session_id()); - if(!isset($_COOKIE['Qvitter-CSRF']) || $_COOKIE['Qvitter-CSRF'] != $csrf_token) { - header('Location: '.common_path('').'main/logout'); - die(); - } - } - $user = common_current_user(); return true; diff --git a/actions/qvitterlogin.php b/actions/qvitterlogin.php index f350662..800cc84 100644 --- a/actions/qvitterlogin.php +++ b/actions/qvitterlogin.php @@ -112,17 +112,6 @@ class QvitterLoginAction extends FormAction common_rememberme($user); } - // make sure we have a unique app id for this Qvitter installation in config - // to use for creating a csrf token - if(common_config('qvitter', 'appid') == false) { - Config::save('qvitter', 'appid', sha1(common_random_hexstr(16))); - } - - // set csrf-cookie - $csrf_token = sha1(common_config('qvitter', 'appid').session_id()); - common_set_cookie('Qvitter-CSRF', $csrf_token, time() + 60*60*24*30); // 1 month - - $url = common_get_returnto(); if ($url) { diff --git a/js/ajax-functions.js b/js/ajax-functions.js index fcab8d8..9f2734d 100644 --- a/js/ajax-functions.js +++ b/js/ajax-functions.js @@ -334,9 +334,6 @@ function postUpdateBookmarks(newBookmarks) { $.ajax({ url: window.apiRoot + 'qvitter/update_bookmarks.json', cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { bookmarks: bookmarksString }, @@ -361,9 +358,6 @@ function postNewLinkColor(newLinkColor) { $.ajax({ url: window.apiRoot + 'qvitter/update_link_color.json', cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { linkcolor: newLinkColor }, @@ -389,9 +383,6 @@ function postNewBackgroundColor(newBackgroundColor) { $.ajax({ url: window.apiRoot + 'qvitter/update_background_color.json', cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { backgroundcolor: newBackgroundColor }, @@ -421,9 +412,6 @@ function postSetProfilePref(namespace, topic, data, callback) { $.ajax({ url: window.apiRoot + 'qvitter/set_profile_pref.json', cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { namespace: namespace, topic: topic, @@ -460,9 +448,6 @@ function APIFollowOrUnfollowUser(followOrUnfollow,user_id,this_element,actionOnS $.ajax({ url: window.apiRoot + postRequest, cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { user_id: user_id }, @@ -500,9 +485,6 @@ function APIBlockOrUnblockUser(blockOrUnblock,user_id,actionOnSuccess) { $.ajax({ url: window.apiRoot + postRequest, cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { id: user_id }, @@ -533,9 +515,6 @@ function APISandboxCreateOrDestroy(createOrDestroy,userId,actionOnSuccess) { $.ajax({ url: window.apiRoot + 'qvitter/sandbox/' + createOrDestroy + '.json', cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { id: userId }, @@ -566,9 +545,6 @@ function APISilenceCreateOrDestroy(createOrDestroy,userId,actionOnSuccess) { $.ajax({ url: window.apiRoot + 'qvitter/silence/' + createOrDestroy + '.json', cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { id: userId }, @@ -601,9 +577,6 @@ function APIJoinOrLeaveGroup(joinOrLeave,group_id,this_element,actionOnSuccess) $.ajax({ url: window.apiRoot + 'statusnet/groups/' + joinOrLeave + '.json', cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { id: group_id }, @@ -635,9 +608,6 @@ function postQueetToAPI(queetText_txt, in_reply_to_status_id, postToGroups, acti $.ajax({ url: window.apiRoot + 'qvitter/statuses/update.json', cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { status: queetText_txt, source: 'Qvitter', @@ -673,9 +643,6 @@ function postActionToAPI(action, actionOnSuccess) { $.ajax({ url: window.apiRoot + action, cache: false, type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { source: 'Qvitter' }, diff --git a/js/misc-functions.js b/js/misc-functions.js index b0a8823..50bbe6b 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -37,18 +37,6 @@ · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ -/* · - · - · Get cookie by name - · - · @param a: cookie name - · - · · · · · · · · · */ - -function getCookieValue(a) { - var b = document.cookie.match('(^|;)\\s*' + a + '\\s*=\\s*([^;]+)'); - return b ? b.pop() : ''; -} /* · · diff --git a/js/qvitter.js b/js/qvitter.js index 87220a9..3db4271 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -1672,9 +1672,6 @@ $('body').on('click','.qvitter-follow-button',function(event){ // if there's no local user id, we have to take a detour $.ajax({ url: window.siteInstanceURL + 'main/ostatussub', type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { token: window.commonSessionToken, profile: $(this).attr('data-follow-user'), @@ -3848,9 +3845,6 @@ $('body').on('click','.crop-and-save-button',function(){ $.ajax({ url: window.apiRoot + 'account/update_profile_banner.json', type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: coverImgFormData, processData: false, contentType: false, @@ -3884,9 +3878,6 @@ $('body').on('click','.crop-and-save-button',function(){ else if($('#edit-profile-popup .jwc_frame.avatar-to-crop').length>0) { $.ajax({ url: window.apiRoot + 'qvitter/update_avatar.json', type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { cropH: window.jwc.result.cropH, cropW: window.jwc.result.cropW, @@ -3919,9 +3910,6 @@ $('body').on('click','.crop-and-save-button',function(){ else if($('#edit-profile-popup .jwc_frame.background-to-crop').length>0) { $.ajax({ url: window.apiRoot + 'qvitter/update_background_image.json', type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { cropH: window.jwc.result.cropH, cropW: window.jwc.result.cropW, @@ -3961,9 +3949,6 @@ $('body').on('click','.save-profile-button',function(){ if(validateEditProfileForm($('#edit-profile-popup'))) { $.ajax({ url: window.apiRoot + 'account/update_profile.json', type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: { name: $('#edit-profile-popup input.fullname').val(), url: $('#edit-profile-popup input.url').val(), @@ -4157,9 +4142,6 @@ function uploadAttachment(e, thisUploadButton) { // upload $.ajax({ url: window.apiRoot + 'statusnet/media/upload', type: "POST", - beforeSend: function (xhr) { - xhr.setRequestHeader('X-Qvitter-CSRF', getCookieValue('Qvitter-CSRF')); - }, data: imgFormData, contentType: false, processData: false, From 41c1ad9ca4a99b962381bda94b9dbfd610dad736 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 17 Jan 2017 17:54:22 +0100 Subject: [PATCH 06/16] use english is browser language is not set --- js/qvitter.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/qvitter.js b/js/qvitter.js index 3db4271..fb0ccc0 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -750,6 +750,11 @@ $(window).load(function() { // set language, from local storage, else browser language var browserLang = navigator.language || navigator.userLanguage; + // use english if browser has no language set + if(typeof browserLang == 'undefined') { + var browserLang = 'en-GB'; + } + // browsers report e.g. sv-SE but we want it in the format "sv" or "sv_se" browserLang = browserLang.replace('-','_').toLowerCase(); From db5e7921d038d6e335186d77d66423521970979f Mon Sep 17 00:00:00 2001 From: Maliktunga Date: Wed, 18 Jan 2017 01:45:20 +0000 Subject: [PATCH 07/16] Update io.json: there was an error --- locale/io.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/io.json b/locale/io.json index d0c66b2..d7129b5 100644 --- a/locale/io.json +++ b/locale/io.json @@ -108,7 +108,7 @@ "otherServers": "Alternative, vu povas krear konto en altra servero di la reto GNU Social.", "editMyProfile": "Modifikar profilo", "notifications": "Notifiki", - "xFavedYourQueet": "vua pipio stelizesis", + "xFavedYourQueet": "stelizis vua pipio", "xRepeatedYourQueet": "ripipiis vu", "xStartedFollowingYou": "sequas vu", "followsYou": "sequas vu", From 184b574243f770713d36e90b3274bbd781f8b836 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 18 Jan 2017 21:54:46 +0100 Subject: [PATCH 08/16] some ido translation by muziko@quitter.se https://quitter.se/notice/9141756 --- doc/io/shortcuts.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/io/shortcuts.html b/doc/io/shortcuts.html index 9b8689e..0f45cd9 100644 --- a/doc/io/shortcuts.html +++ b/doc/io/shortcuts.html @@ -12,5 +12,5 @@

jSequanta mesajo

kPreiranta mesajo

-

Disable

-

Keyboard shortcuts can be turned off on the Qvitter settings page.

+

Neposibligar

+

Klavokombini povas supresesar en la ajustopagino di Qvitter.

From 69d359f7836c02a28f822727227fe9b1cd501441 Mon Sep 17 00:00:00 2001 From: Maliktunga Date: Fri, 20 Jan 2017 02:56:49 +0000 Subject: [PATCH 09/16] Update io.json: some tweaks, especially weird translations that I found while dogfeeding. --- locale/io.json | 112 ++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/locale/io.json b/locale/io.json index d7129b5..d40fe96 100644 --- a/locale/io.json +++ b/locale/io.json @@ -1,14 +1,14 @@ { "directionality":"ltr", "languageName": "Ido", - "loginUsername": "Uzeronomo o retpostadreso", - "loginPassword": "Pasovorto", + "loginUsername": "Uzeronomo o retadreso", + "loginPassword": "Pasvorto", "loginSignIn": "Enirar", "loginRememberMe": "Memorar me", - "loginForgotPassword": "Ka vu obliviis vua pasovorto?", + "loginForgotPassword": "Ka vu obliviis vua pasvorto?", "notices": "Pepii", "followers": "Sequanti", - "following": "Sequati", + "following": "Vu sequas", "groups": "Grupi", "compose": "Krear nova pipio…", "queetVerb": "Sendar", @@ -27,8 +27,8 @@ "favoritedVerb": "Stelizita", "replyTo": "Respondar ad", "requeetedBy": "Ripipiita da {requeeted-by}", - "favoriteNoun": "Stelizito", - "favoritesNoun": "Steliziti", + "favoriteNoun": "Stelo", + "favoritesNoun": "Steli", "requeetNoun": "Ripipio", "requeetsNoun": "Ripipii", "newQueet": "{new-notice-count} nova pipio", @@ -63,7 +63,7 @@ "shortDateFormatSeconds": "{seconds}s", "shortDateFormatMinutes": "{minutes}min", "shortDateFormatHours": "{hours}h", - "shortDateFormatDate": "{day}-ma di {month}", + "shortDateFormatDate": "{day}-ma {month}", "shortDateFormatDateAndY": "{day}-ma {month} {year}", "now": "nun", "posting": "sendo", @@ -75,37 +75,37 @@ "publicAndExtTimeline": "La tota konocata reto", "searchVerb": "Serchar…", "deleteVerb": "Efacar", - "cancelVerb": "Anular", + "cancelVerb": "Nihiligar", "deleteConfirmation": "Ka vu esas certa, ke vu volas efacar ca pipio?", "userExternalFollow": "Sequar", - "userExternalFollowHelp": "Identifikilo di vua konto (ex. uzero@quitter.no)", + "userExternalFollowHelp": "Rikonocilo di vua konto (ex. uzero@quitter.no)", "userFollow": "Sequar", - "userFollowing": "Sequato", + "userFollowing": "Vu sequas lu", "userUnfollow": "Cesar sequar", - "joinGroup": "Membreskar", - "joinExternalGroup": "Membreskar", + "joinGroup": "Divenar membro", + "joinExternalGroup": "Divenar membro", "isMemberOfGroup": "Membro", "leaveGroup": "Livar", "memberCount": "Membri", "adminCount": "Administranti", "settings": "Ajusti", - "saveChanges": "Konservar chanji", - "linkColor": "Koloro di la ligili", + "saveChanges": "Salvar chanji", + "linkColor": "Koloro di ligili", "backgroundColor": "Funda koloro", "newToQuitter": "Ka vu esas nova che {site-title}?", - "signUp": "Enrejistrar su", + "signUp": "Registragar su", "signUpFullName": "Kompleta nomo", - "signUpEmail": "Retpostadreso", - "signUpButtonText": "Enrejistrar su che {site-title}", + "signUpEmail": "Retadreso", + "signUpButtonText": "Registragar su che {site-title}", "welcomeHeading": "Bonvenez ad {site-title}.", - "welcomeText": "Ni esas
Notico por «federo»: «federo» signifikas, ke vu ne bezonas konto che {site-title} por povar sequar lia uzeri, o ke li povez sequar vu ed/od interagar kun la uzeri di {site-title}. Vu povas enrejistrar vu che irga servero di StatusNet o GNU social, o irga servero, qua fondesas sur la protokolo OStatus! Mem ne esas necesa enrejistrar su en una ek la existanta serveri – Vu ipsa povas instalar la bela programo GNU social en vua propra servero! :)
federo
de mikroblogeri, qui sucias etiko e solidareso, e qui deziras desertar la centraligita kapitalista servadi.", + "welcomeText": "Ni esas
Notico por «federo»: «federo» signifikas, ke vu ne bezonas konto che {site-title} por povar sequar lia uzeri, o ke li povez sequar vu ed/od interagar kun la uzeri di {site-title}. Vu povas registragar vu che irga servero di StatusNet o GNU social, od irga servero, qua fondesas sur la protokolo OStatus! Mem ne esas necesa registragar su en una ek la existanta serveri – Vu ipsa povas instalar la bela programo GNU social en vua propra servero! :)
federo
de mikroblogeri, qui sucias etiko e solidareso, e qui deziras desertar la servadi kapitalista centraligita.", "registerNickname": "Uzeronomo", "registerHomepage": "Retoloko", "registerBio": "Biografio", "registerLocation": "Loko", - "registerRepeatPassword": "Repetar pasovorto", + "registerRepeatPassword": "Repetar pasvorto", "moreSettings": "Plua ajusti", - "otherServers": "Alternative, vu povas krear konto en altra servero di la reto GNU Social.", + "otherServers": "Alternative, vu povas krear konto en altra servero di la reto GNU social.", "editMyProfile": "Modifikar profilo", "notifications": "Notifiki", "xFavedYourQueet": "stelizis vua pipio", @@ -118,11 +118,11 @@ "cropAndSave": "Rekortar e salvar", "showTerms": "Lektez la uzokondicioni", "ellipsisMore": "Plue", - "blockUser": "Impedar {username}", - "goToOriginalNotice": "Irar ad originala pipio", - "goToTheUsersRemoteProfile": "Irar a la uzerala fora profilo", + "blockUser": "Blokusar {username}", + "goToOriginalNotice": "Irar ad pipio originala", + "goToTheUsersRemoteProfile": "Irar a la fora profilo di uzero", "clickToDrag":"Kliktez por tranar", - "keyboardShortcuts":"Kurtavoyala menuo", + "keyboardShortcuts":"Menuo di klavokombini", "classicInterface":"Klasika {site-title}", "accessibilityToggleLink":"Por plu bona acesebleso, kliktez sur ca ligilo por chanjar a la klasika interfacio", "tooltipBookmarkStream":"Adjuntar ca fluo a vua markorubandi", @@ -131,71 +131,71 @@ "tooltipShortenUrls":"Kurtigar omna URL-i en la pipio", "tooltipReloadStream":"Aktualigar ca fluo", "tooltipRemoveBookmark":"Efacar ca markorubando", - "clearHistory":"Vakuigar navigala historio", + "clearHistory":"Vakuigar historio di navigo", "ERRORsomethingWentWrong":"Ulo miseventis.", - "ERRORmustBeLoggedIn":"Vu bezonas enirir por vidar ca fluo.", + "ERRORmustBeLoggedIn":"Vu mustas enirir por vidar ca fluo.", "ERRORcouldNotFindUserWithNickname":"Ne esis posibla trovar uzero kun la nomo \"{nickname}\" en ca servero.", "ERRORcouldNotFindGroupWithNickname":"Ne esis posibla trovar grupo kun la nomo \"{nickname}\" en ca servero.", "ERRORcouldNotFindPage":"Ne esis posibla trovar ca pagino.", - "ERRORnoticeRemoved": "Ca pipio efacesis.", - "ERRORnoContactWithServer": "Ne esis posibla konektar kun la servero. Forsan la servero esas supercharjita, od esas problemo kun vua Interretala konekto. Voluntez riprobar pose! ", + "ERRORnoticeRemoved": "Ca pipio forigesis.", + "ERRORnoContactWithServer": "Ne esis posibla konektar kun la servero. Forsan la servero esas supercharjita, od esas problemo kun vua konekto kun Interreto. Voluntez riprobar pose! ", "ERRORattachmentUploadFailed": "La kargo faliis. La dosierformo forsan ne suportesas o lu esas tro granda.", "hideRepliesToPeopleIDoNotFollow":"Celar respondi a homi quin me ne sequas", "markAllNotificationsAsSeen":"Markizar omna notifiki kom vidita", "notifyRepliesAndMentions":"Mencioni e respondi", - "notifyFavs":"Steliziti", + "notifyFavs":"Stelizi", "notifyRepeats":"Ripipii", "notifyFollows":"Nova sequanti", - "timelineOptions":"Tempolineala ajusti", + "timelineOptions":"Ajusti di tempolineo", "ERRORfailedSavingYourSetting":"Faliis salvar vua ajusti.", "ERRORfailedMarkingAllNotificationsAsRead":"Faliis markizar omna notifiki kom vidita.", "newNotification": "{new-notice-count} nova notifiko", "newNotifications": "{new-notice-count} nova notifiki", - "thisIsANoticeFromABlockedUser":"Averto: ca esas pipio da uzero, quan vu impedis. Kliktez por montrar olu.", + "thisIsANoticeFromABlockedUser":"Averto: ca esas pipio da uzero, quan vu blokusis. Kliktez por montrar olu.", "nicknamesListWithListName":"Listo di {nickname}: {list-name}", "myListWithListName":"Mea listo: {list-name}", "listMembers":"Membri", "listSubscribers":"Aboninti", "ERRORcouldNotFindList":"Ne esas tala listo.", "emailAlreadyInUse":"Ulu ja uzas lu", - "addEditLanguageLink":"Helpez tradukar {site-title} ad altra linguo", + "addEditLanguageLink":"Helpar tradukar {site-title} ad altra linguo", "onlyPartlyTranslated":"{site-title} esas nur partale tradukita ad {language-name} ({percent}%). Vu povas kompletigar la traduko che la depozeyo di Qvitter", - "startRant":"Plendeskar", - "continueRant":"Durigar la plendo", - "hideEmbeddedInTimeline":"Celar enkorpigita kontenaji en ca tempolineo", + "startRant":"Komencar plendo", + "continueRant":"Durar plendo", + "hideEmbeddedInTimeline":"Celar kontenaji enkorpigita en ca tempolineo", "hideQuotesInTimeline":"Celar citaji en ca tempolineo", - "userBlocks":"Impedata konti", - "buttonBlocked":"Impedata", - "buttonUnblock":"Cesar impedar", - "failedBlockingUser":"Faliis impedar la uzero.", - "failedUnblockingUser":"Faliis cesar impedar la uzero.", - "unblockUser": "Cesar impedar {username}", + "userBlocks":"Konti blokusita", + "buttonBlocked":"Blokusita", + "buttonUnblock":"Cesar blokusar", + "failedBlockingUser":"Faliis blokusar uzero.", + "failedUnblockingUser":"Faliis desblokusar uzero.", + "unblockUser": "Desblokusar {username}", "tooltipBlocksYou":"Vu impedesas sequar {username}.", "silenced":"Silencigita", - "silencedPlural":"Silencigita profili", - "silencedUsersOnThisInstance":"Silencigita profili sur {site-title}", - "sandboxed":"Ensabluya", - "sandboxedPlural":"Ensabluya profili", - "sandboxedUsersOnThisInstance":"Ensabluya profili sur {site-title}", - "silencedStreamDescription":"Silencigita uzeri ne povas enirar o sendar pipii, e la pipii quin li ja sendis celesas. A lokal uzeri, to esas simila ad efaco, qua povas anulesar, ma a fora uzeri esas simila a totaretoloka impedo.", - "sandboxedStreamDescription":"Pipii da ensabluya uzeri efacesas de la publika tempolineo e la tota konocata reto. Pipii sendita dum tempo en la sabluyo ne esos en la publika tempolinei se la uzero eksabluyeskas.", + "silencedPlural":"Profili silencigita", + "silencedUsersOnThisInstance":"Profili silencigita che {site-title}", + "sandboxed":"En sabluyo", + "sandboxedPlural":"Profili en sabluyo", + "sandboxedUsersOnThisInstance":"Profili en sabluyo che {site-title}", + "silencedStreamDescription":"Uzeri silencigita ne povas enirar nek sendar pipii, e la pipii quin li ja sendis celesas. Ad uzeri lokala, to esas simila ad efaco, qua povas esar nihiligata, ma a fora uzeri esas simila a blokuso totaretoloka.", + "sandboxedStreamDescription":"Pipii da uzeri en sabluyo efacesas de la publika tempolineo e de la tota konocata reto. Ecepte to, li povas uzar la retoloko tale, quale irga altra uzero.", "onlyShowNotificationsFromUsersIFollow":"Nur montrar notifiki de uzeri, quin me sequas", - "userOptions":"Plua uzerala agi", + "userOptions":"Plua agi di uzero", "silenceThisUser":"Silencigar {nickname}", - "sandboxThisUser":"Ensabluyigar {nickname}", + "sandboxThisUser":"Igar {nickname} en sabluyo", "unSilenceThisUser":"Dessilencigar {nickname}", - "unSandboxThisUser":"Eksabluyigar {nickname}", - "ERRORfailedSandboxingUser":"Faliis ensabluyigar/eksabluyigar la uzero", + "unSandboxThisUser":"Igar {nickname} ek sabluyo", + "ERRORfailedSandboxingUser":"Faliis igar la uzero en/ek sabluyo", "ERRORfailedSilencingUser":"Faliis silencigar/dessilencigar la uzero", "muteUser":"Mutigar", "unmuteUser":"Desmutigar", "hideNotificationsFromMutedUsers":"Celar notifiki de muta uzeri", "thisIsANoticeFromAMutedUser":"Vu mutigis la autoro di ca pipio. Kliktez hike por montrar olu.", "userMutes":"Konti quin vu mutigas", - "userBlocked":"Impedata konti", + "userBlocked":"Konti blokusita", "userMuted":"Muta konti", - "mutedStreamDescription":"Vu celis ca konti de vua tempolineo. Vu ankore recevos notifiki de ca konti, ecepte se vu selektus "Celar notifiki de muta uzeri" per la dentorota menuo en la notifikala pagino.", + "mutedStreamDescription":"Vu celis ca konti de vua tempolineo. Vu recevos ankore notifiki de ca konti, ecepte se vu selektus "Celar notifiki de muta uzeri" per la menuo dentorota en la pagino di notifiki.", "profileAndSettings":"Profilo ed ajusti", - "profileSettings":"Profilala ajusti", - "thisIsABookmark":"Ca esas markorubando kreita en la klasika interfacio" + "profileSettings":"Ajusti di profilo", + "thisIsABookmark":"Ca esas markorubando kreita en la interfacio klasika" } From 29fe49dba2bb30112909c9cf44003395aaefd761 Mon Sep 17 00:00:00 2001 From: Maliktunga Date: Fri, 20 Jan 2017 05:32:15 +0000 Subject: [PATCH 10/16] Update terms.html: Updated, and now completely translated. --- doc/io/terms.html | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/doc/io/terms.html b/doc/io/terms.html index 42ac1a7..68f1839 100644 --- a/doc/io/terms.html +++ b/doc/io/terms.html @@ -1,15 +1,13 @@ -

{instance-name} ne esas servado e vu ne esas kliento hike. Ni esas mikra parto di plu granda chanjo, kreanta granda descentraligita komunitato. Ico signifikas ke ni ne devas esar neutra pri la kontenajo ye nia exemplero di GNU Social. Se vu ne prizas la direciono segun quan ica exemplero esas iranta, vu povas libere livar vers altra exemplero od iniciar la vua. Vu povos ankore sequar ed esar sequata (e blokusata) da uzeri ye ca exemplero.

+

{instance-name} ne esas servado e vu ne esas kliento hike. Ni esas mikra parto di plu granda chanjo, qua kreas granda socio descentraligita. To signifikas, ke ni ne devas esar neutra a la kontenajo di nia exemplero di GNU social. Se vu ne prizas la direciono, vers qua ca exemplero iras, vu povas libere livar ad altra exemplero od iniciar la vua. Vu povos ankore sequar ed esar sequata (e blokusata) da uzeri en ca exemplero.

-

Kontree a la dominaco administrala di la komercala sociala moyeni, ico kreas ulaspeca egala povo-strukturo. Ni esas kapabligita pri protektar l'una e l'altra ek persekuto ed opreso, ma sen censuro.

+

Kontraste kun la dominaco administrala di la moyeni sociala komercala, to kreas ulsorta strukturo egala di povo. Ni esas kapabligita protektar l'una l'altra kontre persekuto ed opreso, ma sen censuro centraligita.

-

Ye ca exemplero, uzeri qui persekutas altri esos ekpulsita. Ni anke forte opozas rasismo, sexuismo, kapablismo, homeosexual-fobio e transsexual-fobio. Tala expresi nesekurigas la ret-situo por altra uzeri, e praktikale restriktas lia libereso di expreso.

+

En ca exemplero, uzeri qui persekutas altri forigesos. Ni anke havas forta opiniono kontre ex. rasismo, sexuismo, kapablismo, anti-Semidismo, homeosexualodio e transsexualodio. Tala expresi igas la retoloko nesekura ad altra uzeri, e praktike restriktas lia libereso di expreso.

-

La publika tempolineo esas konsiderita specale sentema loko. Olu esas quon nova uzeri unesme vidas, ed omna registragita uzeri vidos la mesaji publikigita ibe. Moderanti darfas exkluzar uzeri ek aparar en la publika tempolineo irgatempe, sen avizo, permanante o provizore. Konsiderez kom privilejo esar publikigita en la publika tempolineo, ne yuro. Se vu esas exkluzita ek publika tempolineo, vu povas durar omna altra praktiko ye la ret-situo tote quale irga altra uzero.

+

La publika tempolineo konsideresas kom loko specale sentiva. Lu esas quon nova uzeri vidas, ed omna registragita uzeri vidos la mesaji publikigita ibe. Moderanti darfas exkluzar uzeri de aparo en la publika tempolineo irgainstante, sen averto, permanante o provizore. Konsiderez kom privilejo publikigesar en la publika tempolineo, ne kom yuro. Se vu exkluzesus de publika tempolineo, vu povus ankore uzar omna altra funcioni, tote quale irga altra uzero.

-

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

+

Anunci ed enti komercala ne permisesas en ca exemplero. Ni esas komplete senprofita ed omna nia spensi pagesas per donaci da individui. Ni povas helpar vu iniciar vua propra exemplero di GNU social se vua intenco esas komercala.

-

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

+

Omna kontenajo en ca retoloko esas disponebla sub la licenco {instance-license-title}.

-

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

+

Omna uzero responsas pri la kontenajo quan lu sendas. Se vu havas irga questiono pri ulo enduktita en ca exemplero, kontaktez unesme la uzero aludita. Kom lasta rekurso, vu povas sendar mesajo al administranti.

From 087c35c52c2c9a020c2867c4cf13f97e839da943 Mon Sep 17 00:00:00 2001 From: Maliktunga Date: Fri, 20 Jan 2017 22:42:00 +0000 Subject: [PATCH 11/16] Update shortcuts.html: now completely updated. --- doc/io/shortcuts.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/io/shortcuts.html b/doc/io/shortcuts.html index 0f45cd9..330097e 100644 --- a/doc/io/shortcuts.html +++ b/doc/io/shortcuts.html @@ -1,16 +1,16 @@

Agi

-

nNova mesajo

-

fMarkizar kom favorato

+

nNova pipio

+

fStelizar

rRespondar

-

tRepetar

-

EnterEstalar la mesajo

-

CtrlEntero Cmd ⌘EnterSendar la mesajo

-

EscFoldar omna estalita mesaji

+

tRipipiar

+

EnterRevelar la tota konverso

+

CtrlEntero Cmd ⌘EnterSendar pipio

+

EscCelar omna konversi revelita

-

Navigo

-

?Ica menuo

-

jSequanta mesajo

-

kPreiranta mesajo

+

Navigado

+

?Ca menuo

+

jPipio sequanta

+

kPipio preiranta

-

Neposibligar

-

Klavokombini povas supresesar en la ajustopagino di Qvitter.

+

Desaktivigar

+

Klavokombini povas supresesar en la pagino di ajusti di Qvitter.

\ No newline at end of file From 2effa61a06dd26b1e81da8bd7ba6583e1906f0e1 Mon Sep 17 00:00:00 2001 From: duoduoeeee Date: Wed, 25 Jan 2017 15:50:11 +0800 Subject: [PATCH 12/16] update zh-cn translations updated some untranslated strings and corrected some old ones --- locale/zh_cn.json | 136 +++++++++++++++++++++++----------------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/locale/zh_cn.json b/locale/zh_cn.json index 133172c..96bae48 100644 --- a/locale/zh_cn.json +++ b/locale/zh_cn.json @@ -26,7 +26,7 @@ "requeetedVerb": "已转推", "favoritedVerb": "已收藏", "replyTo": "回复", - "requeetedBy": "转推由 {requeeted-by}", + "requeetedBy": "由 {requeeted-by} 转推", "favoriteNoun": "收藏", "favoritesNoun": "收藏", "requeetNoun": "转推", @@ -112,44 +112,44 @@ "xRepeatedYourQueet": "转推了你的推文", "xStartedFollowingYou": "关注了你", "followsYou": "关注了你", - "FAQ": "FAQ", + "FAQ": "常见问题", "inviteAFriend": "邀请好友", "goToExternalProfile": "前往完整的个人档案", "cropAndSave": "裁剪并保存", "showTerms": "查看我们的使用条例", "ellipsisMore": "更多", "blockUser": "屏蔽 {username}", - "goToOriginalNotice": "Go to original notice", - "goToTheUsersRemoteProfile": "Go to the user's remote profile", - "clickToDrag":"Click to drag", + "goToOriginalNotice": "查看原推文", + "goToTheUsersRemoteProfile": "查看用户的外部档案", + "clickToDrag":"点击拖拽", "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":"附加一张图片", - "tooltipShortenUrls":"Shorten all URLs in the Queet", - "tooltipReloadStream":"Refresh this stream", - "tooltipRemoveBookmark":"Remove this bookmark", - "clearHistory":"Clear browsing history", - "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", + "classicInterface":"旧版 {site-title}", + "accessibilityToggleLink":"点击此链接可切换为旧版,提升兼容性。", + "tooltipBookmarkStream":"将此时间线加入书签", + "tooltipTopMenu":"菜单与设置", + "tooltipAttachImage":"上传图片", + "tooltipShortenUrls":"缩短推文中的全部链接", + "tooltipReloadStream":"刷新时间线", + "tooltipRemoveBookmark":"删除此书签", + "clearHistory":"清除浏览记录", + "ERRORmustBeLoggedIn":"要查看该时间线,请先登录。", + "ERRORcouldNotFindUserWithNickname":"无法找到昵称为 \"{nickname}\" 的用户", + "ERRORcouldNotFindGroupWithNickname":"无法找到名为 \"{nickname}\" 的小组", + "ERRORcouldNotFindPage":"页面不存在。", + "ERRORnoticeRemoved": "该推文已被删除。", + "ERRORnoContactWithServer": "无法建立与服务器的连接。这可能是由于服务器过载,或你的网络连接出现了问题,请稍后重试。", + "ERRORattachmentUploadFailed": "上传失败。这可能是由于格式不支持,或者文件过大。", + "hideRepliesToPeopleIDoNotFollow":"隐藏发往我不关注的用户的回复", + "markAllNotificationsAsSeen":"所有通知标为已读", + "notifyRepliesAndMentions":"提及与回复", "notifyFavs":"收藏", "notifyRepeats":"转推", "notifyFollows":"新的关注者", "timelineOptions":"时间轴选项", - "ERRORfailedSavingYourSetting":"Failed saving your setting", - "ERRORfailedMarkingAllNotificationsAsRead":"Failed marking all notifications as seen.", - "newNotification": "{new-notice-count} 新通知", - "newNotifications": "{new-notice-count} 新通知", + "ERRORfailedSavingYourSetting":"无法保存个人设置", + "ERRORfailedMarkingAllNotificationsAsRead":"无法将所有通知标为已读。", + "newNotification": "{new-notice-count} 条新通知", + "newNotifications": "{new-notice-count} 条新通知", "thisIsANoticeFromABlockedUser":"注意:这是一条来自你屏蔽的用户的推文。点击以查看。", "nicknamesListWithListName":"{nickname}的列表: {list-name}", "myListWithListName":"我的列表: {list-name}", @@ -157,44 +157,44 @@ "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", - "userBlocks":"Accounts you're blocking", - "buttonBlocked":"Blocked", - "buttonUnblock":"Unblock", - "failedBlockingUser":"Failed to block the user.", - "failedUnblockingUser":"Failed to unblock the user.", - "unblockUser": "Unblock {username}", - "tooltipBlocksYou":"You are blocked from following {username}.", - "silenced":"Silenced", - "silencedPlural":"Silenced profiles", - "silencedUsersOnThisInstance":"Silenced profiles on {site-title}", - "sandboxed":"Sandboxed", - "sandboxedPlural":"Sandboxed profiles", - "sandboxedUsersOnThisInstance":"Sandboxed profiles on {site-title}", - "silencedStreamDescription":"Silenced users can't login or post quips and the quips they've already posted are hidden. For local users it's like a delete that can be reversed, for remote users it's like a site wide block.", - "sandboxedStreamDescription":"Quips from sandboxed users are excluded from the Public Timeline and The Whole Known Network. Apart from that, they can use the site like any other user.", - "onlyShowNotificationsFromUsersIFollow":"Only show notifications from users I follow", - "userOptions":"More user actions", - "silenceThisUser":"Silence {nickname}", - "sandboxThisUser":"Sandbox {nickname}", - "unSilenceThisUser":"Unsilence {nickname}", - "unSandboxThisUser":"Unsandbox {nickname}", - "ERRORfailedSandboxingUser":"Failed sandboxing/unsandboxing the user", - "ERRORfailedSilencingUser":"Failed silencing/unsilencing the user", - "muteUser":"Mute", - "unmuteUser":"Unmute", - "hideNotificationsFromMutedUsers":"Hide notifications from muted users", - "thisIsANoticeFromAMutedUser":"You have muted the author of this quip. Click here to show it anyway.", - "userMutes":"Accounts you're muting", - "userBlocked":"Blocked accounts", - "userMuted":"Muted accounts", - "mutedStreamDescription":"You've hidden these accounts from your timeline. You will still recieve notifications from these accounts, unless you select "Hide notifications from muted users" from the cog wheel menu on the notifications page.", - "profileAndSettings":"Profile and settings", - "profileSettings":"Profile settings", - "thisIsABookmark":"This is a bookmark created in the Classic interface" + "addEditLanguageLink":"帮助将 {site-title} 翻译为其他语言", + "onlyPartlyTranslated":"{site-title} 的 {language-name} 翻译并不完整({percent}%)。 你可以前往 Qvitter 的 repository 主页" 帮助翻译。", + "startRant":"开始聊天", + "continueRant":"继续聊天", + "hideEmbeddedInTimeline":"隐藏该时间线中嵌入的内容", + "hideQuotesInTimeline":"隐藏该时间线中引用的内容", + "userBlocks":"被你屏蔽的用户", + "buttonBlocked":"已屏蔽", + "buttonUnblock":"取消屏蔽", + "failedBlockingUser":"无法屏蔽该用户。", + "failedUnblockingUser":"无法将该用户取消屏蔽。", + "unblockUser": "停止屏蔽 {username}", + "tooltipBlocksYou":"你不被允许关注 {username}。", + "silenced":"已禁言", + "silencedPlural":"被禁言的账户", + "silencedUsersOnThisInstance":"{site-title} 上被禁言的用户", + "sandboxed":"已隔离", + "sandboxedPlural":"被隔离的账户", + "sandboxedUsersOnThisInstance":"{site-title} 中被隔离的账户", + "silencedStreamDescription":"被禁言的用户无法登录,也无法发新推文;他们已发送的推文将被隐藏。对本站用户而言,这像是可撤回的删除账户;对外部用户而言,这更像是全站屏蔽。", + "sandboxedStreamDescription":"被隔离的用户会被从公共时间线和整个已知网络中排除。 除此之外,他们与其他用户并无不同。", + "onlyShowNotificationsFromUsersIFollow":"只显示我关注用户的通知", + "userOptions":"更多用户操作", + "silenceThisUser":"将 {nickname} 禁言", + "sandboxThisUser":"将 {nickname} 隔离", + "unSilenceThisUser":"取消对 {nickname} 的禁言", + "unSandboxThisUser":"取消对 {nickname} 的隔离", + "ERRORfailedSandboxingUser":"隔离操作失败。", + "ERRORfailedSilencingUser":"禁言操作失败。", + "muteUser":"忽略用户", + "unmuteUser":"取消忽略", + "hideNotificationsFromMutedUsers":"隐藏被忽略用户的通知", + "thisIsANoticeFromAMutedUser":"你已忽略了这条推文的作者。要查看该推文,请点击此处。", + "userMutes":"被忽略的用户", + "userBlocked":"被屏蔽的用户", + "userMuted":"被忽略的账户", + "mutedStreamDescription":"你已从你的时间线中隐藏了这些用户。但你仍将收到这些用户的通知,除非你在设置页的齿轮菜单中选择“隐藏被忽略用户的通知”。", + "profileAndSettings":"个人档案及设置", + "profileSettings":"个人设置", + "thisIsABookmark":"该书签系在旧版视图下创建。" } From ba8b242f46c5d6658dc026a318c5b74a06095375 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 25 Jan 2017 09:53:56 +0100 Subject: [PATCH 13/16] fix for new chinese translation --- locale/zh_cn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/zh_cn.json b/locale/zh_cn.json index 96bae48..754d6a6 100644 --- a/locale/zh_cn.json +++ b/locale/zh_cn.json @@ -158,7 +158,7 @@ "ERRORcouldNotFindList":"找不到这个列表", "emailAlreadyInUse":"已经被使用了", "addEditLanguageLink":"帮助将 {site-title} 翻译为其他语言", - "onlyPartlyTranslated":"{site-title} 的 {language-name} 翻译并不完整({percent}%)。 你可以前往 Qvitter 的 repository 主页" 帮助翻译。", + "onlyPartlyTranslated":"{site-title} 的 {language-name} 翻译并不完整({percent}%)。 你可以前往 Qvitter 的 repository 主页 帮助翻译。", "startRant":"开始聊天", "continueRant":"继续聊天", "hideEmbeddedInTimeline":"隐藏该时间线中嵌入的内容", From 174d76b89de9ee9c017cf9af3c6afecd3b11e838 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 30 Jan 2017 23:50:42 +0100 Subject: [PATCH 14/16] make possible using older versions of YOURLS when using the shortener.php proxy --- QvitterPlugin.php | 1 + actions/qvitter.php | 1 + js/misc-functions.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index e1540da..9190469 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -87,6 +87,7 @@ class QvitterPlugin extends Plugin { // URL SHORTENER $settings['urlshortenerapiurl'] = 'http://qttr.at/yourls-api.php'; $settings['urlshortenersignature'] = 'b6afeec983'; + $settings['urlshortenerformat'] = 'jsonp'; // if you're using shortener.php you can set this to 'json', which enables you to use YOURLS versions below 1.5.1 // CUSTOM TERMS OF USE $settings['customtermsofuse'] = false; diff --git a/actions/qvitter.php b/actions/qvitter.php index 5b8e790..49930d4 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -354,6 +354,7 @@ class QvitterAction extends ApiAction window.customWelcomeText = ; window.urlShortenerAPIURL = ''; window.urlShortenerSignature = ''; + window.urlshortenerFormat = ''; window.commonSessionToken = ''; window.siteMaxThumbnailSize = ; window.siteAttachmentURLBase = ''; diff --git a/js/misc-functions.js b/js/misc-functions.js index 50bbe6b..06f9663 100644 --- a/js/misc-functions.js +++ b/js/misc-functions.js @@ -2651,7 +2651,7 @@ function shortenUrlsInBox(shortenButton) { display_spinner(); - $.ajax({ url: window.urlShortenerAPIURL + '?format=jsonp&action=shorturl&signature=' + window.urlShortenerSignature + '&url=' + encodeURIComponent(url), type: "GET", dataType: "jsonp", + $.ajax({ url: window.urlShortenerAPIURL + '?format=' + window.urlshortenerFormat + '&action=shorturl&signature=' + window.urlShortenerSignature + '&url=' + encodeURIComponent(url), type: "GET", dataType: window.urlshortenerFormat, success: function(data) { if(typeof data.shorturl != 'undefined') { From 5b868f8dff097cc8a12b4782152eea8a83468032 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 31 Jan 2017 19:30:13 +0100 Subject: [PATCH 15/16] fixes issue #74 --- actions/qvitter.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/actions/qvitter.php b/actions/qvitter.php index 49930d4..0cc23e4 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -159,15 +159,19 @@ class QvitterAction extends ApiAction print ' '."\n"; // rel="me" for the IndieWeb audience - $relMes = array( - ['href' => $user->getProfile()->getHomepage(), - 'text' => _('Homepage'), - 'image' => null], - ); - Event::handle('OtherAccountProfiles', array($user->getProfile(), &$relMes)); - foreach ($relMes as $relMe) { - print ' '."\n"; - } + // (no indieweb for users of older gnu social versions) + if(method_exists('Profile','getHomepage')) { + $user_homepage = $user->getProfile()->getHomepage(); + $relMes = array( + ['href' => $user->getProfile()->getHomepage(), + 'text' => _('Homepage'), + 'image' => null], + ); + Event::handle('OtherAccountProfiles', array($user->getProfile(), &$relMes)); + foreach ($relMes as $relMe) { + print ' '."\n"; + } + } // maybe openid if (array_key_exists('OpenID', StatusNet::getActivePlugins())) { From c09da94edaa1f011f33fac502cb8e5065d76df48 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sun, 5 Feb 2017 13:17:36 +0100 Subject: [PATCH 16/16] api error reporting for attachment errors --- QvitterPlugin.php | 1 + 1 file changed, 1 insertion(+) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 9190469..7887994 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -619,6 +619,7 @@ class QvitterPlugin extends Plugin { // this applies to older versions of gnu social, i think } catch (Exception $e) { + $twitter_status['attachment_error'] = array('code'=>$e->getCode(),'message'=>$e->getMessage(),'file'=>$e->getFile(),'line'=>$e->getLine(),'trace'=>$e->getTraceAsString()); $thumb = File_thumbnail::getKV('file_id', $attachment->id); if ($thumb instanceof File_thumbnail) { $thumb_url = $thumb->getUrl();