Commit 0694185b authored by Maikel's avatar Maikel

I18n: Dutch and German added and various fixes for I18n

parent 4f524709
......@@ -275,22 +275,22 @@ angular.module('whatsspy', ['ngRoute', 'ngVis', 'whatsspyFilters', 'whatsspyCont
$rootScope.accountData[$number.id].pictures = data[0].pictures;
// Setup data structures for the GUI
$rootScope.accountData[$number.id].generated = {};
$rootScope.accountData[$number.id].generated.chart_weekday_status_count_all = $rootScope.setupBarChartData([{key: 'today', id: 'dow', value: 'count', data: data[0].advanced_analytics.weekday_status_today},
{key: '7 days', id: 'dow', value: 'count', data: data[0].advanced_analytics.weekday_status_7day},
{key: '14 days', id: 'dow', value: 'count', data: data[0].advanced_analytics.weekday_status_14day},
{key: 'all time', id: 'dow', value: 'count', data: data[0].advanced_analytics.weekday_status_all}]);
$rootScope.accountData[$number.id].generated.chart_hour_status_count_all = $rootScope.setupBarChartData([{key: 'today', id: 'hour', value: 'count', data: data[0].advanced_analytics.hour_status_today},
{key: '7 days', id: 'hour', value: 'count', data: data[0].advanced_analytics.hour_status_7day},
{key: '14 days', id: 'hour', value: 'count', data: data[0].advanced_analytics.hour_status_14day},
{key: 'all time', id: 'hour', value: 'count', data: data[0].advanced_analytics.hour_status_all}]);
$rootScope.accountData[$number.id].generated.chart_weekday_status_time_all = $rootScope.setupBarChartData([{key: 'today', id: 'dow', value: 'minutes', data: data[0].advanced_analytics.weekday_status_today},
{key: '7 days', id: 'dow', value: 'minutes', data: data[0].advanced_analytics.weekday_status_7day},
{key: '14 days', id: 'dow', value: 'minutes', data: data[0].advanced_analytics.weekday_status_14day},
{key: 'all time', id: 'dow', value: 'minutes', data: data[0].advanced_analytics.weekday_status_all}]);
$rootScope.accountData[$number.id].generated.chart_hour_status_time_all = $rootScope.setupBarChartData([{key: 'today', id: 'hour', value: 'minutes', data: data[0].advanced_analytics.hour_status_today},
{key: '7 days', id: 'hour', value: 'minutes', data: data[0].advanced_analytics.hour_status_7day},
{key: '14 days', id: 'hour', value: 'minutes', data: data[0].advanced_analytics.hour_status_14day},
{key: 'all time', id: 'hour', value: 'minutes', data: data[0].advanced_analytics.hour_status_all}]);
$rootScope.accountData[$number.id].generated.chart_weekday_status_count_all = $rootScope.setupBarChartData([{key: $filter('translate')('STATS_BAR_CHART_TODAY'), id: 'dow', value: 'count', data: data[0].advanced_analytics.weekday_status_today},
{key: $filter('translate')('STATS_BAR_CHART_7DAYS'), id: 'dow', value: 'count', data: data[0].advanced_analytics.weekday_status_7day},
{key: $filter('translate')('STATS_BAR_CHART_14DAYS'), id: 'dow', value: 'count', data: data[0].advanced_analytics.weekday_status_14day},
{key: $filter('translate')('STATS_BAR_CHART_ALLTIME'), id: 'dow', value: 'count', data: data[0].advanced_analytics.weekday_status_all}]);
$rootScope.accountData[$number.id].generated.chart_hour_status_count_all = $rootScope.setupBarChartData([{key: $filter('translate')('STATS_BAR_CHART_TODAY'), id: 'hour', value: 'count', data: data[0].advanced_analytics.hour_status_today},
{key: $filter('translate')('STATS_BAR_CHART_7DAYS'), id: 'hour', value: 'count', data: data[0].advanced_analytics.hour_status_7day},
{key: $filter('translate')('STATS_BAR_CHART_14DAYS'), id: 'hour', value: 'count', data: data[0].advanced_analytics.hour_status_14day},
{key: $filter('translate')('STATS_BAR_CHART_ALLTIME'), id: 'hour', value: 'count', data: data[0].advanced_analytics.hour_status_all}]);
$rootScope.accountData[$number.id].generated.chart_weekday_status_time_all = $rootScope.setupBarChartData([{key: $filter('translate')('STATS_BAR_CHART_TODAY'), id: 'dow', value: 'minutes', data: data[0].advanced_analytics.weekday_status_today},
{key: $filter('translate')('STATS_BAR_CHART_7DAYS'), id: 'dow', value: 'minutes', data: data[0].advanced_analytics.weekday_status_7day},
{key: $filter('translate')('STATS_BAR_CHART_14DAYS'), id: 'dow', value: 'minutes', data: data[0].advanced_analytics.weekday_status_14day},
{key: $filter('translate')('STATS_BAR_CHART_ALLTIME'), id: 'dow', value: 'minutes', data: data[0].advanced_analytics.weekday_status_all}]);
$rootScope.accountData[$number.id].generated.chart_hour_status_time_all = $rootScope.setupBarChartData([{key: $filter('translate')('STATS_BAR_CHART_TODAY'), id: 'hour', value: 'minutes', data: data[0].advanced_analytics.hour_status_today},
{key: $filter('translate')('STATS_BAR_CHART_7DAYS'), id: 'hour', value: 'minutes', data: data[0].advanced_analytics.hour_status_7day},
{key: $filter('translate')('STATS_BAR_CHART_14DAYS'), id: 'hour', value: 'minutes', data: data[0].advanced_analytics.hour_status_14day},
{key: $filter('translate')('STATS_BAR_CHART_ALLTIME'), id: 'hour', value: 'minutes', data: data[0].advanced_analytics.hour_status_all}]);
// Set default view
$rootScope.accountData[$number.id].generated.showHour = false;
$rootScope.accountData[$number.id].generated.showWeekday = true;
......
......@@ -288,7 +288,7 @@ angular.module('whatsspyControllers', [])
// Timeline setup
// Angular-vis.js - This needs to be cleaned
// Angular-vis.js
var graph2d;
......@@ -1304,7 +1304,7 @@ angular.module('whatsspyControllers', [])
// Set default view
$scope.stats.generated.showHour = false;
$scope.stats.generated.showWeekday = true;
$scope.stats.generated.showPieChart = $filter('translate')('STATS_BAR_CHART_TODAY');
$scope.stats.generated.showPieChart = 'today';
}
}
......
......@@ -134,12 +134,12 @@ angular.module('whatsspyFilters', [])
return realGroups;
};
})
.filter('privacy', function () {
.filter('privacy', function (translateFilter) {
return function (value) {
if(value == false) {
return '\'everyone\'';
return '\'' + translateFilter('PRIVACY_STATUS_EVERYONE') + '\'';
} else {
return '\'contacts or nobody\'';
return '\'' + translateFilter('PRIVACY_STATUS_CONTACTS_OR_NOBODY') + '\'';
}
};
})
......
This diff is collapsed.
......@@ -163,23 +163,23 @@
<tbody>
<tr>
<th class="whatsspy-analytics-th-big">{{'OVERVIEW_CONTACT_TABLE_1D' | translate}} </th>
<td>{{accountData[number.id].user.count_1day}} times</td>
<td>{{accountData[number.id].user.count_1day}} {{'OVERVIEW_CONTACT_TIMES' | translate}}</td>
</tr>
<tr>
<th>{{'OVERVIEW_CONTACT_TABLE_7D' | translate}} </th>
<td>{{accountData[number.id].user.count_7day}} times</td>
<td>{{accountData[number.id].user.count_7day}} {{'OVERVIEW_CONTACT_TIMES' | translate}}</td>
</tr>
<tr>
<th>{{'OVERVIEW_CONTACT_TABLE_14D' | translate}} </th>
<td>{{accountData[number.id].user.count_14day}} times</td>
<td>{{accountData[number.id].user.count_14day}} {{'OVERVIEW_CONTACT_TIMES' | translate}}</td>
</tr>
<tr>
<th>{{'OVERVIEW_CONTACT_TABLE_31D' | translate}} </th>
<td>{{accountData[number.id].user.count_31day}} times</td>
<td>{{accountData[number.id].user.count_31day}} {{'OVERVIEW_CONTACT_TIMES' | translate}}</td>
</tr>
<tr>
<th>{{'OVERVIEW_CONTACT_TABLE_xD' | translate}} </th>
<td>{{accountData[number.id].user.count_all}} times</td>
<td>{{accountData[number.id].user.count_all}} {{'OVERVIEW_CONTACT_TIMES' | translate}}</td>
</tr>
</tbody>
</table>
......@@ -376,7 +376,7 @@
<span data-ng-show="number.statusmessage_privacy == true" title="This privacy setting may be contacts or nobody. This can't be detected." class="label label-danger label-full-width">{{'OVERVIEW_PRIVACY_SETTINGS_FRIENDS' | translate}}</span>
<span data-ng-show="number.statusmessage_privacy == false" class="label label-success label-full-width">{{'OVERVIEW_PRIVACY_SETTINGS_PUBLIC' | translate}}</span>
<small><span data-ng-show="accountData[number.id].user.statusmessage_changed_privacy != null">{{'OVERVIEW_PRIVACY_LAST_CHANGE' | translate}} <strong>{{accountData[number.id].user.statusmessage_changed_privacy | privacy}}</strong><br /> at {{accountData[number.id].user.statusmessage_changed_privacy_updated | staticDatetime}}*</span></small>
<small><span data-ng-show="accountData[number.id].user.statusmessage_changed_privacy != null">{{'OVERVIEW_PRIVACY_LAST_CHANGE' | translate}} <strong>{{accountData[number.id].user.statusmessage_changed_privacy | privacy}}</strong><br /> {{'OVERVIEW_PRIVACY_LAST_CHANGE_AT' | translate}} {{accountData[number.id].user.statusmessage_changed_privacy_updated | staticDatetime}}*</span></small>
</td>
</tr>
</tbody>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment