From fae7a40aebc4266260c8cb0dcac929ac03500590 Mon Sep 17 00:00:00 2001 From: aka Date: Sun, 13 May 2018 20:47:08 -0300 Subject: Adds an option to export follows --- src/components/user_settings/user_settings.js | 29 ++++++++++++++++++++++++++ src/components/user_settings/user_settings.vue | 7 +++++++ src/i18n/messages.js | 5 ++++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 25ee1f35..602052ca 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -8,6 +8,7 @@ const UserSettings = { followList: null, followImportError: false, followsImported: false, + enableFollowsExport: true, uploading: [ false, false, false, false ], previews: [ null, null, null ] } @@ -137,6 +138,34 @@ const UserSettings = { this.uploading[3] = false }) }, + /* This function takes an Array of Users + * and outputs a file with all the addresses for the user to download + */ + exportPeople(Users) { + // Get all the friends addresses + var UserAddresses = Users.map(function(user) { + // check is it's a local user + if(user && user.is_local) { + // append the instance address + user.screen_name += '@' + location.hostname; + } + return user.screen_name; + }).join('\n'); + // Make the user download the file + var fileToDownload = document.createElement('a'); + fileToDownload.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(UserAddresses)); + fileToDownload.setAttribute('download', 'friends.csv'); + fileToDownload.style.display = 'none'; + document.body.appendChild(fileToDownload); + fileToDownload.click(); + document.body.removeChild(fileToDownload); + }, + exportFollows() { + this.enableFollowsExport = false; + this.$store.state.api.backendInteractor + .fetchFriends({id: this.$store.state.users.currentUser.id}) + .then(this.exportPeople); + }, followListChange () { // eslint-disable-next-line no-undef let formData = new FormData() diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index ed1864cc..184d158d 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -66,6 +66,13 @@

{{$t('settings.follow_import_error')}}

+
+

{{$t('settings.follow_export')}}

+ +
+
+

{{$t('settings.follow_export_processing')}}

+
diff --git a/src/i18n/messages.js b/src/i18n/messages.js index 168548cf..473fd9b1 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -288,7 +288,10 @@ const en = { follow_import: 'Follow import', import_followers_from_a_csv_file: 'Import follows from a csv file', follows_imported: 'Follows imported! Processing them will take a while.', - follow_import_error: 'Error importing followers' + follow_import_error: 'Error importing followers', + follow_export: 'Follow export', + follow_export_processing: 'Processing, you\'ll soon be aked to download your file', + follow_export_button: 'Export your follows to a csv file' }, notifications: { notifications: 'Notifications', -- cgit v1.2.3-70-g09d2 From 1ff089a175eb5c77f86896b89728aa9066a4699f Mon Sep 17 00:00:00 2001 From: Exilat Date: Tue, 15 May 2018 05:14:59 +0000 Subject: Update messages.js --- src/i18n/messages.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/i18n/messages.js b/src/i18n/messages.js index a13d7f58..46da4404 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -1018,7 +1018,7 @@ const oc = { timeline: { show_new: 'Ne veire mai', error_fetching: 'Error en cercant de mesas a jorn', - up_to_date: 'Actualizat', + up_to_date: 'A jorn', load_older: 'Ne veire mai', conversation: 'Conversacion', collapse: 'Tampar', @@ -1050,6 +1050,7 @@ const oc = { cRed: 'Roge (Anullar)', cOrange: 'Irange (Metre en favorit)', cGreen: 'Verd (Repartajar)', + inputRadius: 'Camps tèxte', btnRadius: 'Botons', panelRadius: 'Panèls', avatarRadius: 'Avatars', @@ -1074,7 +1075,7 @@ const oc = { notifications: { notifications: 'Notficacions', read: 'Legit !', - followed_you: 'vos a seguit', + followed_you: 'vos sèc', favorited_you: 'a aimat vòstre estatut', repeated_you: 'a repetit your vòstre estatut' }, @@ -1105,7 +1106,7 @@ const oc = { apply: 'Aplicar' }, user_profile: { - timeline_title: 'Flux a l’utilizaire' + timeline_title: 'Flux utilizaire' } } -- cgit v1.2.3-70-g09d2 From 1487474c187cac17233f7e7942ddec2a5b8b700a Mon Sep 17 00:00:00 2001 From: Azurolu Date: Tue, 15 May 2018 11:17:32 +0000 Subject: Added inputRadius french translation and improved french translation as discussed with Chip. --- src/i18n/messages.js | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/i18n/messages.js b/src/i18n/messages.js index a13d7f58..4ddf3309 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -851,32 +851,32 @@ const fr = { user_settings: 'Paramètres utilisateur', name_bio: 'Nom & Bio', name: 'Nom', - bio: 'Bioraphie', + bio: 'Biographie', avatar: 'Avatar', - current_avatar: 'Votre avatar', + current_avatar: 'Avatar actuel', set_new_avatar: 'Changer d\'avatar', - profile_banner: 'Bannière du profil', - current_profile_banner: 'Bannière du profil', + profile_banner: 'Bannière de profil', + current_profile_banner: 'Bannière de profil actuelle', set_new_profile_banner: 'Changer de bannière', profile_background: 'Image de fond', set_new_profile_background: 'Changer d\'image de fond', settings: 'Paramètres', theme: 'Thème', filtering: 'Filtre', - filtering_explanation: 'Tout les statuts contenant ces mots vont être cachés, un mot par ligne.', + filtering_explanation: 'Tout les statuts contenant ces mots seront masqués. Un mot par ligne.', attachments: 'Pièces jointes', - hide_attachments_in_tl: 'Cacher les pièces jointes dans le journal', - hide_attachments_in_convo: 'Cacher les pièces jointes dans les conversations', - nsfw_clickthrough: 'Activer le clic pour afficher les images marquées comme contenu adulte ou sensible', - autoload: 'Activer le chargement automatique une fois le bas de la page atteint', + hide_attachments_in_tl: 'Masquer les pièces jointes dans le journal', + hide_attachments_in_convo: 'Masquer les pièces jointes dans les conversations', + nsfw_clickthrough: 'Masquer les images marquées comme contenu adulte ou sensible', + autoload: 'Charger la suite automatiquement une fois le bas de la page atteint', reply_link_preview: 'Activer un aperçu d\'une réponse sur passage de la souris', presets: 'Thèmes prédéfinis', - theme_help: 'Utilisez les codes de couleur hexadécimaux (#aabbcc) pour customiser les couleurs de votre thème.', + theme_help: 'Spécifiez des codes couleur hexadécimaux (#aabbcc) pour personnaliser les couleurs du thème', background: 'Arrière plan', foreground: 'Premier plan', text: 'Texte', links: 'Liens', - streaming: 'Active le défilement automatique de nouveaux statuts lorsqu\'on est au haut de la page', + streaming: 'Charger automatiquement les nouveaux statuts lorsque vous êtes au haut de la page', follow_import: 'Importer ses abonnements', import_followers_from_a_csv_file: 'Importer ses abonnements depuis un fichier csv', follows_imported: 'Abonnements importés ! Le traitement peut prendre un moment.', @@ -887,12 +887,13 @@ const fr = { cGreen: 'Vert (Partager)', btnRadius: 'Boutons', panelRadius: 'Fenêtres', + inputRadius: 'Champs de texte', avatarRadius: 'Avatars', avatarAltRadius: 'Avatars (Notifications)', tooltipRadius: 'Info-bulles/alertes ', attachmentRadius: 'Pièces jointes', radii_help: 'Mettre en place l\'arondissement des coins de l\'interface (en pixels)', - stop_gifs: 'Passer la souris sur un GIF pour l\'animer' + stop_gifs: 'N\'animer les GIFS que lors du survol du curseur de la souris' }, notifications: { notifications: 'Notifications', @@ -910,10 +911,10 @@ const fr = { }, registration: { registration: 'Inscription', - fullname: 'Nom affiché', + fullname: 'Pseudonyme', email: 'Adresse email', bio: 'Biographie', - password_confirm: 'Confirmez le mot de passe' + password_confirm: 'Confirmation le mot de passe' }, post_status: { posting: 'Envoi en cours', @@ -921,7 +922,7 @@ const fr = { }, finder: { find_user: 'Chercher un utilisateur', - error_fetching_user: 'Une erreur est survenue lors de la recherche de l\'utilisateur' + error_fetching_user: 'Erreur lors de la recherche de l\'utilisateur' }, general: { submit: 'Envoyer', -- cgit v1.2.3-70-g09d2 From fc2bb104442f8e3bbbe661abdee670ebb2776199 Mon Sep 17 00:00:00 2001 From: Azurolu Date: Wed, 16 May 2018 01:42:54 +0000 Subject: Improved french translation thanks to Chip's suggestions, added inputRadius' french translation. --- src/i18n/messages.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/i18n/messages.js b/src/i18n/messages.js index 4ddf3309..846d123f 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -831,8 +831,8 @@ const fr = { blocked: 'Bloqué', block: 'Bloquer', statuses: 'Statuts', - mute: 'Mettre en muet', - muted: 'Mis en muet', + mute: 'Masquer', + muted: 'Masqué', followers: 'Vous suivent', followees: 'Suivis', per_day: 'par jour', @@ -840,7 +840,7 @@ const fr = { }, timeline: { show_new: 'Afficher plus', - error_fetching: 'Erreur en cherchant des mises à jours', + error_fetching: 'Erreur en cherchant les mises à jour', up_to_date: 'À jour', load_older: 'Afficher plus', conversation: 'Conversation', @@ -869,7 +869,7 @@ const fr = { hide_attachments_in_convo: 'Masquer les pièces jointes dans les conversations', nsfw_clickthrough: 'Masquer les images marquées comme contenu adulte ou sensible', autoload: 'Charger la suite automatiquement une fois le bas de la page atteint', - reply_link_preview: 'Activer un aperçu d\'une réponse sur passage de la souris', + reply_link_preview: 'Afficher un aperçu lors du survol de liens vers une réponse', presets: 'Thèmes prédéfinis', theme_help: 'Spécifiez des codes couleur hexadécimaux (#aabbcc) pour personnaliser les couleurs du thème', background: 'Arrière plan', @@ -887,24 +887,24 @@ const fr = { cGreen: 'Vert (Partager)', btnRadius: 'Boutons', panelRadius: 'Fenêtres', - inputRadius: 'Champs de texte', + inputRadius: 'Champs de texte', avatarRadius: 'Avatars', avatarAltRadius: 'Avatars (Notifications)', tooltipRadius: 'Info-bulles/alertes ', attachmentRadius: 'Pièces jointes', - radii_help: 'Mettre en place l\'arondissement des coins de l\'interface (en pixels)', + radii_help: 'Vous pouvez ici choisir le niveau d\'arrondi des angles de l\'interface (en pixels)', stop_gifs: 'N\'animer les GIFS que lors du survol du curseur de la souris' }, notifications: { notifications: 'Notifications', read: 'Lu !', - followed_you: 'vous a suivi', + followed_you: 'a commencé à vous suivre', favorited_you: 'a aimé votre statut', repeated_you: 'a partagé votre statut' }, login: { login: 'Connexion', - username: 'Nom d\'utilisateur', + username: 'Identifiant', password: 'Mot de passe', register: 'S\'inscrire', logout: 'Déconnexion' -- cgit v1.2.3-70-g09d2 From 954e6e076333e622134ad05cc51e07dcd1c940a7 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Wed, 16 May 2018 13:01:17 +0200 Subject: Make nsfw image easier to understand. --- src/assets/nsfw.png | Bin 18166 -> 17071 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/assets/nsfw.png b/src/assets/nsfw.png index bb6556b4..42749033 100644 Binary files a/src/assets/nsfw.png and b/src/assets/nsfw.png differ -- cgit v1.2.3-70-g09d2 From fed87815833bfb847be192b79782f3edca99cf5f Mon Sep 17 00:00:00 2001 From: aka Date: Wed, 16 May 2018 19:51:52 -0300 Subject: fix linting --- src/components/user_settings/user_settings.js | 43 ++++++++++++++------------- src/i18n/messages.js | 2 +- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 602052ca..2c08b2f8 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -141,30 +141,33 @@ const UserSettings = { /* This function takes an Array of Users * and outputs a file with all the addresses for the user to download */ - exportPeople(Users) { + exportPeople (users, filename) { // Get all the friends addresses - var UserAddresses = Users.map(function(user) { - // check is it's a local user - if(user && user.is_local) { - // append the instance address - user.screen_name += '@' + location.hostname; - } - return user.screen_name; - }).join('\n'); + var UserAddresses = users.map(function (user) { + // check is it's a local user + if (user && user.is_local) { + // append the instance address + // eslint-disable-next-line no-undef + user.screen_name += '@' + location.hostname + } + return user.screen_name + }).join('\n') // Make the user download the file - var fileToDownload = document.createElement('a'); - fileToDownload.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(UserAddresses)); - fileToDownload.setAttribute('download', 'friends.csv'); - fileToDownload.style.display = 'none'; - document.body.appendChild(fileToDownload); - fileToDownload.click(); - document.body.removeChild(fileToDownload); + var fileToDownload = document.createElement('a') + fileToDownload.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(UserAddresses)) + fileToDownload.setAttribute('download', filename) + fileToDownload.style.display = 'none' + document.body.appendChild(fileToDownload) + fileToDownload.click() + document.body.removeChild(fileToDownload) }, - exportFollows() { - this.enableFollowsExport = false; + exportFollows () { + this.enableFollowsExport = false this.$store.state.api.backendInteractor - .fetchFriends({id: this.$store.state.users.currentUser.id}) - .then(this.exportPeople); + .fetchFriends({id: this.$store.state.users.currentUser.id}) + .then(function (friendList) { + this.exportPeople(friendList, 'friends.csv') + }.bind(this)) }, followListChange () { // eslint-disable-next-line no-undef diff --git a/src/i18n/messages.js b/src/i18n/messages.js index 473fd9b1..bb3f2d39 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -290,7 +290,7 @@ const en = { follows_imported: 'Follows imported! Processing them will take a while.', follow_import_error: 'Error importing followers', follow_export: 'Follow export', - follow_export_processing: 'Processing, you\'ll soon be aked to download your file', + follow_export_processing: 'Processing, you\'ll soon be asked to download your file', follow_export_button: 'Export your follows to a csv file' }, notifications: { -- cgit v1.2.3-70-g09d2 From 3c525d6a3b4a815bd600261298d08a4ac6deaa35 Mon Sep 17 00:00:00 2001 From: aka Date: Fri, 18 May 2018 07:34:36 -0300 Subject: use es6 notation for exportFollows --- src/components/user_settings/user_settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 2c08b2f8..708d1988 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -165,9 +165,9 @@ const UserSettings = { this.enableFollowsExport = false this.$store.state.api.backendInteractor .fetchFriends({id: this.$store.state.users.currentUser.id}) - .then(function (friendList) { + .then((friendList) => { this.exportPeople(friendList, 'friends.csv') - }.bind(this)) + }) }, followListChange () { // eslint-disable-next-line no-undef -- cgit v1.2.3-70-g09d2 From 8bd561c285aa48d750cf026d4492d4169f2fb040 Mon Sep 17 00:00:00 2001 From: chip Date: Fri, 18 May 2018 21:39:21 +0200 Subject: Correct typo in french translation --- src/i18n/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/messages.js b/src/i18n/messages.js index f00bb6c5..43a224ce 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -917,7 +917,7 @@ const fr = { fullname: 'Pseudonyme', email: 'Adresse email', bio: 'Biographie', - password_confirm: 'Confirmation le mot de passe' + password_confirm: 'Confirmation du mot de passe' }, post_status: { posting: 'Envoi en cours', -- cgit v1.2.3-70-g09d2 From fcc1ab1d85ce5ba5944821f8a8c3cc593997f949 Mon Sep 17 00:00:00 2001 From: chip Date: Sat, 19 May 2018 20:35:14 +0200 Subject: Pass the "Collapse" label throught the translation function --- src/components/conversation/conversation.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 308e5e7d..bfcd3fe7 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -3,7 +3,7 @@
{{ $t('timeline.conversation') }} - Collapse + {{ $t('timeline.collapse') }}
-- cgit v1.2.3-70-g09d2