Merge pull request #172 from alberanid/master

update libraries and i18n
This commit is contained in:
Davide Alberani 2017-04-03 19:51:48 +02:00 committed by GitHub
commit 4f7d8fcacf
9 changed files with 2218 additions and 1216 deletions

View file

@ -222,6 +222,11 @@ Yes, exactly. I'm too old for that stuff: I just downloaded the third-party libr
I you're a big fan of those tools, please go ahead and send me a pull request. I you're a big fan of those tools, please go ahead and send me a pull request.
i18n
----
In the angular\_app/ directory there is a Gruntfile.js; run grunt here to update the files in static/i18n/; right now to set a language you have to edit angular\_app/js/i18n.js
Coding style and conventions Coding style and conventions
---------------------------- ----------------------------

File diff suppressed because one or more lines are too long

View file

@ -1,39 +1,39 @@
{ {
"New event": "Nuovo evento", "New event": "Nuovo evento",
"Tickets": "", "Tickets": "Biglietti",
"Join this event": "", "Join this event": "Partecipa",
"save": "salva", "save": "salva",
"Title": "Titolo", "Title": "Titolo",
"Tagline": "", "Tagline": "Slogan",
"Short summary": "", "Short summary": "Descrizione breve",
"Long description": "", "Long description": "Descrizione lunga",
"begin date:": "Data inizio:", "begin date:": "data di inizio:",
"begin time:": "Ora inizio:", "begin time:": "orario di inizio:",
"end date:": "", "end date:": "data di chiusura",
"end time:": "", "end time:": "orario di chiusura",
"Where": "", "Where": "Dove",
"Group ID": "", "Group ID": "Group ID",
"Used to share persons amongst multiple events. Must be hard to guess (if empty, will be autogenerated)": "", "Used to share persons amongst multiple events. Must be hard to guess (if empty, will be autogenerated)": "Usato per condividere le persone tra più eventi. Deve essere difficile da indovinare (se vuoto, verrà autogenerato)",
"Number of tickets": "", "Number of tickets": "Numero di biglietti",
"Number of tickets (0 or empty means unlimited)": "", "Number of tickets (0 or empty means unlimited)": "Numero di biglietti (0 o vuoto significa illimitati)",
"ticket sales begin date:": "", "ticket sales begin date:": "data di inizio vendita dei biglietti",
"ticket sales begin time:": "", "ticket sales begin time:": "orario di inizio vendita dei biglietti",
"ticket sales end date:": "", "ticket sales end date:": "data di fine vendita dei biglietti",
"ticket sales end time:": "", "ticket sales end time:": "orario di fine vendita dei biglietti",
"Registration form": "", "Registration form": "Form di registrazione",
"tickets": "", "tickets": "biglietti",
"Edit event": "", "Edit event": "Edita l'evento",
"Quick add ticket": "", "Quick add ticket": "Ticket rapido",
"Attendees:": "Partecipanti:", "Attendees:": "Partecipanti:",
"Registered:": "Registrato:", "Registered:": "Registrato:",
"Search:": "Cerca:", "Search:": "Cerca:",
"Name or email": "Nome o email", "Name or email": "Nome o email",
"Show cancelled tickets": "", "Show cancelled tickets": "Mostra i biglietti cancellati",
"Name": "Nome", "Name": "Nome",
"Surname": "Cognome", "Surname": "Cognome",
"Attended": "Partecipato", "Attended": "Presente",
"Delete": "Cancella", "Delete": "Cancella",
"cancelled": "", "cancelled": "cancellato",
"Unregistered persons": "Persone non registrate", "Unregistered persons": "Persone non registrate",
"Person": "Persona", "Person": "Persona",
"Add": "Aggiungi", "Add": "Aggiungi",
@ -44,57 +44,57 @@
"Date": "Data", "Date": "Data",
"Date (descending)": "Data (ordine inverso)", "Date (descending)": "Data (ordine inverso)",
"Event": "Evento", "Event": "Evento",
"Attendees / Registered": "", "Attendees / Registered": "Presenti / Registrati",
"Actions": "", "Actions": "Azioni",
"Begins:": "Inizio:", "Begins:": "Inizio:",
"Ends:": "Fine:", "Ends:": "Fine:",
"Manage tickets": "", "Manage tickets": "Gestione biglietti",
"still available": "", "still available": "ancora disponibili",
"Tickets for sale:": "", "Tickets for sale:": "Biglietti in vendita",
"from": "", "from": "da",
"until": "", "until": "fino a",
"Delete event": "", "Delete event": "Cancella l'evento",
"Import tickets from Eventbrite CSV": "", "Import tickets from Eventbrite CSV": "Importa i biglietti da un CSV Eventbrite",
"CSV file": "File CSV", "CSV file": "File CSV",
"CSV exported from Eventbrite": "", "CSV exported from Eventbrite": "CSV esportato da Eventbrite",
"Associate tickets to this event": "", "Associate tickets to this event": "Associa i biglietti a questo evento",
"Import": "Importa", "Import": "Importa",
"Users": "", "Users": "Utenti",
"All tickets": "", "All tickets": "Tutti i biglietti",
"Import tickets": "", "Import tickets": "Importa biglietti",
"logout": "logout", "logout": "logout",
"login": "", "login": "login",
"Login": "", "Login": "Login",
"Username or email": "", "Username or email": "Username o email",
"Password": "", "Password": "Password",
"Register a new user": "", "Register a new user": "Registra un nuovo utente",
"Username": "", "Username": "Username",
"Email": "Email", "Email": "Email",
"register": "", "register": "registra",
"Confirm": "Conferma", "Confirm": "Conferma",
"Ok": "Ok", "Ok": "Ok",
"Cancel": "Annulla", "Cancel": "Annulla",
"Quick add a ticket": "", "Quick add a ticket": "Ticket rapido",
"join this event": "", "join this event": "partecipa all'evento",
"your ticket": "", "your ticket": "il tuo biglietto",
"Event details": "", "Event details": "Dettagli dell'evento",
"Your ticket has been cancelled; you can join again this event using the commands below": "", "Your ticket has been cancelled; you can join again this event using the commands below": "Il tuo biglietto è stato cancellato; puoi tornare a partecipare usando il comando qui sotto",
"Dangerous stuff": "", "Dangerous stuff": "Cose pericolose",
"Toggle dangerous actions": "", "Toggle dangerous actions": "Abilita/disabilita le azioni pericolose",
"Leave this event": "", "Leave this event": "Abbandona questo evento",
"Join again this event": "", "Join again this event": "Partecipa di nuovo a questo evento",
"All Tickets": "", "All Tickets": "Tutti i biglietti",
"Tickets:": "", "Tickets:": "Biglietti",
"update user information": "", "update user information": "aggiorna le informazioni dell'utente",
"Old password": "", "Old password": "Vecchia password",
"New password": "", "New password": "Nuova password",
"update": "", "update": "aggiorna",
"Sort by:": "Ordina per:", "Sort by:": "Ordina per:",
"Ticket": "", "Ticket": "Biglietto",
"Add user": "", "Add user": "Aggiungi utente",
"Username (descending)": "", "Username (descending)": "Username (ordine inverso)",
"Email (descending)": "", "Email (descending)": "Email (ordine inverso)",
"User": "", "User": "Utente",
"Do you really want to delete this event?": "Vuoi veramente cancellare questo evento?", "Do you really want to delete this event?": "Vuoi veramente cancellare questo evento?",
"Do you really want to delete this user?": "" "Do you really want to delete this user?": "Vuoi veramente cancellare questo utente?"
} }

View file

@ -0,0 +1,112 @@
/*!
* angular-translate - v2.15.1 - 2017-04-03
*
* Copyright (c) 2017 The angular-translate team, Pascal Precht; Licensed MIT
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module unless amdModuleId is set
define([], function () {
return (factory());
});
} else if (typeof module === 'object' && module.exports) {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory();
} else {
factory();
}
}(this, function () {
$translateStaticFilesLoader.$inject = ['$q', '$http'];
angular.module('pascalprecht.translate')
/**
* @ngdoc object
* @name pascalprecht.translate.$translateStaticFilesLoader
* @requires $q
* @requires $http
*
* @description
* Creates a loading function for a typical static file url pattern:
* "lang-en_US.json", "lang-de_DE.json", etc. Using this builder,
* the response of these urls must be an object of key-value pairs.
*
* @param {object} options Options object, which gets prefix, suffix, key, and fileMap
*/
.factory('$translateStaticFilesLoader', $translateStaticFilesLoader);
function $translateStaticFilesLoader($q, $http) {
'use strict';
return function (options) {
if (!options || (!angular.isArray(options.files) && (!angular.isString(options.prefix) || !angular.isString(options.suffix)))) {
throw new Error('Couldn\'t load static files, no files and prefix or suffix specified!');
}
if (!options.files) {
options.files = [{
prefix: options.prefix,
suffix: options.suffix
}];
}
var load = function (file) {
if (!file || (!angular.isString(file.prefix) || !angular.isString(file.suffix))) {
throw new Error('Couldn\'t load static file, no prefix or suffix specified!');
}
var fileUrl = [
file.prefix,
options.key,
file.suffix
].join('');
if (angular.isObject(options.fileMap) && options.fileMap[fileUrl]) {
fileUrl = options.fileMap[fileUrl];
}
return $http(angular.extend({
url: fileUrl,
method: 'GET'
}, options.$http))
.then(function(result) {
return result.data;
}, function () {
return $q.reject(options.key);
});
};
var promises = [],
length = options.files.length;
for (var i = 0; i < length; i++) {
promises.push(load({
prefix: options.files[i].prefix,
key: options.key,
suffix: options.files[i].suffix
}));
}
return $q.all(promises)
.then(function (data) {
var length = data.length,
mergedData = {};
for (var i = 0; i < length; i++) {
for (var key in data[i]) {
mergedData[key] = data[i][key];
}
}
return mergedData;
});
};
}
$translateStaticFilesLoader.displayName = '$translateStaticFilesLoader';
return 'pascalprecht.translate';
}));

View file

@ -1,6 +1,6 @@
/*! /*!
* angular-translate - v2.7.0 - 2015-05-02 * angular-translate - v2.15.1 - 2017-04-03
* http://github.com/angular-translate/angular-translate *
* Copyright (c) 2015 ; Licensed MIT * Copyright (c) 2017 The angular-translate team, Pascal Precht; Licensed MIT
*/ */
!function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof exports?module.exports=b():b()}(this,function(){function a(a,b){"use strict";return function(c){if(!(c&&(angular.isArray(c.files)||angular.isString(c.prefix)&&angular.isString(c.suffix))))throw new Error("Couldn't load static files, no files and prefix or suffix specified!");c.files||(c.files=[{prefix:c.prefix,suffix:c.suffix}]);for(var d=function(d){if(!d||!angular.isString(d.prefix)||!angular.isString(d.suffix))throw new Error("Couldn't load static file, no prefix or suffix specified!");var e=a.defer();return b(angular.extend({url:[d.prefix,c.key,d.suffix].join(""),method:"GET",params:""},c.$http)).success(function(a){e.resolve(a)}).error(function(){e.reject(c.key)}),e.promise},e=a.defer(),f=[],g=c.files.length,h=0;g>h;h++)f.push(d({prefix:c.files[h].prefix,key:c.key,suffix:c.files[h].suffix}));return a.all(f).then(function(a){for(var b=a.length,c={},d=0;b>d;d++)for(var f in a[d])c[f]=a[d][f];e.resolve(c)},function(a){e.reject(a)}),e.promise}}return angular.module("pascalprecht.translate").factory("$translateStaticFilesLoader",a),a.$inject=["$q","$http"],a.displayName="$translateStaticFilesLoader","pascalprecht.translate"}); !function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof module&&module.exports?module.exports=b():b()}(0,function(){function a(a,b){"use strict";return function(c){if(!(c&&(angular.isArray(c.files)||angular.isString(c.prefix)&&angular.isString(c.suffix))))throw new Error("Couldn't load static files, no files and prefix or suffix specified!");c.files||(c.files=[{prefix:c.prefix,suffix:c.suffix}]);for(var d=[],e=c.files.length,f=0;f<e;f++)d.push(function(d){if(!d||!angular.isString(d.prefix)||!angular.isString(d.suffix))throw new Error("Couldn't load static file, no prefix or suffix specified!");var e=[d.prefix,c.key,d.suffix].join("");return angular.isObject(c.fileMap)&&c.fileMap[e]&&(e=c.fileMap[e]),b(angular.extend({url:e,method:"GET"},c.$http)).then(function(a){return a.data},function(){return a.reject(c.key)})}({prefix:c.files[f].prefix,key:c.key,suffix:c.files[f].suffix}));return a.all(d).then(function(a){for(var b=a.length,c={},d=0;d<b;d++)for(var e in a[d])c[e]=a[d][e];return c})}}return a.$inject=["$q","$http"],angular.module("pascalprecht.translate").factory("$translateStaticFilesLoader",a),a.displayName="$translateStaticFilesLoader","pascalprecht.translate"});

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -4,7 +4,7 @@
/* /*
* AngularJS Toaster * AngularJS Toaster
* Version: 2.0.0 * Version: 2.1.0
* *
* Copyright 2013-2016 Jiri Kavulak. * Copyright 2013-2016 Jiri Kavulak.
* All Rights Reserved. * All Rights Reserved.
@ -42,7 +42,23 @@
'prevent-duplicates': false, 'prevent-duplicates': false,
'mouseover-timer-stop': true // stop timeout on mouseover and restart timer on mouseout 'mouseover-timer-stop': true // stop timeout on mouseover and restart timer on mouseout
} }
).service( ).run(['$templateCache', function($templateCache) {
$templateCache.put('angularjs-toaster/toast.html',
'<div id="toast-container" ng-class="[config.position, config.animation]">' +
'<div ng-repeat="toaster in toasters" class="toast" ng-class="toaster.type" ng-click="click($event, toaster)" ng-mouseover="stopTimer(toaster)" ng-mouseout="restartTimer(toaster)">' +
'<div ng-if="toaster.showCloseButton" ng-click="click($event, toaster, true)" ng-bind-html="toaster.closeHtml"></div>' +
'<div ng-class="config.title">{{toaster.title}}</div>' +
'<div ng-class="config.message" ng-switch on="toaster.bodyOutputType">' +
'<div ng-switch-when="trustedHtml" ng-bind-html="toaster.html"></div>' +
'<div ng-switch-when="template"><div ng-include="toaster.bodyTemplate"></div></div>' +
'<div ng-switch-when="templateWithData"><div ng-include="toaster.bodyTemplate"></div></div>' +
'<div ng-switch-when="directive"><div directive-template directive-name="{{toaster.html}}" directive-data="{{toaster.directiveData}}"></div></div>' +
'<div ng-switch-default >{{toaster.body}}</div>' +
'</div>' +
'</div>' +
'</div>');
}
]).service(
'toaster', [ 'toaster', [
'$rootScope', 'toasterConfig', function($rootScope, toasterConfig) { '$rootScope', 'toasterConfig', function($rootScope, toasterConfig) {
// http://stackoverflow.com/questions/26501688/a-typescript-guid-class // http://stackoverflow.com/questions/26501688/a-typescript-guid-class
@ -72,7 +88,8 @@
toastId: params.toastId, toastId: params.toastId,
onShowCallback: params.onShowCallback, onShowCallback: params.onShowCallback,
onHideCallback: params.onHideCallback, onHideCallback: params.onHideCallback,
directiveData: params.directiveData directiveData: params.directiveData,
tapToDismiss: params.tapToDismiss
}; };
toasterId = params.toasterId; toasterId = params.toasterId;
} else { } else {
@ -469,8 +486,13 @@
} }
}; };
$scope.click = function(toast, isCloseButton) { $scope.click = function(event, toast, isCloseButton) {
if ($scope.config.tap === true || (toast.showCloseButton === true && isCloseButton === true)) { event.stopPropagation();
var tapToDismiss = typeof toast.tapToDismiss === "boolean"
? toast.tapToDismiss
: $scope.config.tap;
if (tapToDismiss === true || (toast.showCloseButton === true && isCloseButton === true)) {
var removeToast = true; var removeToast = true;
if (toast.clickHandler) { if (toast.clickHandler) {
if (angular.isFunction(toast.clickHandler)) { if (angular.isFunction(toast.clickHandler)) {
@ -487,20 +509,7 @@
} }
}; };
}], }],
template: templateUrl: 'angularjs-toaster/toast.html'
'<div id="toast-container" ng-class="[config.position, config.animation]">' +
'<div ng-repeat="toaster in toasters" class="toast" ng-class="toaster.type" ng-click="click(toaster)" ng-mouseover="stopTimer(toaster)" ng-mouseout="restartTimer(toaster)">' +
'<div ng-if="toaster.showCloseButton" ng-click="click(toaster, true)" ng-bind-html="toaster.closeHtml"></div>' +
'<div ng-class="config.title">{{toaster.title}}</div>' +
'<div ng-class="config.message" ng-switch on="toaster.bodyOutputType">' +
'<div ng-switch-when="trustedHtml" ng-bind-html="toaster.html"></div>' +
'<div ng-switch-when="template"><div ng-include="toaster.bodyTemplate"></div></div>' +
'<div ng-switch-when="templateWithData"><div ng-include="toaster.bodyTemplate"></div></div>' +
'<div ng-switch-when="directive"><div directive-template directive-name="{{toaster.html}}" directive-data="{{toaster.directiveData}}"></div></div>' +
'<div ng-switch-default >{{toaster.body}}</div>' +
'</div>' +
'</div>' +
'</div>'
}; };
}] }]
); );

File diff suppressed because one or more lines are too long