From 3a57c3b6d8c1733fa758f682475c86a561a51f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 16 Jan 2014 20:59:01 -0500 Subject: [PATCH 01/11] removed disabled attrib from reset button --- public/templates/reset_code.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/templates/reset_code.tpl b/public/templates/reset_code.tpl index 6931f6c346..c3590746d4 100644 --- a/public/templates/reset_code.tpl +++ b/public/templates/reset_code.tpl @@ -30,7 +30,7 @@

- + From c1c9438220e5b83c278cda5f2f7823a54e07e88c Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 17 Jan 2014 08:04:23 -0500 Subject: [PATCH 02/11] patching translator to ignore non-js files --- public/src/translator.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/public/src/translator.js b/public/src/translator.js index 8dd8671599..60994696b6 100644 --- a/public/src/translator.js +++ b/public/src/translator.js @@ -177,16 +177,24 @@ isServer = true; var utils = require('./utils.js'), + Meta = require('../../src/meta'), path = require('path'), fs = require('fs'), - Meta = require('../../src/meta'); + winston = require('winston'); - utils.walk(path.join(__dirname, '../../', 'public/language/' + (Meta.config.defaultLang || 'en')), function (err, data) { + utils.walk(path.join(__dirname, '../language', (Meta.config.defaultLang || 'en')), function (err, data) { var loaded = data.length; for (var d in data) { if (data.hasOwnProperty(d)) { - files.loaded[path.basename(data[d]).replace('.json', '')] = require(data[d]); + // Only load .json files + if (path.extname(data[d]) === '.json') { + files.loaded[path.basename(data[d]).replace('.json', '')] = require(data[d]); + } else { + if (process.env.NODE_ENV === 'development') { + winston.warn('[translator] Skipping language file: ' + path.relative(path.join(__dirname, '../language'), data[d])); + } + } } } }); From 14b31cf4c84a448560845935fd90ce6a06367d16 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 17 Jan 2014 08:12:30 -0500 Subject: [PATCH 03/11] hiding fork button on xs/sm devices (default motd) --- src/routes/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api.js b/src/routes/api.js index 0c32a1c435..544eb29c47 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -67,7 +67,7 @@ var path = require('path'), data.motd_class = (parseInt(meta.config.show_motd, 10) === 1 || meta.config.show_motd === undefined) ? '' : ' none'; data.motd_class += (meta.config.motd && meta.config.motd.length > 0 ? '' : ' default'); - data.motd = require('marked')(meta.config.motd || "\n\n# NodeBB v" + pkg.version + "\nWelcome to NodeBB, the discussion platform of the future."); + data.motd = require('marked')(meta.config.motd || "\n\n# NodeBB v" + pkg.version + "\nWelcome to NodeBB, the discussion platform of the future."); res.json(data); }); }); From 45ce0566e7deba7cac5a55af86c8a8344be6e110 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 17 Jan 2014 08:53:23 -0500 Subject: [PATCH 04/11] added translation to default MOTD --- public/language/cs/global.json | 8 +++++++- public/language/de/global.json | 8 +++++++- public/language/en/global.json | 8 +++++++- public/language/es/global.json | 10 ++++++++-- public/language/fr/global.json | 8 +++++++- public/language/it/global.json | 8 +++++++- src/routes/api.js | 15 ++++++++++++++- 7 files changed, 57 insertions(+), 8 deletions(-) diff --git a/public/language/cs/global.json b/public/language/cs/global.json index fae988616c..3c8ac5a7a8 100644 --- a/public/language/cs/global.json +++ b/public/language/cs/global.json @@ -27,5 +27,11 @@ "header.profile": "Můj profil", "notifications.loading": "Načítání upozornění", - "chats.loading": "Načítání grafů" + "chats.loading": "Načítání grafů", + + "motd.welcome": "Vítejte na NodeBB, diskusní platformou budoucnosti.", + "motd.get": "Získat NodeBB", + "motd.fork": "Fork", + "motd.like": "To se mi líbí", + "motd.follow": "Sledovat" } diff --git a/public/language/de/global.json b/public/language/de/global.json index 51dd759117..925597bc57 100644 --- a/public/language/de/global.json +++ b/public/language/de/global.json @@ -27,5 +27,11 @@ "header.profile": "Profil", "notifications.loading": "Benachrichtigungen laden", - "chats.loading": "Nachrichten werden geladen" + "chats.loading": "Nachrichten werden geladen", + + "motd.welcome": "Willkommen auf NodeBB, der Diskussionsplattform der Zukunft.", + "motd.get": "Bekommen NodeBB", + "motd.fork": "Fork", + "motd.like": "Gefällt mir", + "motd.follow": "Folgen" } diff --git a/public/language/en/global.json b/public/language/en/global.json index 7fb54239af..6c41d49b2a 100644 --- a/public/language/en/global.json +++ b/public/language/en/global.json @@ -27,5 +27,11 @@ "header.profile": "Profile", "notifications.loading": "Loading Notifications", - "chats.loading": "Loading Chats" + "chats.loading": "Loading Chats", + + "motd.welcome": "Welcome to NodeBB, the discussion platform of the future.", + "motd.get": "Get NodeBB", + "motd.fork": "Fork", + "motd.like": "Like", + "motd.follow": "Follow" } diff --git a/public/language/es/global.json b/public/language/es/global.json index ab14fef5fd..706e856015 100644 --- a/public/language/es/global.json +++ b/public/language/es/global.json @@ -8,7 +8,7 @@ "404.message": "Al parecer lo que estas buscando no existe. Te recomendamos que vuelvas al inicio.", "500.title": "Error Interno.", "500.message": "Ooops! Algo salio mal!, No te alarmes. Nuestros simios hiperinteligentes lo solucionarán", - + "register": "Registrarse", "login": "Conectarse", @@ -27,5 +27,11 @@ "header.profile": "Perfil", "notifications.loading": "Cargando Notificaciones", - "chats.loading": "Cargando Chats" + "chats.loading": "Cargando Chats", + + "motd.welcome": "Bienvenido a NodeBB, la plataforma de debate sobre el futuro.", + "motd.get": "Obtener", + "motd.fork": "Fork", + "motd.like": "Me gusta", + "motd.follow": "Seguir" } \ No newline at end of file diff --git a/public/language/fr/global.json b/public/language/fr/global.json index e454103779..402f455708 100644 --- a/public/language/fr/global.json +++ b/public/language/fr/global.json @@ -27,5 +27,11 @@ "header.profile": "Profile", "notifications.loading": "Chargement des Notifications", - "chats.loading": "Chargement des Chats" + "chats.loading": "Chargement des Chats", + + "motd.welcome": "Bienvenue à NodeBB, la plate-forme de discussion sur l'avenir.", + "motd.get": "Obtenir NodeBB", + "motd.fork": "Fork", + "motd.like": "J'aime", + "motd.follow": "Suivre" } diff --git a/public/language/it/global.json b/public/language/it/global.json index eefc575898..9a79189a9c 100644 --- a/public/language/it/global.json +++ b/public/language/it/global.json @@ -27,5 +27,11 @@ "header.profile": "Profilo", "notifications.loading": "Caricamento delle Notifiche", - "chats.loading": "Caricamento delle Chat" + "chats.loading": "Caricamento delle Chat", + + "motd.welcome": "Benvenuti al NodeBB, la piattaforma di discussione del futuro.", + "motd.get": "Ottenere NodeBB", + "motd.fork": "Fork", + "motd.like": "Mi piace", + "motd.follow": "Segui" } \ No newline at end of file diff --git a/src/routes/api.js b/src/routes/api.js index 544eb29c47..dd6bdaf757 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -12,6 +12,7 @@ var path = require('path'), categories = require('../categories'), categoryTools = require('../categoryTools') utils = require('../../public/src/utils'), + translator = require('../../public/src/translator'), pkg = require('../../package.json'), meta = require('../meta'); @@ -51,10 +52,12 @@ var path = require('path'), app.get('/home', function (req, res) { var uid = (req.user) ? req.user.uid : 0; categories.getAllCategories(uid, function (err, data) { + // Remove disabled categories data.categories = data.categories.filter(function (category) { return (!category.disabled || parseInt(category.disabled, 10) === 0); }); + // Retrieve category information for / function iterator(category, callback) { categories.getRecentReplies(category.cid, uid, parseInt(category.numRecentReplies, 10), function (err, posts) { category.posts = posts; @@ -64,10 +67,20 @@ var path = require('path'), } async.each(data.categories, iterator, function (err) { + // Assemble the MOTD + var motdString; + if (!meta.config.motd) { + // Construct default MOTD + translator.mget(['global:motd.welcome', 'global:motd.get', 'global:motd.fork', 'global:motd.like', 'global:motd.follow'], function(err, strings) { + motdString = '\n\n# NodeBB v' + pkg.version + '\n' + strings[0]; + }); + } else { + motdString = meta.config.motd; + } data.motd_class = (parseInt(meta.config.show_motd, 10) === 1 || meta.config.show_motd === undefined) ? '' : ' none'; data.motd_class += (meta.config.motd && meta.config.motd.length > 0 ? '' : ' default'); - data.motd = require('marked')(meta.config.motd || "\n\n# NodeBB v" + pkg.version + "\nWelcome to NodeBB, the discussion platform of the future."); + data.motd = require('marked')(motdString); res.json(data); }); }); From 04da0447b5f15e0adbc352e0b33731e2c3cc3f3b Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 17 Jan 2014 08:54:34 -0500 Subject: [PATCH 05/11] fixed global:motd.get in es --- public/language/es/global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/language/es/global.json b/public/language/es/global.json index 706e856015..3df91a2b43 100644 --- a/public/language/es/global.json +++ b/public/language/es/global.json @@ -30,7 +30,7 @@ "chats.loading": "Cargando Chats", "motd.welcome": "Bienvenido a NodeBB, la plataforma de debate sobre el futuro.", - "motd.get": "Obtener", + "motd.get": "Obtener NodeBB", "motd.fork": "Fork", "motd.like": "Me gusta", "motd.follow": "Seguir" From 2b32ede4d83242231fd01297b9137ea1391a0d94 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 17 Jan 2014 09:09:43 -0500 Subject: [PATCH 06/11] fixed czech welcome message --- public/language/cs/global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/language/cs/global.json b/public/language/cs/global.json index 3c8ac5a7a8..c1157a6ab3 100644 --- a/public/language/cs/global.json +++ b/public/language/cs/global.json @@ -29,7 +29,7 @@ "notifications.loading": "Načítání upozornění", "chats.loading": "Načítání grafů", - "motd.welcome": "Vítejte na NodeBB, diskusní platformou budoucnosti.", + "motd.welcome": "Vítejte na NodeBB, diskusní platforma buducnosti.", "motd.get": "Získat NodeBB", "motd.fork": "Fork", "motd.like": "To se mi líbí", From cfbbc238f6b952a7f8f1cf5254549ccd4f12070f Mon Sep 17 00:00:00 2001 From: TedVJ Date: Fri, 17 Jan 2014 16:16:51 +0100 Subject: [PATCH 07/11] Fr Translation Update --- public/language/fr/footer.json | 2 +- public/language/fr/recent.json | 2 +- public/language/fr/register.json | 2 +- public/language/fr/topic.json | 9 +++++++ public/language/fr/unread.json | 2 +- public/language/fr/user.json | 45 ++++++++++++++++++-------------- public/language/fr/users.json | 2 +- 7 files changed, 39 insertions(+), 25 deletions(-) diff --git a/public/language/fr/footer.json b/public/language/fr/footer.json index c04de317bf..ef52f1c9a0 100644 --- a/public/language/fr/footer.json +++ b/public/language/fr/footer.json @@ -1,5 +1,5 @@ { - "stats.online": "Online", + "stats.online": "En ligne", "stats.users": "Utilisateurs", "stats.topics": "Sujets", "stats.posts": "Message", diff --git a/public/language/fr/recent.json b/public/language/fr/recent.json index 4f7d7c96cc..ea1572171a 100644 --- a/public/language/fr/recent.json +++ b/public/language/fr/recent.json @@ -2,4 +2,4 @@ "day": "Jour", "week": "Semaine", "month": "Mois" -} +} \ No newline at end of file diff --git a/public/language/fr/register.json b/public/language/fr/register.json index bfb58f76e9..11e52e0f8d 100644 --- a/public/language/fr/register.json +++ b/public/language/fr/register.json @@ -13,4 +13,4 @@ "confirm_password_placeholder": "Confirmer le Mot de passe", "register_now_button": "S'enregistrer maintenant", "alternative_registration": "Enregistrement Alternatif" -} +} \ No newline at end of file diff --git a/public/language/fr/topic.json b/public/language/fr/topic.json index 0a54e8bdb9..3e81864e56 100644 --- a/public/language/fr/topic.json +++ b/public/language/fr/topic.json @@ -12,6 +12,8 @@ "reply": "Répondre", "edit": "Editer", "delete": "Supprimer", + "move": "Déplacer", + "fork": "Scinder", "banned": "bannir", "link": "Lien", @@ -19,11 +21,13 @@ "thread_tools.pin": "Epingler le fil", "thread_tools.lock": "Verrouiller le fil", "thread_tools.move": "Déplacer le fil", + "thread_tools.fork": "Scinder le fil", "thread_tools.delete": "Supprimer le fil", "load_categories": "Chargement des Categories", "disabled_categories_note": "Les Catégories Désactivées sont grisées", "confirm_move": "Déplacer", + "confirm_fork": "Scinder", "favourite": "Favoris", "favourites": "Favoris", @@ -34,7 +38,12 @@ "posted_by": "posté par", "loading_more_posts": "Chargement d'autres Messages", "move_topic": "Déplacer le Sujet", + "move_post": "Déplacer le Post", + "fork_topic": "Scinder le Topic", "topic_will_be_moved_to": "Ce sujet sera déplacé vers la catégorie", + "fork_topic_instruction": "Cliquer sur les postes à scinder", + "fork_no_pids": "Aucun poste sélectionné!", + "fork_success": "Topic scinder!", "reputation": "réputation", "posts": "messages" diff --git a/public/language/fr/unread.json b/public/language/fr/unread.json index 78f51ce820..26dbd6fa29 100644 --- a/public/language/fr/unread.json +++ b/public/language/fr/unread.json @@ -2,4 +2,4 @@ "no_unread_topics": "Aucun sujet non lu.", "mark_all_read": "Marquer tout comme lu", "load_more": "Charger la suite" -} +} \ No newline at end of file diff --git a/public/language/fr/user.json b/public/language/fr/user.json index faa9883d47..f2d769e374 100644 --- a/public/language/fr/user.json +++ b/public/language/fr/user.json @@ -1,36 +1,41 @@ { "banned": "Banni", "offline": "Hors-ligne", - "email": "email", + "username": "Nom d'utilisateur", + "email": "Email", "fullname": "Nom", "website": "Site Web", "location": "Emplacement", - "age": "age", - "joined": "adhésion", - "profil_views": "vues du profil", - "reputation": "réputation", - "posts": "messages", - "followers": "suiveurs", - "following": "suivis", - "signature": "signature", - "gravatar": "gravatar", - "birthday": "anniversaire", + "age": "Age", + "joined": "Adhésion", + "lastonline": "Dernière Connection", + "profil_views": "Vues du profil", + "reputation": "Réputation", + "posts": "Messages", + "followers": "Suiveurs", + "following": "Suivis", + "signature": "Signature", + "gravatar": "Gravatar", + "birthday": "Anniversaire", - "change_picture": "changer d'image", - "edit": "editer", - "uploaded_picture": "images uploadées", - "upload_new_picture": "uploader une nouvelle image", - "change_password": "chnger le mot de passe", - "confirm_password": "confirmer le mot de passe", - "password": "mot de passe", + "change_picture": "Changer d'image", + "edit": "Editer", + "uploaded_picture": "Images uploadées", + "upload_new_picture": "Uploader une nouvelle image", + "change_password": "Changer le mot de passe", + "confirm_password": "Confirmer le mot de passe", + "password": "Mot de passe", "upload_picture": "Uploader un image", "upload_a_picture": "Uploader un image", "image_spec": "Vous pouvez uploader seulement des fichiers de types PNG, JPG, ou GIF en dessous de 256kb.", "settings": "paramètres", - "show_my_email": "montrer mon email", + "show_my_email": "Montrer mon email", "has_no_follower": "Cet utilisateur n'a aucun suiver :(", - "follows_no_one": "Cet utilisateur ne suit personne :(" + "follows_no_one": "Cet utilisateur ne suit personne :(", + + "email_hidden": "Email masqué", + "hidden": "masqué" } diff --git a/public/language/fr/users.json b/public/language/fr/users.json index 8cab0e5298..a7e12194f7 100644 --- a/public/language/fr/users.json +++ b/public/language/fr/users.json @@ -6,4 +6,4 @@ "search": "Rechercher", "enter_username": "Entrer un nom d'utilisateur pour rechercher", "load_more": "Charger la suite" -} +} \ No newline at end of file From f63ab0faebf6375044d52f54d84fcb030291e8a8 Mon Sep 17 00:00:00 2001 From: TedVJ Date: Fri, 17 Jan 2014 16:35:32 +0100 Subject: [PATCH 08/11] Fr Translation update #2 --- public/language/fr/global.json | 2 +- public/language/fr/register.json | 2 +- public/language/fr/reset_password.json | 2 +- public/language/fr/topic.json | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/language/fr/global.json b/public/language/fr/global.json index 402f455708..a96f73d703 100644 --- a/public/language/fr/global.json +++ b/public/language/fr/global.json @@ -29,7 +29,7 @@ "notifications.loading": "Chargement des Notifications", "chats.loading": "Chargement des Chats", - "motd.welcome": "Bienvenue à NodeBB, la plate-forme de discussion sur l'avenir.", + "motd.welcome": "Bienvenue sur NodeBB, la plate-forme de discussion de l'avenir.", "motd.get": "Obtenir NodeBB", "motd.fork": "Fork", "motd.like": "J'aime", diff --git a/public/language/fr/register.json b/public/language/fr/register.json index 11e52e0f8d..33c735a046 100644 --- a/public/language/fr/register.json +++ b/public/language/fr/register.json @@ -6,7 +6,7 @@ "email_address": "Adresse Email", "email_address_placeholder": "Entrer l'addresse Email", "username": "Nom d'utilisateur", - "username_placeholder": "Entré le Nom d'utilisateur", + "username_placeholder": "Entrer le Nom d'utilisateur", "password": "Mot de passe", "password_placeholder": "Entrer le Mot de passe", "confirm_password": "Confirmer le Mot de passe", diff --git a/public/language/fr/reset_password.json b/public/language/fr/reset_password.json index 76b5724528..8c1c234d9b 100644 --- a/public/language/fr/reset_password.json +++ b/public/language/fr/reset_password.json @@ -4,7 +4,7 @@ "password_changed.title": "Mot de passe modifié", "password_changed.message": "

Mot de passe réinitialisé avec succès, veuillez vous reconnecter.", "wrong_reset_code.title": "Code de Réinisialisation Incorrect", - "wrong_reset_code.message": "Le Code de Réinisialisation est Incorrect. Veillez réessayer, ou demander un nouveau Code de Réinisialisation.", + "wrong_reset_code.message": "Le Code de Réinisialisation est Incorrect. Veuillez réessayer, ou demander un nouveau Code de Réinisialisation.", "new_password": "Nouveau Mot de passe", "repeat_password": "Confirmer le Mot de passe", "enter_email": "Veuillez entrer votre adresse email et vous recevrez un email avec les instruction pour réinitialiser votre compte.", diff --git a/public/language/fr/topic.json b/public/language/fr/topic.json index 3e81864e56..f430fb2dd5 100644 --- a/public/language/fr/topic.json +++ b/public/language/fr/topic.json @@ -5,7 +5,7 @@ "no_topics_found": "Aucun sujet trouvé!", "profile": "Profile", - "posted_by": "Envoyé by", + "posted_by": "Envoyé par", "chat": "Chat", "notify_me": "Être notifié des réponses dans ce sujet", "quote": "Citer", @@ -14,7 +14,7 @@ "delete": "Supprimer", "move": "Déplacer", "fork": "Scinder", - "banned": "bannir", + "banned": "bannis", "link": "Lien", "thread_tools.title": "Outils du Fil", @@ -45,6 +45,6 @@ "fork_no_pids": "Aucun poste sélectionné!", "fork_success": "Topic scinder!", - "reputation": "réputation", - "posts": "messages" + "reputation": "Réputation", + "posts": "Messages" } From 27762c2ab9d3031cada3be0b12fffb8afa6ee2b9 Mon Sep 17 00:00:00 2001 From: TedVJ Date: Fri, 17 Jan 2014 16:41:04 +0100 Subject: [PATCH 09/11] Fr Translation update #3 --- public/language/fr/user.json | 6 +++--- public/language/fr/users.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/language/fr/user.json b/public/language/fr/user.json index f2d769e374..f5fe4e38ab 100644 --- a/public/language/fr/user.json +++ b/public/language/fr/user.json @@ -26,14 +26,14 @@ "confirm_password": "Confirmer le mot de passe", "password": "Mot de passe", - "upload_picture": "Uploader un image", - "upload_a_picture": "Uploader un image", + "upload_picture": "Uploader une image", + "upload_a_picture": "Uploader une image", "image_spec": "Vous pouvez uploader seulement des fichiers de types PNG, JPG, ou GIF en dessous de 256kb.", "settings": "paramètres", "show_my_email": "Montrer mon email", - "has_no_follower": "Cet utilisateur n'a aucun suiver :(", + "has_no_follower": "Cet utilisateur n'a aucun suiveur :(", "follows_no_one": "Cet utilisateur ne suit personne :(", "email_hidden": "Email masqué", diff --git a/public/language/fr/users.json b/public/language/fr/users.json index a7e12194f7..da752d66d5 100644 --- a/public/language/fr/users.json +++ b/public/language/fr/users.json @@ -1,9 +1,9 @@ { "latest_users": "Derniers Utilisateurs", - "top_posters": "Meilleurs Publieur", + "top_posters": "Meilleurs Publieurs", "most_reputation": "Meilleur Réputation", "online": "En Ligne", "search": "Rechercher", "enter_username": "Entrer un nom d'utilisateur pour rechercher", "load_more": "Charger la suite" -} \ No newline at end of file +} From 5e695d32227a08b388c9fb4dfd62b53819ccbf4a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 17 Jan 2014 12:02:12 -0500 Subject: [PATCH 10/11] fixed incorrect language string used in fb button in default motd --- src/routes/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api.js b/src/routes/api.js index dd6bdaf757..44a155370f 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -72,7 +72,7 @@ var path = require('path'), if (!meta.config.motd) { // Construct default MOTD translator.mget(['global:motd.welcome', 'global:motd.get', 'global:motd.fork', 'global:motd.like', 'global:motd.follow'], function(err, strings) { - motdString = '

\n\n# NodeBB v' + pkg.version + '\n' + strings[0]; + motdString = '\n\n# NodeBB v' + pkg.version + '\n' + strings[0]; }); } else { motdString = meta.config.motd; From 727ad4b65139bf9bcb7d52f98e6cd6e6142aa364 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 17 Jan 2014 12:07:33 -0500 Subject: [PATCH 11/11] added cache buster to nodebb.min.js even if it has not changed --- src/meta.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/meta.js b/src/meta.js index 8af0917d8c..f161cfeb2f 100644 --- a/src/meta.js +++ b/src/meta.js @@ -239,12 +239,12 @@ var fs = require('fs'), async.parallel({ mtime: function (next) { async.map(jsPaths, fs.stat, function (err, stats) { - async.reduce(stats, 0, function (memo, item, callback) { + async.reduce(stats, 0, function (memo, item, next) { if(item) { mtime = +new Date(item.mtime); - callback(null, mtime > memo ? mtime : memo); + next(null, mtime > memo ? mtime : memo); } else { - callback(null, memo); + next(null, memo); } }, next); }); @@ -262,7 +262,7 @@ var fs = require('fs'), }, function (err, results) { if (results.minFile > results.mtime) { winston.info('No changes to client-side libraries -- skipping minification'); - callback(null, [path.relative(path.join(__dirname, '../public'), Meta.js.minFile)]); + callback(null, [path.relative(path.join(__dirname, '../public'), Meta.js.minFile) + (meta.config['cache-buster'] ? '?v=' + meta.config['cache-buster'] : '')]); } else { Meta.js.minify(function () { callback(null, [