From 52eb8e307c58f8d9da0b8e3fe950387ab0d65cfc Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 10 Jul 2017 10:59:32 +0200 Subject: [PATCH 1/2] feedback for language used --- customize.dist/messages.js | 1 + www/common/cryptpad-common.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/customize.dist/messages.js b/customize.dist/messages.js index 67759a15e..216dd4bbe 100644 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -46,6 +46,7 @@ define(req, function($, Default, Language) { } messages._languages = map; + messages._languageUsed = language; messages._checkTranslationState = function (cb) { if (typeof(cb) !== "function") { return; } diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index d8547d4a4..cbc04c118 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -188,6 +188,9 @@ define([ var w = window.innerWidth; feedback('DIMENSIONS:' + h + 'x' + w); }; + common.reportLanguage = function () { + feedback('LANG_' + Messages._languageUsed); + }; common.getUid = function () { if (store && store.getProxy() && store.getProxy().proxy) { @@ -1722,6 +1725,7 @@ define([ } common.reportScreenDimensions(); + common.reportLanguage(); $(function() { // Race condition : if document.body is undefined when alertify.js is loaded, Alertify From e10de1219bc0052a842043a707f15a4e290270c5 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 10 Jul 2017 11:13:56 +0200 Subject: [PATCH 2/2] feedback on view hash usage --- www/common/cryptpad-common.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index cbc04c118..4495cf619 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -180,7 +180,11 @@ define([ common.reportAppUsage = function () { var pattern = window.location.pathname.split('/') .filter(function (x) { return x; }).join('.'); - feedback(pattern); + if (/^#\/1\/view\//.test(window.location.hash)) { + feedback(pattern + '_VIEW'); + } else { + feedback(pattern); + } }; common.reportScreenDimensions = function () {