Browse Source

Merge branch 'master' into roster_refactor

JC Brand 10 năm trước cách đây
mục cha
commit
aa3de742c0

+ 4 - 3
converse.js

@@ -248,6 +248,7 @@
             message_carbons: false,
             no_trimming: false, // Set to true for phantomjs tests (where browser apparently has no width)
             play_sounds: false,
+            sounds_path: '/sounds/',
             password: undefined,
             authentication: 'login', // Available values are "login", "prebind", "anonymous".
             prebind: false, // XXX: Deprecated, use "authentication" instead.
@@ -353,11 +354,11 @@
         this.playNotification = function () {
             var audio;
             if (converse.play_sounds && typeof Audio !== "undefined"){
-                audio = new Audio("/sounds/msg_received.ogg");
+                audio = new Audio(converse.sounds_path+"msg_received.ogg");
                 if (audio.canPlayType('/audio/ogg')) {
                     audio.play();
                 } else {
-                    audio = new Audio("/sounds/msg_received.mp3");
+                    audio = new Audio(converse.sounds_path+"msg_received.mp3");
                     audio.play();
                 }
             }
@@ -1711,7 +1712,7 @@
                             $('<li class="found-user"></li>')
                             .append(
                                 $('<a class="subscribe-to-user" href="#" title="'+__('Click to add as a chat contact')+'"></a>')
-                                .attr('data-recipient', Strophe.escapeNode(obj.id)+'@'+converse.domain)
+                                .attr('data-recipient', Strophe.getNodeFromJid(obj.id)+"@"+Strophe.getDomainFromJid(obj.id))
                                 .text(obj.fullname)
                             )
                         );

+ 4 - 0
docs/CHANGES.rst

@@ -6,9 +6,13 @@ Changelog
 
 * Add the ability to log in anonymously. [jcbrand]
 * Add the ability to log in automatically. [jcbrand]
+* #344 Enable the path to the sound files to be configured [thierrytiti and jcbrand]
 * #370 Unable to register a new user to ejabberd 2.1.11. [gbonvehi]
 * #372 Some offline users have a visible empty <dd> in the roster. [floriancargoet]
 * #374 Fix collapsed group visibility on page load. [floriancargoet]
+* #378 Expect full JIDs to be returned via XHR user search [thierrytiti]
+* #379 Updated French translations [thierrytiti]
+* #379 Fix for bower not finding crypto-js-evanvosberg#3.1.2-5 any more. [jcbrand]
 
 0.9.2 (2015-04-09)
 ------------------

+ 19 - 13
docs/source/configuration.rst

@@ -70,7 +70,7 @@ A JID (jabber ID), SID (session ID) and RID (Request ID).
 Converse.js needs these tokens in order to attach to that same session.
 
 There are two complementary configuration settings to ``prebind``.
-They are :ref:`keepalive` and :ref:`prebind_url`.
+They are :ref:`keepalive` and `prebind_url`_.
 
 ``keepalive`` can be used keep the session alive without having to pass in
 new RID and SID tokens to ``converse.initialize`` every time you reload the page.
@@ -78,7 +78,7 @@ This removes the need to set up a new BOSH session every time a page loads.
 You do however still need to supply the user's JID so that converse.js can be
 sure that the session it's resuming is for the right user.
 
-``prebind_url`` lets you specify a URL which converse.js will call whenever a
+`prebind_url`_ lets you specify a URL which converse.js will call whenever a
 new BOSH session needs to be set up.
 
 Here's an example of converse.js being initialized with these three options:
@@ -370,17 +370,12 @@ play_sounds
 Plays a notification sound when you receive a personal message or when your
 nickname is mentioned in a chat room.
 
-Inside the ``./sounds`` directory of the Converse.js repo, you'll see MP3 and Ogg
+Inside the ``./sounds`` directory of the Converse.js repo you'll see MP3 and Ogg
 formatted sound files. We need both, because neither format is supported by all browsers.
 
-Sound files are looked up by convention, not configuration. So to have
-a sound play when a message is received, make sure that your webserver serves
-it in both formats as ``http://yoursite.com/sounds/msg_received.mp3`` and
-``http://yoursite.com/sounds/msg_received.ogg``.
+You can set the URL where the sound files are hosted with the `sounds_path`_
+option.
 
-``http://yoursite.com`` should of course be your site's URL.
-
-.. _`prebind_url`:
 
 prebind_url
 -----------
@@ -449,6 +444,18 @@ show_only_online_users
 If set to ``true``, only online users will be shown in the contacts roster.
 Users with any other status (e.g. away, busy etc.) will not be shown.
 
+sounds_path
+-----------
+
+* Default: ``/sounds/``
+
+This option only makes sense in conjunction with the `play_sounds`_ option and
+specifies the URL of the sound files to be played (exluding the file names
+themselves).
+
+In order to support all browsers we need both an MP3 and an Ogg file. Make sure
+to name your files ``msg_received.ogg`` and ``msg_received.mp3``.
+
 storage
 -------
 
@@ -610,8 +617,7 @@ xhr_user_search_url
 
 Used only in conjunction with ``xhr_user_search``.
 
-This is the URL to which an AJAX GET request will be made to fetch user data from your remote server.
+This is the URL to which an XHR GET request will be made to fetch user data from your remote server.
 The query string will be included in the request with ``q`` as its key.
 
-The calendar can be configured through a `data-pat-calendar` attribute.
-The available options are:
+The data returned must be a JSON encoded list of user JIDs.

+ 6 - 6
docs/source/development.rst

@@ -278,11 +278,11 @@ Add a contact.
 
 Provide the JID of the contact you want to add::
 
-    converse.chats.add('buddy@example.com')
+    converse.contacts.add('buddy@example.com')
     
-You may also provide the fullname. If not present, we use the jid as fullname.
+You may also provide the fullname. If not present, we use the jid as fullname::
 
-    converse.chats.add('buddy@example.com', 'Buddy')
+    converse.contacts.add('buddy@example.com', 'Buddy')
 
 "chats" grouping
 ----------------
@@ -371,11 +371,11 @@ To open a single multi user chat box, provide the JID of the room::
 
     converse.rooms.open('group@muc.example.com')
 
-To return an array of chat boxes, provide an array of JIDs::
+To return an array of rooms, provide an array of room JIDs::
 
-    converse.chats.open(['group1@muc.example.com', 'group2@muc.example.com'])
+    converse.rooms.open(['group1@muc.example.com', 'group2@muc.example.com'])
 
-To setup a custom nickname when joining the room, provide the optionnal nick argument::
+To setup a custom nickname when joining the room, provide the optional nick argument::
 
     converse.rooms.open('group@muc.example.com', 'mycustomnick')
 

+ 51 - 31
locale/fr/LC_MESSAGES/converse.json

@@ -13,39 +13,47 @@
          ],
          "unencrypted": [
             null,
-            ""
+            "non crypté"
          ],
          "unverified": [
             null,
-            ""
+            "non vérifié"
          ],
          "verified": [
             null,
-            ""
+            "vérifié"
          ],
          "finished": [
             null,
-            ""
+            "terminé"
          ],
          "This contact is busy": [
             null,
-            ""
+            "Ce contact est occupé"
          ],
          "This contact is online": [
             null,
-            ""
+            "Ce contact est connecté"
          ],
          "This contact is offline": [
             null,
-            ""
+            "Ce contact est déconnecté"
+         ],
+         "This contact is unavailable": [
+            null,
+            "Ce contact est indisponible"
          ],
          "This contact is away for an extended period": [
             null,
-            ""
+            "Ce contact est absent"
          ],
          "This contact is away": [
             null,
-            ""
+            "Ce contact est absent"
+         ],
+         "Click to hide these contacts": [
+            null,
+            "Cliquez pour cacher ces contacts"
          ],
          "My contacts": [
             null,
@@ -61,7 +69,7 @@
          ],
          "Ungrouped": [
             null,
-            ""
+            "Sans groupe"
          ],
          "Contacts": [
             null,
@@ -69,7 +77,7 @@
          ],
          "Groups": [
             null,
-            ""
+            "Groupes"
          ],
          "Error": [
             null,
@@ -77,7 +85,7 @@
          ],
          "Connecting": [
             null,
-            "Connection"
+            "Connexion"
          ],
          "Authenticating": [
             null,
@@ -89,47 +97,51 @@
          ],
          "Re-establishing encrypted session": [
             null,
-            ""
+            "Rétablissement de la session encryptée"
          ],
          "Generating private key.": [
             null,
-            ""
+            "Génération de la clé privée"
          ],
          "Your browser might become unresponsive.": [
             null,
-            ""
+            "Votre navigateur pourrait ne plus répondre"
          ],
          "Authentication request from %1$s\n\nYour chat contact is attempting to verify your identity, by asking you the question below.\n\n%2$s": [
             null,
-            ""
+            "Demande d'authtification de %1$s\n\nVotre contact tente de vérifier votre identité, en vous posant la question ci-dessous.\n\n%2$s"
          ],
          "Could not verify this user's identify.": [
             null,
-            ""
+            "L'identité de cet utilisateur ne peut pas être vérifiée"
          ],
          "Exchanging private key with contact.": [
             null,
-            ""
+            "Échange de clé privée avec le contact"
          ],
          "Personal message": [
             null,
             "Message personnel"
          ],
+         "Are you sure you want to clear the messages from this room?": [
+            null,
+            "Etes-vous sûr de vouloir supprimer les messages de ce salon ?"
+         ],
          "me": [
             null,
-            ""
+            "moi"
          ],
          "is typing": [
             null,
-            ""
+            "écrit"
          ],
          "has stopped typing": [
             null,
-            ""
+            "a arrêté d'écrire"
          ],
          "has gone away": [
             null,
-            ""
+            "est parti"
          ],
          "Show this menu": [
             null,
@@ -145,19 +157,19 @@
          ],
          "Are you sure you want to clear the messages from this chat box?": [
             null,
-            ""
+            "Etes-vous sûr de vouloir supprimer les messages de cette conversation?"
          ],
          "Your message could not be sent": [
             null,
-            ""
+            "Votre message ne peut pas être envoyé"
          ],
          "We received an unencrypted message": [
             null,
-            ""
+            "Un message non crypté a été reçu"
          ],
          "We received an unreadable encrypted message": [
             null,
-            ""
+            "Un message crypté illisible a été reçu"
          ],
          "Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.": [
             null,
@@ -181,7 +193,11 @@
          ],
          "has gone offline": [
             null,
-            ""
+            "est déconnecté"
+         ],
+         "is busy": [
+            null,
+            "est occupé"
          ],
          "Your messages are not encrypted anymore": [
             null,
@@ -221,7 +237,7 @@
          ],
          "Hide the list of participants": [
             null,
-            ""
+            "Cacher la liste des participants"
          ],
          "Refresh encrypted conversation": [
             null,
@@ -229,7 +245,7 @@
          ],
          "Start a call": [
             null,
-            ""
+            "Démarrer un appel"
          ],
          "Start encrypted conversation": [
             null,
@@ -263,6 +279,10 @@
             null,
             "Déconnecté"
          ],
+         "Log out": [
+            null,
+            "Se déconnecter"
+         ],
          "Contact name": [
             null,
             "Nom du contact"
@@ -293,11 +313,11 @@
          ],
          "Click to add as a chat contact": [
             null,
-            "Cliquer pour ajouter aux contacts de chat"
+            "Cliquer pour ajouter aux contacts"
          ],
          "Room name": [
             null,
-            "Numéro de salon"
+            "Nom du salon"
          ],
          "Nickname": [
             null,

+ 43 - 42
locale/fr/LC_MESSAGES/converse.po

@@ -26,49 +26,47 @@ msgstr ""
 
 #: converse.js:312
 msgid "unencrypted"
-msgstr ""
+msgstr "non crypté"
 
 #: converse.js:313
 msgid "unverified"
-msgstr ""
+msgstr "non vérifié"
 
 #: converse.js:314
 msgid "verified"
-msgstr ""
+msgstr "vérifié"
 
 #: converse.js:315
 msgid "finished"
-msgstr ""
+msgstr "terminé"
 
 #: converse.js:318
 msgid "This contact is busy"
-msgstr ""
+msgstr "Ce contact est occupé"
 
 #: converse.js:319
 msgid "This contact is online"
-msgstr ""
+msgstr "Ce contact est connecté"
 
 #: converse.js:320
 msgid "This contact is offline"
-msgstr ""
+msgstr "Ce contact est déconnecté"
 
 #: converse.js:321
-#, fuzzy
 msgid "This contact is unavailable"
-msgstr "Ce salon affiche maintenant des membres indisponibles"
+msgstr "Ce contact est indisponible"
 
 #: converse.js:322
 msgid "This contact is away for an extended period"
-msgstr ""
+msgstr "Ce contact est absent"
 
 #: converse.js:323
 msgid "This contact is away"
-msgstr ""
+msgstr "Ce contact est absent"
 
 #: converse.js:325
-#, fuzzy
 msgid "Click to hide these contacts"
-msgstr "Cliquez pour supprimer ce contact"
+msgstr "Cliquez pour cacher ces contacts"
 
 #: converse.js:327
 msgid "My contacts"
@@ -84,7 +82,7 @@ msgstr "Demandes de contacts"
 
 #: converse.js:330
 msgid "Ungrouped"
-msgstr ""
+msgstr "Sans groupe"
 
 #: converse.js:332 converse.js:629 converse.js:672
 msgid "Contacts"
@@ -92,12 +90,12 @@ msgstr "Contacts"
 
 #: converse.js:333
 msgid "Groups"
-msgstr ""
+msgstr "Groupes"
 
 #: converse.js:433
 #, fuzzy
 msgid "Reconnecting"
-msgstr "Connection"
+msgstr "En cours de connexion"
 
 #: converse.js:476
 msgid "Error"
@@ -105,7 +103,7 @@ msgstr "Erreur"
 
 #: converse.js:478
 msgid "Connecting"
-msgstr "Connection"
+msgstr "Connexion"
 
 #: converse.js:480
 msgid "Authenticating"
@@ -117,15 +115,15 @@ msgstr "L'authentification a échoué"
 
 #: converse.js:788
 msgid "Re-establishing encrypted session"
-msgstr ""
+msgstr "Rétablissement de la session encryptée"
 
 #: converse.js:800
 msgid "Generating private key."
-msgstr ""
+msgstr "Génération de la clé privée"
 
 #: converse.js:801
 msgid "Your browser might become unresponsive."
-msgstr ""
+msgstr "Votre navigateur pourrait ne plus répondre"
 
 #: converse.js:836
 msgid ""
@@ -136,39 +134,44 @@ msgid ""
 "\n"
 "%2$s"
 msgstr ""
+"Demande d'authtification de %1$s\n"
+"\n"
+"Votre contact tente de vérifier votre identité, en vous posant "
+"la question ci-dessous.\n"
+"\n"
+"%2$s"
 
 #: converse.js:845
 msgid "Could not verify this user's identify."
-msgstr ""
+msgstr "L'identité de cet utilisateur ne peut pas être vérifiée"
 
 #: converse.js:884
 msgid "Exchanging private key with contact."
-msgstr ""
+msgstr "Échange de clé privée avec le contact"
 
 #: converse.js:1030
 msgid "Personal message"
 msgstr "Message personnel"
 
 #: converse.js:1062
-#, fuzzy
 msgid "Are you sure you want to clear the messages from this room?"
-msgstr "Vous n'êtes pas dans la liste des membres de ce salon"
+msgstr "Etes-vous sûr de vouloir supprimer les messages de ce salon ?"
 
 #: converse.js:1084
 msgid "me"
-msgstr ""
+msgstr "moi"
 
 #: converse.js:1139
 msgid "is typing"
-msgstr ""
+msgstr "écrit"
 
 #: converse.js:1142
 msgid "has stopped typing"
-msgstr ""
+msgstr "a arrêté d'écrire"
 
 #: converse.js:1148 converse.js:1428
 msgid "has gone away"
-msgstr ""
+msgstr "est parti"
 
 #: converse.js:1193 converse.js:2512
 msgid "Show this menu"
@@ -184,19 +187,19 @@ msgstr "Effacer les messages"
 
 #: converse.js:1321
 msgid "Are you sure you want to clear the messages from this chat box?"
-msgstr ""
+msgstr "Etes-vous sûr de vouloir supprimer les messages de cette conversation?"
 
 #: converse.js:1356
 msgid "Your message could not be sent"
-msgstr ""
+msgstr "Votre message ne peut pas être envoyé"
 
 #: converse.js:1359
 msgid "We received an unencrypted message"
-msgstr ""
+msgstr "Un message non crypté a été reçu"
 
 #: converse.js:1362
 msgid "We received an unreadable encrypted message"
-msgstr ""
+msgstr "Un message crypté illisible a été reçu"
 
 #: converse.js:1388
 msgid ""
@@ -234,12 +237,11 @@ msgstr ""
 
 #: converse.js:1426
 msgid "has gone offline"
-msgstr ""
+msgstr "est déconnecté"
 
 #: converse.js:1430
-#, fuzzy
 msgid "is busy"
-msgstr "occupé"
+msgstr "est occupé"
 
 #: converse.js:1517
 msgid "Your messages are not encrypted anymore"
@@ -280,7 +282,7 @@ msgstr ""
 #: converse.js:1548
 #, fuzzy
 msgid "Clear all messages"
-msgstr "Message personnel"
+msgstr "Supprimer tous les messages"
 
 #: converse.js:1549
 msgid "End encrypted conversation"
@@ -288,7 +290,7 @@ msgstr ""
 
 #: converse.js:1550
 msgid "Hide the list of participants"
-msgstr ""
+msgstr "Cacher la liste des participants"
 
 #: converse.js:1551
 msgid "Refresh encrypted conversation"
@@ -296,7 +298,7 @@ msgstr ""
 
 #: converse.js:1552
 msgid "Start a call"
-msgstr ""
+msgstr "Démarrer un appel"
 
 #: converse.js:1553
 msgid "Start encrypted conversation"
@@ -331,9 +333,8 @@ msgid "Offline"
 msgstr "Déconnecté"
 
 #: converse.js:1652
-#, fuzzy
 msgid "Log out"
-msgstr "Se connecter"
+msgstr "Se connecter"
 
 #: converse.js:1658
 msgid "Contact name"
@@ -365,11 +366,11 @@ msgstr "Aucun utilisateur trouvé"
 
 #: converse.js:1700
 msgid "Click to add as a chat contact"
-msgstr "Cliquer pour ajouter aux contacts de chat"
+msgstr "Cliquer pour ajouter aux contacts"
 
 #: converse.js:1765
 msgid "Room name"
-msgstr "Numéro de salon"
+msgstr "Nom du salon"
 
 #: converse.js:1766
 msgid "Nickname"