/* jshint sub: true */

lang["fr"] = {
    unknownMember: "Utilisateur inconnu",
    unknownChannel: "Channel inconnu",
    newMessage: "Nouveau message",
    message: "Message",
    netErrorShort: "Reseau",
    onlyVisible: "(visible seulement par vous)",

    starred: "Favoris",
    channels: "Discutions",
    privateMessageRoom: "Discutions privées",

    shareYourLocation: "Partage sa position GPS",

    ok: "Ok",
    dissmiss: "Annuler",

    formatDate: function(ts) {
        if (typeof(ts) !== "string")
            ts = parseFloat(ts);
        var today = new Date(),
            yesterday = new Date(),
            dateObj = new Date(ts);

        today.setHours(0, 0, 0, 0);
        yesterday.setTime(today.getTime());
        yesterday.setDate(yesterday.getDate() -1);

        if (dateObj.getTime() > today.getTime()) {
            // Today time
            return dateObj.toLocaleTimeString();
        }
        if (dateObj.getTime() > yesterday.getTime()) {
            return "hier, " +dateObj.toLocaleTimeString();
        }
        return dateObj.toLocaleString();
    },

    dom: {
        "fileUploadCancel": "Annuler",
        "neterror": "Impossible de se connecter au chat !"
    }
};

lang["fr"].edited = function(ts) {
    return "(edit&eacute; " +lang["fr"].formatDate(ts) +")";
};

