From ddf13d8c97eb4d0f09ff1f25ce915224a9884b6b Mon Sep 17 00:00:00 2001 From: Olivier Migeot Date: Wed, 30 Mar 2011 16:46:22 +0200 Subject: [PATCH 01/11] Some corrections to PO workflow, and integrated latest templates "stringization" for french. --- util/README | 4 +- view/fr/messages.po | 279 +++++++++++++++++++++++++++++--------------- view/fr/strings.php | 10 ++ 3 files changed, 194 insertions(+), 99 deletions(-) diff --git a/util/README b/util/README index a6f7e59a6f..b8fd7c9ee7 100644 --- a/util/README +++ b/util/README @@ -111,8 +111,8 @@ Xgettext and .po workflow to create the strings.php file When strings are added or modified in source, you could run - $ util/run_xgettext.sh view//messages.po - to extraxt strings from source files and join them with the existing .po file: + $ cd util; ./run_xgettext.sh ../view//messages.po + to extract strings from source files and join them with the existing .po file: new strings are added, the existing are not overwritten. If you already translated Friendika using strings.php, you could import your old diff --git a/view/fr/messages.po b/view/fr/messages.po index 81cc8b9fcc..c0cb2789d0 100644 --- a/view/fr/messages.po +++ b/view/fr/messages.po @@ -1,4 +1,4 @@ -# FRIENDIKA Distribuited Social Network +# FRIENDIKA Distributed Social Network # Copyright (C) 2010, 2011 Mike Macgirvin # This file is distributed under the same license as the Friendika package. # Mike Macgirvin, 2010 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 2.1.931\n" +"Project-Id-Version: 2.1.933\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-03-28 19:42+0200\n" +"POT-Creation-Date: 2011-03-30 14:40+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -429,11 +429,12 @@ msgstr "" "Impossible de localiser les informations DNS pour le serveur de base de " "données '%s'" -#: ../../include/nav.php:38 ../../boot.php:837 +#: ../../include/nav.php:38 ../../boot.php:837 ../../boot.php:839 msgid "Logout" msgstr "Se déconnecter" #: ../../include/nav.php:44 ../../boot.php:817 ../../boot.php:823 +#: ../../boot.php:819 ../../boot.php:825 msgid "Login" msgstr "Connexion" @@ -442,7 +443,7 @@ msgid "Home" msgstr "Accueil" #: ../../include/nav.php:61 ../../mod/register.php:445 ../../boot.php:809 -#: ../../mod/register.php:463 +#: ../../mod/register.php:463 ../../boot.php:811 msgid "Register" msgstr "S'inscrire" @@ -452,7 +453,7 @@ msgid "Apps" msgstr "Applications" #: ../../include/nav.php:67 ../../mod/search.php:17 ../../boot.php:2055 -#: ../../boot.php:2056 +#: ../../boot.php:2056 ../../boot.php:2058 msgid "Search" msgstr "Recherche" @@ -916,7 +917,7 @@ msgid "Wall Photos" msgstr "Photos du mur" #: ../../mod/wall_upload.php:82 ../../mod/profile_photo.php:230 -#: ../../mod/photos.php:589 +#: ../../mod/photos.php:589 ../../mod/profile_photo.php:232 #, fuzzy msgid "Image upload failed." msgstr "Le téléversement de l'image a échoué." @@ -990,7 +991,8 @@ msgstr "" #: ../../mod/profile_photo.php:234 ../../mod/photos.php:106 #: ../../mod/photos.php:531 ../../mod/photos.php:850 ../../mod/photos.php:865 #: ../../mod/register.php:285 ../../mod/register.php:292 -#: ../../mod/register.php:299 +#: ../../mod/register.php:299 ../../mod/profile_photo.php:227 +#: ../../mod/profile_photo.php:236 msgid "Profile Photos" msgstr "Photos du profil" @@ -1062,7 +1064,8 @@ msgstr "Non" #: ../../mod/register.php:424 ../../mod/network.php:484 #: ../../mod/display.php:317 ../../mod/profile.php:435 #: ../../mod/register.php:442 ../../mod/network.php:554 -#: ../../mod/profile.php:490 +#: ../../mod/profile.php:490 ../../mod/network.php:595 +#: ../../mod/mprofile.php:283 ../../mod/profile.php:492 msgid "" "Shared content is covered by the Creative Commons Attribution 3.0 license." @@ -1113,30 +1116,31 @@ msgstr "Vue des nouveautés" #: ../../mod/network.php:69 ../../mod/message.php:172 #: ../../mod/profile.php:134 ../../mod/profile.php:137 +#: ../../mod/mprofile.php:136 #, fuzzy msgid "Please enter a link URL:" msgstr "Entrez un lien web:" #: ../../mod/network.php:70 ../../mod/profile.php:135 -#: ../../mod/profile.php:138 +#: ../../mod/profile.php:138 ../../mod/mprofile.php:137 #, fuzzy msgid "Please enter a YouTube link:" msgstr "Entrez un lien Youtube:" #: ../../mod/network.php:71 ../../mod/profile.php:136 -#: ../../mod/profile.php:139 +#: ../../mod/profile.php:139 ../../mod/mprofile.php:138 #, fuzzy msgid "Please enter a video(.ogg) link/URL:" msgstr "Entrez un lien vidéo (.ogg):" #: ../../mod/network.php:72 ../../mod/profile.php:137 -#: ../../mod/profile.php:140 +#: ../../mod/profile.php:140 ../../mod/mprofile.php:139 #, fuzzy msgid "Please enter an audio(.ogg) link/URL:" msgstr "Entrez un lien audio (.ogg):" #: ../../mod/network.php:73 ../../mod/profile.php:138 -#: ../../mod/profile.php:141 +#: ../../mod/profile.php:141 ../../mod/mprofile.php:140 #, fuzzy msgid "Where are you right now?" msgstr "Où êtes-vous présentemment?" @@ -1145,7 +1149,9 @@ msgstr "Où êtes-vous présentemment?" #: ../../mod/display.php:158 ../../mod/profile.php:161 #: ../../mod/profile.php:322 ../../mod/photos.php:1086 #: ../../mod/network.php:441 ../../mod/profile.php:164 -#: ../../mod/profile.php:377 +#: ../../mod/profile.php:377 ../../mod/network.php:97 +#: ../../mod/network.php:479 ../../mod/mprofile.php:163 +#: ../../mod/profile.php:165 ../../mod/profile.php:379 #, fuzzy msgid "Share" msgstr "Partager" @@ -1153,41 +1159,55 @@ msgstr "Partager" #: ../../mod/network.php:97 ../../mod/message.php:186 #: ../../mod/message.php:320 ../../mod/profile.php:162 #: ../../mod/editpost.php:63 ../../mod/profile.php:165 +#: ../../mod/network.php:98 ../../mod/mprofile.php:164 +#: ../../mod/profile.php:166 msgid "Upload photo" msgstr "Joindre photo" #: ../../mod/network.php:98 ../../mod/message.php:187 #: ../../mod/message.php:321 ../../mod/profile.php:163 #: ../../mod/editpost.php:64 ../../mod/profile.php:166 +#: ../../mod/network.php:99 ../../mod/mprofile.php:165 +#: ../../mod/profile.php:167 msgid "Insert web link" msgstr "Insérer lien web" #: ../../mod/network.php:99 ../../mod/profile.php:164 #: ../../mod/editpost.php:65 ../../mod/profile.php:167 +#: ../../mod/network.php:100 ../../mod/mprofile.php:166 +#: ../../mod/profile.php:168 #, fuzzy msgid "Insert YouTube video" msgstr "Insérer une vidéo Youtube" #: ../../mod/network.php:100 ../../mod/profile.php:165 #: ../../mod/editpost.php:66 ../../mod/profile.php:168 +#: ../../mod/network.php:101 ../../mod/mprofile.php:167 +#: ../../mod/profile.php:169 #, fuzzy msgid "Insert Vorbis [.ogg] video" msgstr "Insérer un lien vidéo Vorbis [.ogg]" #: ../../mod/network.php:101 ../../mod/profile.php:166 #: ../../mod/editpost.php:67 ../../mod/profile.php:169 +#: ../../mod/network.php:102 ../../mod/mprofile.php:168 +#: ../../mod/profile.php:170 #, fuzzy msgid "Insert Vorbis [.ogg] audio" msgstr "Insérer un lien audio Vorbis [.ogg]" #: ../../mod/network.php:102 ../../mod/profile.php:167 #: ../../mod/editpost.php:68 ../../mod/profile.php:170 +#: ../../mod/network.php:103 ../../mod/mprofile.php:169 +#: ../../mod/profile.php:171 #, fuzzy msgid "Set your location" msgstr "Définir votre localisation" #: ../../mod/network.php:103 ../../mod/profile.php:168 #: ../../mod/editpost.php:69 ../../mod/profile.php:171 +#: ../../mod/network.php:104 ../../mod/mprofile.php:170 +#: ../../mod/profile.php:172 #, fuzzy msgid "Clear browser location" msgstr "Effacer la localisation du navigateur" @@ -1198,36 +1218,45 @@ msgstr "Effacer la localisation du navigateur" #: ../../mod/profile.php:323 ../../mod/photos.php:1087 #: ../../mod/editpost.php:70 ../../mod/network.php:442 #: ../../mod/profile.php:172 ../../mod/profile.php:378 +#: ../../mod/network.php:106 ../../mod/network.php:480 +#: ../../mod/mprofile.php:171 ../../mod/profile.php:174 +#: ../../mod/profile.php:380 msgid "Please wait" msgstr "Patientez" #: ../../mod/network.php:105 ../../mod/profile.php:170 #: ../../mod/editpost.php:71 ../../mod/profile.php:173 +#: ../../mod/network.php:107 ../../mod/mprofile.php:172 +#: ../../mod/profile.php:175 #, fuzzy msgid "Permission settings" msgstr "Réglages des permissions" #: ../../mod/network.php:111 ../../mod/profile.php:177 #: ../../mod/editpost.php:77 ../../mod/profile.php:180 +#: ../../mod/network.php:113 ../../mod/mprofile.php:179 +#: ../../mod/profile.php:182 #, fuzzy msgid "CC: email addresses" msgstr "CC: adresse de courriel" #: ../../mod/network.php:113 ../../mod/profile.php:179 #: ../../mod/editpost.php:79 ../../mod/profile.php:182 +#: ../../mod/network.php:115 ../../mod/mprofile.php:181 +#: ../../mod/profile.php:184 #, fuzzy msgid "Example: bob@example.com, mary@example.com" msgstr "Exemple: bob@exemple.com, mary@exemple.com" -#: ../../mod/network.php:156 +#: ../../mod/network.php:156 ../../mod/network.php:158 msgid "No such group" msgstr "Groupe inexistant" -#: ../../mod/network.php:167 +#: ../../mod/network.php:167 ../../mod/network.php:169 msgid "Group is empty" msgstr "Groupe vide" -#: ../../mod/network.php:171 +#: ../../mod/network.php:171 ../../mod/network.php:173 msgid "Group: " msgstr "Groupe: " @@ -1235,23 +1264,27 @@ msgstr "Groupe: " #: ../../mod/display.php:262 ../../mod/profile.php:402 #: ../../mod/search.php:116 ../../mod/network.php:303 #: ../../mod/network.php:512 ../../mod/profile.php:457 +#: ../../mod/network.php:321 ../../mod/network.php:550 +#: ../../mod/profile.php:459 msgid "View $name's profile" msgstr "Voir le profil de $name" #: ../../mod/network.php:295 ../../mod/search.php:131 -#: ../../mod/network.php:318 +#: ../../mod/network.php:318 ../../mod/network.php:336 msgid "View in context" msgstr "Voir dans le contexte" #: ../../mod/network.php:329 ../../mod/display.php:149 #: ../../mod/profile.php:313 ../../mod/photos.php:962 #: ../../mod/network.php:395 ../../mod/profile.php:368 +#: ../../mod/network.php:433 ../../mod/profile.php:370 msgid "Private Message" msgstr "Message privé" #: ../../mod/network.php:373 ../../mod/display.php:156 #: ../../mod/profile.php:320 ../../mod/photos.php:1084 #: ../../mod/network.php:439 ../../mod/profile.php:375 +#: ../../mod/network.php:477 ../../mod/profile.php:377 #, fuzzy msgid "I like this (toggle)" msgstr "I like this (bascule)" @@ -1259,6 +1292,7 @@ msgstr "I like this (bascule)" #: ../../mod/network.php:374 ../../mod/display.php:157 #: ../../mod/profile.php:321 ../../mod/photos.php:1085 #: ../../mod/network.php:440 ../../mod/profile.php:376 +#: ../../mod/network.php:478 ../../mod/profile.php:378 #, fuzzy msgid "I don't like this (toggle)" msgstr "I don't like this (bascule)" @@ -1267,12 +1301,14 @@ msgstr "I don't like this (bascule)" #: ../../mod/profile.php:335 ../../mod/photos.php:1106 #: ../../mod/photos.php:1146 ../../mod/photos.php:1175 #: ../../mod/network.php:455 ../../mod/profile.php:390 +#: ../../mod/network.php:493 ../../mod/profile.php:392 msgid "This is you" msgstr "C'est vous" #: ../../mod/network.php:397 ../../mod/display.php:222 #: ../../mod/profile.php:359 ../../mod/editpost.php:62 #: ../../mod/network.php:463 ../../mod/profile.php:414 +#: ../../mod/network.php:501 ../../mod/profile.php:416 #, fuzzy msgid "Edit" msgstr "Éditer" @@ -1280,30 +1316,31 @@ msgstr "Éditer" #: ../../mod/network.php:398 ../../mod/display.php:238 ../../mod/group.php:137 #: ../../mod/profile.php:381 ../../mod/photos.php:1203 #: ../../mod/network.php:464 ../../mod/profile.php:436 +#: ../../mod/network.php:502 ../../mod/profile.php:438 #, fuzzy msgid "Delete" msgstr "Supprimer" #: ../../mod/network.php:447 ../../mod/display.php:263 -#: ../../mod/network.php:513 +#: ../../mod/network.php:513 ../../mod/network.php:551 #, fuzzy msgid "View $owner_name's profile" msgstr "Voir le profil de $owner_name" #: ../../mod/network.php:448 ../../mod/display.php:264 -#: ../../mod/network.php:514 +#: ../../mod/network.php:514 ../../mod/network.php:552 #, fuzzy msgid "to" msgstr "à" #: ../../mod/network.php:449 ../../mod/display.php:265 -#: ../../mod/network.php:515 +#: ../../mod/network.php:515 ../../mod/network.php:553 #, fuzzy msgid "Wall-to-Wall" msgstr "Inter-mur" #: ../../mod/network.php:450 ../../mod/display.php:266 -#: ../../mod/network.php:516 +#: ../../mod/network.php:516 ../../mod/network.php:554 #, fuzzy msgid "via Wall-To-Wall:" msgstr "en Inter-mur:" @@ -1814,6 +1851,7 @@ msgstr "Image envoyée, mais impossible de la retailler." #: ../../mod/profile_photo.php:61 ../../mod/profile_photo.php:68 #: ../../mod/profile_photo.php:75 ../../mod/profile_photo.php:237 +#: ../../mod/profile_photo.php:239 #, fuzzy, php-format msgid "Image size reduction [%s] failed." msgstr "Réduction de la taille de l'image [%s] échouée." @@ -1822,7 +1860,7 @@ msgstr "Réduction de la taille de l'image [%s] échouée." msgid "Unable to process image" msgstr "Impossible de traiter l'image" -#: ../../mod/profile_photo.php:228 +#: ../../mod/profile_photo.php:228 ../../mod/profile_photo.php:230 #, fuzzy msgid "Image uploaded successfully." msgstr "Image téléversée avec succès." @@ -1837,6 +1875,7 @@ msgid "Finding: " msgstr "Trouvé: " #: ../../mod/viewcontacts.php:17 ../../boot.php:2038 ../../boot.php:2039 +#: ../../boot.php:2041 msgid "View Contacts" msgstr "Voir les contacts" @@ -1851,6 +1890,7 @@ msgid "Visit $username's profile" msgstr "Visiter le profil de %s" #: ../../mod/profile.php:8 ../../boot.php:2210 ../../boot.php:2211 +#: ../../mod/mprofile.php:8 ../../boot.php:2213 msgid "No profile" msgstr "Aucun profil" @@ -1966,6 +2006,7 @@ msgid "%s commented on an item at %s" msgstr "%s a commanté sur une publication : %s" #: ../../mod/dfrn_poll.php:78 ../../mod/dfrn_poll.php:392 +#: ../../mod/dfrn_poll.php:77 ../../mod/dfrn_poll.php:391 #, fuzzy, php-format msgid "%s welcomes %s" msgstr "%s accueille %s" @@ -2265,10 +2306,12 @@ msgid "Invalid request identifier." msgstr "Identifiant de demande invalide." #: ../../mod/notifications.php:31 ../../mod/notifications.php:134 +#: ../../mod/notifications.php:133 msgid "Discard" msgstr "Défausser" #: ../../mod/notifications.php:41 ../../mod/notifications.php:133 +#: ../../mod/notifications.php:132 msgid "Ignore" msgstr "Ignorer" @@ -2280,51 +2323,51 @@ msgstr "Voir les demandes ignorées" msgid "Hide Ignored Requests" msgstr "Cacher les demandes ignorées" -#: ../../mod/notifications.php:105 +#: ../../mod/notifications.php:105 ../../mod/notifications.php:104 msgid "Claims to be known to you: " msgstr "Prétend que vous le connaissez: " -#: ../../mod/notifications.php:105 +#: ../../mod/notifications.php:105 ../../mod/notifications.php:104 msgid "yes" msgstr "oui" -#: ../../mod/notifications.php:105 +#: ../../mod/notifications.php:105 ../../mod/notifications.php:104 msgid "no" msgstr "non" -#: ../../mod/notifications.php:111 +#: ../../mod/notifications.php:111 ../../mod/notifications.php:110 msgid "Approve as: " msgstr "Approuver en tant que: " -#: ../../mod/notifications.php:112 +#: ../../mod/notifications.php:112 ../../mod/notifications.php:111 msgid "Friend" msgstr "Ami" -#: ../../mod/notifications.php:113 +#: ../../mod/notifications.php:113 ../../mod/notifications.php:112 msgid "Fan/Admirer" msgstr "Fan/Admirateur" -#: ../../mod/notifications.php:120 +#: ../../mod/notifications.php:120 ../../mod/notifications.php:119 msgid "Notification type: " msgstr "Type de notification: " -#: ../../mod/notifications.php:121 +#: ../../mod/notifications.php:121 ../../mod/notifications.php:120 msgid "Friend/Connect Request" msgstr "Demande de connexion/relation" -#: ../../mod/notifications.php:121 +#: ../../mod/notifications.php:121 ../../mod/notifications.php:120 msgid "New Follower" msgstr "Nouvel abonné" -#: ../../mod/notifications.php:131 +#: ../../mod/notifications.php:131 ../../mod/notifications.php:130 msgid "Approve" msgstr "Approuver" -#: ../../mod/notifications.php:140 +#: ../../mod/notifications.php:140 ../../mod/notifications.php:139 msgid "No notifications." msgstr "Pas de notification." -#: ../../mod/notifications.php:164 +#: ../../mod/notifications.php:164 ../../mod/notifications.php:163 msgid "No registrations." msgstr "Pas d'inscriptions." @@ -2529,218 +2572,218 @@ msgstr "" msgid "Please enter your password for verification:" msgstr "Merci de saisir votre mot de passe pour vérification:" -#: ../../boot.php:808 +#: ../../boot.php:808 ../../boot.php:810 #, fuzzy msgid "Create a New Account" msgstr "Créer un nouveau compte" -#: ../../boot.php:815 +#: ../../boot.php:815 ../../boot.php:817 #, fuzzy msgid "Nickname or Email address: " msgstr "Pseudo ou courriel: " -#: ../../boot.php:816 +#: ../../boot.php:816 ../../boot.php:818 msgid "Password: " msgstr "Mot de passe: " -#: ../../boot.php:821 +#: ../../boot.php:821 ../../boot.php:823 #, fuzzy msgid "Nickname/Email/OpenID: " msgstr "Pseudo/Courriel/OpenID: " -#: ../../boot.php:822 +#: ../../boot.php:822 ../../boot.php:824 msgid "Password (if not OpenID): " msgstr "Mot de passe (sauf pour OpenID): " -#: ../../boot.php:825 +#: ../../boot.php:825 ../../boot.php:827 msgid "Forgot your password?" msgstr "Mot de passe oublié?" -#: ../../boot.php:826 +#: ../../boot.php:826 ../../boot.php:828 msgid "Password Reset" msgstr "Réinitialiser le mot de passe" -#: ../../boot.php:1077 ../../boot.php:1078 +#: ../../boot.php:1077 ../../boot.php:1078 ../../boot.php:1080 #, fuzzy msgid "prev" msgstr "précédent" -#: ../../boot.php:1079 ../../boot.php:1080 +#: ../../boot.php:1079 ../../boot.php:1080 ../../boot.php:1082 #, fuzzy msgid "first" msgstr "premier" -#: ../../boot.php:1108 ../../boot.php:1109 +#: ../../boot.php:1108 ../../boot.php:1109 ../../boot.php:1111 #, fuzzy msgid "last" msgstr "dernier" -#: ../../boot.php:1111 ../../boot.php:1112 +#: ../../boot.php:1111 ../../boot.php:1112 ../../boot.php:1114 #, fuzzy msgid "next" msgstr "suivant" -#: ../../boot.php:1837 ../../boot.php:1838 +#: ../../boot.php:1837 ../../boot.php:1838 ../../boot.php:1840 #, fuzzy, php-format msgid "%s likes this." msgstr "%s aime ça." -#: ../../boot.php:1837 ../../boot.php:1838 +#: ../../boot.php:1837 ../../boot.php:1838 ../../boot.php:1840 #, fuzzy, php-format msgid "%s doesn't like this." msgstr "%s n'aime pas ça." -#: ../../boot.php:1841 ../../boot.php:1842 +#: ../../boot.php:1841 ../../boot.php:1842 ../../boot.php:1844 #, fuzzy, php-format msgid "%2$d people like this." msgstr "%2$d personnes aiment ça." -#: ../../boot.php:1843 ../../boot.php:1844 +#: ../../boot.php:1843 ../../boot.php:1844 ../../boot.php:1846 #, fuzzy, php-format msgid "%2$d people don't like this." msgstr "%2$d personnes ,n'aiment pas ça." -#: ../../boot.php:1849 ../../boot.php:1850 +#: ../../boot.php:1849 ../../boot.php:1850 ../../boot.php:1852 msgid "and" msgstr "et" -#: ../../boot.php:1852 ../../boot.php:1853 +#: ../../boot.php:1852 ../../boot.php:1853 ../../boot.php:1855 #, fuzzy, php-format msgid ", and %d other people" msgstr ", et %d autres personnes" -#: ../../boot.php:1853 ../../boot.php:1854 +#: ../../boot.php:1853 ../../boot.php:1854 ../../boot.php:1856 #, fuzzy, php-format msgid "%s like this." msgstr "%s aiment ça." -#: ../../boot.php:1853 ../../boot.php:1854 +#: ../../boot.php:1853 ../../boot.php:1854 ../../boot.php:1856 #, fuzzy, php-format msgid "%s don't like this." msgstr "%s n'aiment pas ça." -#: ../../boot.php:2014 ../../boot.php:2015 +#: ../../boot.php:2014 ../../boot.php:2015 ../../boot.php:2017 msgid "No contacts" msgstr "Aucun contact" -#: ../../boot.php:2267 ../../boot.php:2268 +#: ../../boot.php:2267 ../../boot.php:2268 ../../boot.php:2270 msgid "Connect" msgstr "Relier" -#: ../../boot.php:2277 ../../boot.php:2278 +#: ../../boot.php:2277 ../../boot.php:2278 ../../boot.php:2280 msgid "Location:" msgstr "Localisation:" -#: ../../boot.php:2281 ../../boot.php:2282 +#: ../../boot.php:2281 ../../boot.php:2282 ../../boot.php:2284 msgid ", " msgstr ", " -#: ../../boot.php:2289 ../../boot.php:2290 +#: ../../boot.php:2289 ../../boot.php:2290 ../../boot.php:2292 msgid "Gender:" msgstr "Genre:" -#: ../../boot.php:2293 ../../boot.php:2294 +#: ../../boot.php:2293 ../../boot.php:2294 ../../boot.php:2296 msgid "Status:" msgstr "Statut:" -#: ../../boot.php:2295 ../../boot.php:2296 +#: ../../boot.php:2295 ../../boot.php:2296 ../../boot.php:2298 msgid "Homepage:" msgstr "Page personnelle:" -#: ../../boot.php:2386 ../../boot.php:2387 +#: ../../boot.php:2386 ../../boot.php:2387 ../../boot.php:2389 msgid "Monday" msgstr "Lundi" -#: ../../boot.php:2386 ../../boot.php:2387 +#: ../../boot.php:2386 ../../boot.php:2387 ../../boot.php:2389 msgid "Tuesday" msgstr "Mardi" -#: ../../boot.php:2386 ../../boot.php:2387 +#: ../../boot.php:2386 ../../boot.php:2387 ../../boot.php:2389 msgid "Wednesday" msgstr "Mercredi" -#: ../../boot.php:2386 ../../boot.php:2387 +#: ../../boot.php:2386 ../../boot.php:2387 ../../boot.php:2389 msgid "Thursday" msgstr "Jeudi" -#: ../../boot.php:2386 ../../boot.php:2387 +#: ../../boot.php:2386 ../../boot.php:2387 ../../boot.php:2389 msgid "Friday" msgstr "Vendredi" -#: ../../boot.php:2386 ../../boot.php:2387 +#: ../../boot.php:2386 ../../boot.php:2387 ../../boot.php:2389 msgid "Saturday" msgstr "Samedi" -#: ../../boot.php:2386 ../../boot.php:2387 +#: ../../boot.php:2386 ../../boot.php:2387 ../../boot.php:2389 msgid "Sunday" msgstr "Dimanche" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "January" msgstr "Janvier" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "February" msgstr "Février" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "March" msgstr "Mars" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "April" msgstr "Avril" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "May" msgstr "Mai" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "June" msgstr "Juin" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "July" msgstr "Juillet" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "August" msgstr "Août" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "September" msgstr "Septembre" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "October" msgstr "Octobre" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "November" msgstr "Novembre" -#: ../../boot.php:2390 ../../boot.php:2391 +#: ../../boot.php:2390 ../../boot.php:2391 ../../boot.php:2393 msgid "December" msgstr "Décembre" -#: ../../boot.php:2424 ../../boot.php:2425 +#: ../../boot.php:2424 ../../boot.php:2425 ../../boot.php:2427 #, fuzzy msgid "Birthday Reminders" msgstr "Rappels d'anniversaires" -#: ../../boot.php:2425 ../../boot.php:2426 +#: ../../boot.php:2425 ../../boot.php:2426 ../../boot.php:2428 msgid "Birthdays this week:" msgstr "Anniversaires cette semaine:" -#: ../../boot.php:2426 ../../boot.php:2427 +#: ../../boot.php:2426 ../../boot.php:2427 ../../boot.php:2429 msgid "(Adjusted for local time)" msgstr "(Ajustés pour le fuseau horaire local)" -#: ../../boot.php:2437 ../../boot.php:2438 +#: ../../boot.php:2437 ../../boot.php:2438 ../../boot.php:2440 msgid "[today]" msgstr "[aujourd'hui]" -#: ../../boot.php:2634 ../../boot.php:2635 +#: ../../boot.php:2634 ../../boot.php:2635 ../../boot.php:2637 #, fuzzy msgid "link to source" msgstr "lien original" @@ -2767,16 +2810,17 @@ msgid "" "\"http://creativecommons.org/licenses/by/3.0/\">Creative Commons Attribution " "3.0 license" msgstr "" -"Les contenus partagés au sein du réseau Friendika le sont sous la licence Creative Commons Attribution " -"3.0" +"Les contenus partagés au sein du réseau Friendika le sont sous la licence Creative Commons " +"Attribution 3.0" #: ../../mod/friendika.php:17 msgid "" "Please visit Project.Friendika.com to learn more about the Friendika project." -msgstr "Pour en savoir plus, vous pouvez nous rendre visite sur Project.Friendika.com" +msgstr "" +"Pour en savoir plus, vous pouvez nous rendre visite sur Project.Friendika.com" #: ../../mod/friendika.php:19 msgid "Bug reports and issues: please visit" @@ -2787,8 +2831,8 @@ msgid "" "Suggestions, praise, donations, etc. - please email \"Info\" at Friendika - " "dot com" msgstr "" -"Suggestions, remerciements, donations, etc. - écrivez à \"Info\" arob. Friendika - " -"point com" +"Suggestions, remerciements, donations, etc. - écrivez à \"Info\" arob. " +"Friendika - point com" #: ../../mod/friendika.php:25 msgid "Installed plugins/addons/apps" @@ -2806,11 +2850,12 @@ msgstr "Correpondance de profils" msgid "No matches" msgstr "Aucune correspondance" -#: ../../mod/network.php:363 +#: ../../mod/network.php:363 ../../mod/network.php:399 msgid "See more posts like this" msgstr "Davantage de publications similaires" #: ../../mod/network.php:382 ../../mod/profile.php:357 +#: ../../mod/network.php:418 ../../mod/profile.php:359 #, php-format msgid "See all %d comments" msgstr "Voir les %d commentaires" @@ -2839,15 +2884,15 @@ msgstr "Genre: " msgid "No entries (some entries may be hidden)." msgstr "Aucune entrée (certaines peuvent être cachées)." -#: ../../mod/profile.php:102 +#: ../../mod/profile.php:102 ../../mod/mprofile.php:101 msgid "Status" msgstr "Statut" -#: ../../mod/profile.php:103 +#: ../../mod/profile.php:103 ../../mod/mprofile.php:102 msgid "Profile" msgstr "Profil" -#: ../../mod/profile.php:104 +#: ../../mod/profile.php:104 ../../mod/mprofile.php:103 msgid "Photos" msgstr "Photos" @@ -2855,9 +2900,49 @@ msgstr "Photos" msgid "Find People With Shared Interests" msgstr "Trouver des gens d'intérêts communs" -#: ../../boot.php:2023 +#: ../../boot.php:2023 ../../boot.php:2025 #, php-format msgid "%d Contact" msgid_plural "%d Contacts" msgstr[0] "%d contact" msgstr[1] "%d contacts" + +#: ../../mod/oexchange.php:27 +msgid "Post successful." +msgstr "Publication réussie." + +#: ../../mod/network.php:74 ../../mod/profile.php:142 +msgid "Enter a title for this item" +msgstr "Saisissez un titre pour cet élément" + +#: ../../mod/network.php:105 ../../mod/profile.php:173 +msgid "Set title" +msgstr "Définir un titre" + +#: ../../mod/profile_photo.php:200 +msgid "Crop Image" +msgstr "(Re)cadrer l'image" + +#: ../../mod/profile_photo.php:201 +msgid "Please adjust the image cropping for optimum viewing." +msgstr "Ajustez le cadre de l'image pour une visualisation optimale." + +#: ../../mod/profile_photo.php:202 +msgid "Done Editing" +msgstr "Édition terminée" + +#: ../../mod/notifications.php:68 +msgid "Pending Friend/Connect Notifications" +msgstr "Notifications de relation/amitié enattente" + +#: ../../mod/notifications.php:143 +msgid "User registrations waiting for confirm" +msgstr "Inscriptions d'utilisateurs en attente de confirmation" + +#: ../../boot.php:359 +msgid "Delete this item?" +msgstr "Effacer cet élément?" + +#: ../../boot.php:360 +msgid "Comment" +msgstr "Commenter" diff --git a/view/fr/strings.php b/view/fr/strings.php index 33aa01b535..5a6ae50274 100644 --- a/view/fr/strings.php +++ b/view/fr/strings.php @@ -605,3 +605,13 @@ $a->strings["%d Contact"] = array( 0 => "%d contact", 1 => "%d contacts", ); +$a->strings["Post successful."] = "Publication réussie."; +$a->strings["Enter a title for this item"] = "Saisissez un titre pour cet élément"; +$a->strings["Set title"] = "Définir un titre"; +$a->strings["Crop Image"] = "(Re)cadrer l'image"; +$a->strings["Please adjust the image cropping for optimum viewing."] = "Ajustez le cadre de l'image pour une visualisation optimale."; +$a->strings["Done Editing"] = "Édition terminée"; +$a->strings["Pending Friend/Connect Notifications"] = "Notifications de relation/amitié enattente"; +$a->strings["User registrations waiting for confirm"] = "Inscriptions d'utilisateurs en attente de confirmation"; +$a->strings["Delete this item?"] = "Effacer cet élément?"; +$a->strings["Comment"] = "Commenter"; From 78058c0a19e7682791282c89d93cd115d49f6ee6 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 30 Mar 2011 14:31:56 -0700 Subject: [PATCH 02/11] revup --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 3b5da170cb..e4aa52b1a7 100644 --- a/boot.php +++ b/boot.php @@ -2,7 +2,7 @@ set_time_limit(0); -define ( 'FRIENDIKA_VERSION', '2.1.933' ); +define ( 'FRIENDIKA_VERSION', '2.1.934' ); define ( 'DFRN_PROTOCOL_VERSION', '2.1' ); define ( 'DB_UPDATE_VERSION', 1045 ); From 0fe997490df7fbd3d108c8da931e4823b0a4b2d9 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 30 Mar 2011 15:04:18 -0700 Subject: [PATCH 03/11] dfrn remote profile protocol revision --- boot.php | 2 +- include/items.php | 2 +- include/poller.php | 2 +- mod/dfrn_poll.php | 92 +++++++++++++++++++++++++++++++++++++++----- mod/dfrn_request.php | 2 +- 5 files changed, 87 insertions(+), 13 deletions(-) diff --git a/boot.php b/boot.php index e4aa52b1a7..abbacdf4e7 100644 --- a/boot.php +++ b/boot.php @@ -3,7 +3,7 @@ set_time_limit(0); define ( 'FRIENDIKA_VERSION', '2.1.934' ); -define ( 'DFRN_PROTOCOL_VERSION', '2.1' ); +define ( 'DFRN_PROTOCOL_VERSION', '2.2' ); define ( 'DB_UPDATE_VERSION', 1045 ); define ( 'EOL', "
\r\n" ); diff --git a/include/items.php b/include/items.php index 4a740e55b2..58fad99272 100644 --- a/include/items.php +++ b/include/items.php @@ -762,7 +762,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { if(! $rino_enable) $rino = 0; - $url = $contact['notify'] . '?f=&dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . (($rino) ? '&rino=1' : ''); + $url = $contact['notify'] . '&dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . (($rino) ? '&rino=1' : ''); logger('dfrn_deliver: ' . $url); diff --git a/include/poller.php b/include/poller.php index 98c55a2a92..8619697d96 100644 --- a/include/poller.php +++ b/include/poller.php @@ -167,7 +167,7 @@ function poller_run($argv, $argc){ if(intval($contact['duplex']) && $contact['issued-id']) $idtosend = '1:' . $orig_id; - $url = $contact['poll'] . '?f=&dfrn_id=' . $idtosend + $url = $contact['poll'] . '?dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=data&last_update=' . $last_update ; diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 686a42d082..fe9504deb4 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -63,7 +63,7 @@ function dfrn_poll_init(&$a) { if(count($r)) { - $s = fetch_url($r[0]['poll'] . '?f=&dfrn_id=' . $my_id . '&type=profile-check'); + $s = fetch_url($r[0]['poll'] . '?dfrn_id=' . $my_id . '&type=profile-check'); logger("dfrn_poll: old profile returns " . $s, LOGGER_DATA); @@ -92,7 +92,7 @@ function dfrn_poll_init(&$a) { } - if($type === 'profile-check') { + if($type === 'profile-check' && $dfrn_version < 2.2 ) { if((strlen($challenge)) && (strlen($sec))) { @@ -182,8 +182,69 @@ function dfrn_poll_post(&$a) { $dfrn_id = ((x($_POST,'dfrn_id')) ? $_POST['dfrn_id'] : ''); $challenge = ((x($_POST,'challenge')) ? $_POST['challenge'] : ''); $url = ((x($_POST,'url')) ? $_POST['url'] : ''); + $sec = ((x($_POST,'sec')) ? $_POST['sec'] : ''); + $ptype = ((x($_POST,'type')) ? $_POST['type'] : ''); $dfrn_version = ((x($_POST,'dfrn_version')) ? (float) $_POST['dfrn_version'] : 2.0); + if($ptype === 'profile-check') { + + if((strlen($challenge)) && (strlen($sec))) { + + logger('dfrn_poll: POST: profile-check'); + + q("DELETE FROM `profile_check` WHERE `expire` < " . intval(time())); + $r = q("SELECT * FROM `profile_check` WHERE `sec` = '%s' ORDER BY `expire` DESC LIMIT 1", + dbesc($sec) + ); + if(! count($r)) { + xml_status(3, 'No ticket'); + // NOTREACHED + } + $orig_id = $r[0]['dfrn_id']; + if(strpos($orig_id, ':')) + $orig_id = substr($orig_id,2); + + $c = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", + intval($r[0]['cid']) + ); + if(! count($c)) { + xml_status(3, 'No profile'); + } + $contact = $c[0]; + + $sent_dfrn_id = hex2bin($dfrn_id); + $challenge = hex2bin($challenge); + + $final_dfrn_id = ''; + + if(($contact['duplex']) && strlen($contact['prvkey'])) { + openssl_private_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['prvkey']); + openssl_private_decrypt($challenge,$decoded_challenge,$contact['prvkey']); + } + else { + openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']); + openssl_public_decrypt($challenge,$decoded_challenge,$contact['pubkey']); + } + + $final_dfrn_id = substr($final_dfrn_id, 0, strpos($final_dfrn_id, '.')); + + if(strpos($final_dfrn_id,':') == 1) + $final_dfrn_id = substr($final_dfrn_id,2); + + if($final_dfrn_id != $orig_id) { + logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG); + // did not decode properly - cannot trust this site + xml_status(3, 'Bad decryption'); + } + + header("Content-type: text/xml"); + echo "0$decoded_challenge$sec"; + killme(); + // NOTREACHED + } + + } + $direction = (-1); if(strpos($dfrn_id,':') == 1) { $direction = intval(substr($dfrn_id,0,1)); @@ -365,13 +426,26 @@ function dfrn_poll_content(&$a) { if(($type === 'profile') && (strlen($sec))) { // URL reply - $s = fetch_url($r[0]['poll'] - . '?f=&dfrn_id=' . $encrypted_id - . '&type=profile-check' - . '&dfrn_version=' . DFRN_PROTOCOL_VERSION - . '&challenge=' . $challenge - . '&sec=' . $sec - ); + + + if($dfrn_version < 2.2) { + $s = fetch_url($r[0]['poll'] + . '?dfrn_id=' . $encrypted_id + . '&type=profile-check' + . '&dfrn_version=' . DFRN_PROTOCOL_VERSION + . '&challenge=' . $challenge + . '&sec=' . $sec + ); + } + else { + $s = post_url($r[0]['poll'], array( + 'dfrn_id' => $encrypted_id, + 'type' => 'profile-check', + 'dfrn_version' => DFRN_PROTOCOL_VERSION, + 'challenge' => $challenge, + 'sec' => $sec + )); + } logger("dfrn_poll: sec profile: " . $s, LOGGER_DATA); diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index cc63550789..3cd8473cf3 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -172,7 +172,7 @@ function dfrn_request_post(&$a) { $dfrn_request = $contact_record['request']; if(strlen($dfrn_request) && strlen($confirm_key)) - $s = fetch_url($dfrn_request . '?f=&confirm_key=' . $confirm_key); + $s = fetch_url($dfrn_request . '?confirm_key=' . $confirm_key); // (ignore reply, nothing we can do it failed) From 89e81862ec316ae41e616dd8b9ddeb6ab18193c7 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 30 Mar 2011 16:18:59 -0700 Subject: [PATCH 04/11] bug #29 - commas not linkified --- include/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bbcode.php b/include/bbcode.php index 4caf187666..44f5714509 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -22,7 +22,7 @@ function bbcode($Text) { // Perform URL Search - $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%\$\!\+]+)/", ' $2', $Text); + $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%\$\!\+\,]+)/", ' $2', $Text); $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '$1', $Text); $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '$2', $Text); From 75ad3219e67b803bebf028b69d59f26c44571b3d Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 30 Mar 2011 17:50:18 -0700 Subject: [PATCH 05/11] remote deletion - check contact-id --- mod/dfrn_notify.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 2cc5a62f3c..cd67df1d7c 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -262,10 +262,13 @@ function dfrn_notify_post(&$a) { $when = datetime_convert('UTC','UTC','now','Y-m-d H:i:s'); } if($deleted) { - $r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + + $r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d AND `contact-id` = %d LIMIT 1", dbesc($uri), - intval($importer['importer_uid']) + intval($importer['importer_uid']), + intval($importer['id']) ); + if(count($r)) { $item = $r[0]; From 08032e04536e67dbf488654a0142350690154c57 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 31 Mar 2011 04:57:31 -0700 Subject: [PATCH 06/11] change language dynamically - bound to F8 key --- boot.php | 20 ++++++++++++++++++++ include/main.js | 13 +++++++++++++ include/nav.php | 1 + index.php | 18 ++++++++++++++++++ view/theme/duepuntozero/style.css | 6 ++++++ view/theme/loozah/style.css | 6 ++++++ 6 files changed, 64 insertions(+) diff --git a/boot.php b/boot.php index abbacdf4e7..8a2706252a 100644 --- a/boot.php +++ b/boot.php @@ -2669,3 +2669,23 @@ function extract_item_authors($arr,$uid) { } return array(); }} + +if(! function_exists('lang_selector')) { +function lang_selector() { + global $lang; + $o .= ''; + return $o; +}} diff --git a/include/main.js b/include/main.js index 750cce74c0..18e884b317 100644 --- a/include/main.js +++ b/include/main.js @@ -26,6 +26,7 @@ var pr = 0; var liking = 0; var in_progress = false; + var langSelect = false; $(document).ready(function() { $.ajaxSetup({cache: false}); @@ -45,6 +46,18 @@ $('#pause').html(''); } } + // F8 - show/hide language selector + if(event.keyCode == '119') { + if(langSelect) { + langSelect = false; + $('#language-selector').hide(); + } + else { + langSelect = true; + $('#language-selector').show(); + } + } + // this is shift-home on FF, but $ on IE, disabling until I figure out why the diff. // update: incompatible usage of onKeyDown vs onKeyPress // if(event.keyCode == '36' && event.shiftKey == true) { diff --git a/include/nav.php b/include/nav.php index db3b909af1..b8b65f84d0 100644 --- a/include/nav.php +++ b/include/nav.php @@ -16,6 +16,7 @@ function nav(&$a) { */ $a->page['nav'] .= '' ; + $a->page['nav'] .= lang_selector(); /** * diff --git a/index.php b/index.php index ab722df2aa..9412c1e3bd 100644 --- a/index.php +++ b/index.php @@ -42,6 +42,11 @@ if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { } else { $lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en'); } +if(x($_POST,'system_language')) +if(x($_SESSION,'language')) + $lang = $_SESSION['language']; + + load_translation_table($lang); @@ -86,6 +91,19 @@ $a->init_pagehead(); session_start(); +/** + * Language was set earlier, but we can over-ride it in the session. + * We have to do it here because the session was just now opened. + */ + +if(x($_POST,'system_language')) + $_SESSION['language'] = $_POST['system_language']; +if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) { + $lang = $_SESSION['language']; + load_translation_table($lang); +} + + /** * * For Mozilla auth manager - still needs sorting, and this might conflict with LRDD header. diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 042cc380ff..0d59b65900 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2183,3 +2183,9 @@ a.mail-list-link { .side-link { margin-bottom: 15px; } + +#language-selector { + position: absolute; + top: 0; + left: 0; +) diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css index a618381575..5662207115 100644 --- a/view/theme/loozah/style.css +++ b/view/theme/loozah/style.css @@ -2205,3 +2205,9 @@ a.mail-list-link { .side-link { margin-bottom: 15px; } + +#language-selector { + position: absolute; + top: 0; + left: 0; +) From d728961cbf5ce3de7de65e37c900666e0f9f7358 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 31 Mar 2011 14:46:16 -0700 Subject: [PATCH 07/11] translateable time formats (PM & birthdays) --- boot.php | 6 ++---- mod/message.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/boot.php b/boot.php index 8a2706252a..e32e9a8fa0 100644 --- a/boot.php +++ b/boot.php @@ -2,7 +2,7 @@ set_time_limit(0); -define ( 'FRIENDIKA_VERSION', '2.1.934' ); +define ( 'FRIENDIKA_VERSION', '2.1.935' ); define ( 'DFRN_PROTOCOL_VERSION', '2.2' ); define ( 'DB_UPDATE_VERSION', 1045 ); @@ -2405,9 +2405,7 @@ function get_birthdays() { if(! local_user()) return $o; - $bd_format = get_config('system','birthday_format'); - if(! $bd_format) - $bd_format = 'g A l F d' ; // 8 AM Friday January 18 + $bd_format = t('g A l F d') ; // 8 AM Friday January 18 $r = q("SELECT `event`.*, `event`.`id` AS `eid`, `contact`.* FROM `event` LEFT JOIN `contact` ON `contact`.`id` = `event`.`cid` diff --git a/mod/message.php b/mod/message.php index 9d30abd668..7978ecaf2b 100644 --- a/mod/message.php +++ b/mod/message.php @@ -235,7 +235,7 @@ function message_content(&$a) { '$delete' => t('Delete conversation'), '$body' => $rr['body'], '$to_name' => $rr['name'], - '$date' => datetime_convert('UTC',date_default_timezone_get(),$rr['mailcreated'],'D, d M Y - g:i A') + '$date' => datetime_convert('UTC',date_default_timezone_get(),$rr['mailcreated'], t('D, d M Y - g:i A')) )); } $o .= paginate($a); From e33b6e0b5a1f444786d00a2666be1b23dc659c8a Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 1 Apr 2011 00:59:10 -0700 Subject: [PATCH 08/11] redirect to symbolic rather than absolute URL locations --- mod/dfrn_poll.php | 18 ++++++++++++++++-- mod/redir.php | 5 +++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index fe9504deb4..82ad709070 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -447,6 +447,19 @@ function dfrn_poll_content(&$a) { )); } + switch($destination_url) { + case 'profile': + $dest = $a->get_baseurl() . '/profile/' . $profile . '?tab=profile'; + break; + case 'photos': + $dest = $a->get_baseurl() . '/photos/' . $profile; + break; + case 'status': + default: + $dest = $a->get_baseurl() . '/profile/' . $profile; + break; + } + logger("dfrn_poll: sec profile: " . $s, LOGGER_DATA); if(strlen($s) && strstr($s,'get_baseurl() . '/profile/' . $profile); + + goaway($dest); } - goaway($a->get_baseurl()); + goaway($dest); // NOTREACHED } diff --git a/mod/redir.php b/mod/redir.php index ac21aa17eb..8d0c8f4b3a 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -5,6 +5,7 @@ function redir_init(&$a) { if((! local_user()) || (! ($a->argc == 2)) || (! intval($a->argv[1]))) goaway($a->get_baseurl()); $cid = $a->argv[1]; + $url = ((x($_GET,'url')) ? $_GET['url'] : ''); $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($cid), @@ -37,8 +38,8 @@ function redir_init(&$a) { ); logger('mod_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG); - + $dest = (($url) ? '&destination_url=' . $url : ''); goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id - . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec); + . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest ); } From 4b356e59ec36a2a2ef1a0224ecf86254090466e3 Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 1 Apr 2011 14:39:09 -0700 Subject: [PATCH 09/11] allow other destinations according to protocol --- boot.php | 2 +- mod/dfrn_poll.php | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index e32e9a8fa0..f03487cb33 100644 --- a/boot.php +++ b/boot.php @@ -2,7 +2,7 @@ set_time_limit(0); -define ( 'FRIENDIKA_VERSION', '2.1.935' ); +define ( 'FRIENDIKA_VERSION', '2.1.936' ); define ( 'DFRN_PROTOCOL_VERSION', '2.2' ); define ( 'DB_UPDATE_VERSION', 1045 ); diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 82ad709070..25b28c63ce 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -424,10 +424,9 @@ function dfrn_poll_content(&$a) { } if(($type === 'profile') && (strlen($sec))) { + // URL reply - - if($dfrn_version < 2.2) { $s = fetch_url($r[0]['poll'] . '?dfrn_id=' . $encrypted_id @@ -455,9 +454,12 @@ function dfrn_poll_content(&$a) { $dest = $a->get_baseurl() . '/photos/' . $profile; break; case 'status': - default: + case '': $dest = $a->get_baseurl() . '/profile/' . $profile; break; + default: + $dest = $destination_url; + break; } logger("dfrn_poll: sec profile: " . $s, LOGGER_DATA); From b500da74b675bc3f88e392573d6602f3e7d94e03 Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 1 Apr 2011 14:49:15 -0700 Subject: [PATCH 10/11] user language storage --- boot.php | 2 +- database.sql | 1 + update.php | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index f03487cb33..3dfd06bf17 100644 --- a/boot.php +++ b/boot.php @@ -4,7 +4,7 @@ set_time_limit(0); define ( 'FRIENDIKA_VERSION', '2.1.936' ); define ( 'DFRN_PROTOCOL_VERSION', '2.2' ); -define ( 'DB_UPDATE_VERSION', 1045 ); +define ( 'DB_UPDATE_VERSION', 1046 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 114f0d3d94..5e5d3eefac 100644 --- a/database.sql +++ b/database.sql @@ -366,6 +366,7 @@ CREATE TABLE IF NOT EXISTS `user` ( `email` char(255) NOT NULL, `openid` char(255) NOT NULL, `timezone` char(128) NOT NULL, + `language` char(32) NOT NULL DEFAULT 'en', `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `default-location` char(255) NOT NULL, diff --git a/update.php b/update.php index 3672b2bfee..62aea86bbb 100644 --- a/update.php +++ b/update.php @@ -416,5 +416,6 @@ function update_1044() { q("ALTER TABLE `profile` ADD FULLTEXT ( `prv_keywords` ) "); } - - \ No newline at end of file +function update_1045() { + q("ALTER TABLE `user` ADD `language` CHAR( 16 ) NOT NULL DEFAULT 'en' AFTER `timezone` "); +} From 9b50b0e16f2046b91cb4c734c56024524d8b178b Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 3 Apr 2011 20:41:40 -0700 Subject: [PATCH 11/11] Public exposure warning on affected network group pages. config-able so a plugin can shut it up. --- boot.php | 4 ++-- include/group.php | 17 ++++++++++++++++- index.php | 4 ---- mod/network.php | 8 ++++++++ 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/boot.php b/boot.php index 3dfd06bf17..94699a2730 100644 --- a/boot.php +++ b/boot.php @@ -2,7 +2,7 @@ set_time_limit(0); -define ( 'FRIENDIKA_VERSION', '2.1.936' ); +define ( 'FRIENDIKA_VERSION', '2.1.938' ); define ( 'DFRN_PROTOCOL_VERSION', '2.2' ); define ( 'DB_UPDATE_VERSION', 1046 ); @@ -2022,7 +2022,7 @@ function contact_block() { intval($shown) ); if(count($r)) { - $o .= '

' . sprintf(tt('%d Contact','%d Contacts', $total),$total) . '

'; + $o .= '

' . sprintf( tt('%d Contact','%d Contacts', $total),$total) . '

'; foreach($r as $rr) { $redirect_url = $a->get_baseurl() . '/redir/' . $rr['id']; if(local_user() && ($rr['uid'] == local_user()) diff --git a/include/group.php b/include/group.php index 793e854be0..07cd45f199 100644 --- a/include/group.php +++ b/include/group.php @@ -110,7 +110,7 @@ function group_get_members($gid) { LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` WHERE `gid` = %d AND `group_member`.`uid` = %d", intval($gid), - intval($_SESSION['uid']) + intval(local_user()) ); if(count($r)) $ret = $r; @@ -118,6 +118,21 @@ function group_get_members($gid) { return $ret; } +function group_public_members($gid) { + $ret = 0; + if(intval($gid)) { + $r = q("SELECT `contact`.`id` AS `contact-id` FROM `group_member` + LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` + WHERE `gid` = %d AND `group_member`.`uid` = %d AND `contact`.`network` != 'dfrn' ", + intval($gid), + intval(local_user()) + ); + if(count($r)) + $ret = count($r); + } + return $ret; +} + function group_side($every="contacts",$each="group") { diff --git a/index.php b/index.php index 9412c1e3bd..074c1c53a4 100644 --- a/index.php +++ b/index.php @@ -42,10 +42,6 @@ if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { } else { $lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en'); } -if(x($_POST,'system_language')) -if(x($_SESSION,'language')) - $lang = $_SESSION['language']; - load_translation_table($lang); diff --git a/mod/network.php b/mod/network.php index 39679b48a1..a304c211fe 100644 --- a/mod/network.php +++ b/mod/network.php @@ -54,6 +54,14 @@ function network_content(&$a, $update = 0) { } if(! $update) { + if(group) { + if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) { + $plural_form = sprintf( tt('%d member', '%d members', $t), $t); + notice( sprintf( t('Warning: This group contains %s from an insecure network.'), $plural_form ) . EOL); + notice( t('Private messages to this group are at risk of public disclosure.') . EOL); + } + } + $o .= ''; $_SESSION['return_url'] = $a->cmd;