Skip to content

Commit

Permalink
Localizando o primeiro javascript. commit modelo
Browse files Browse the repository at this point in the history
  • Loading branch information
leogermani committed Nov 29, 2016
1 parent 9fceec8 commit 6a5ab14
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 7 additions & 0 deletions src/protected/application/themes/BaseV1/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,13 @@ function includeSearchAssets() {
$this->enqueueScript('app', 'search.controller.spatial', 'js/ng.search.controller.spatial.js', array('ng-mapasculturais', 'map'));

$this->enqueueScript('app', 'search.app', 'js/ng.search.app.js', array('ng-mapasculturais', 'search.controller.spatial', 'search.controller.map', 'search.service.findOne', 'search.service.find'));
$this->localizeScript('searchApp', [
'all' => \MapasCulturais\i::__('Todos'),
/* Translators: de uma data. Ex: *de* 12/12 a 13/12 */
'dateFrom' => \MapasCulturais\i::__('de'),
/* Translators: a uma data. Ex: de 12/12 *a* 13/12 */
'dateTo' => \MapasCulturais\i::__('a')
]);
}

function includeMapAssets() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
var timeoutTime = 300;

var defaultLocationRadius = 2000;


var labels = MapasCulturais.gettext.searchApp;

var skeletonData = {
global: {
isVerified: false,
Expand Down Expand Up @@ -349,7 +351,7 @@
// $scope.linguagens = MapasCulturais.taxonomyTerms.linguagem.map(function(el, i){ return {id: i, name: el}; });
// $scope.classificacoes = MapasCulturais.classificacoesEtarias.map(function(el, i){ return {id: i, name: el}; });

MapasCulturais.entityTypes.agent.unshift({id:null, name: 'Todos'});
MapasCulturais.entityTypes.agent.unshift({id:null, name: labels['all']});
// $scope.types = MapasCulturais.entityTypes;
// $scope.location = $location;

Expand Down Expand Up @@ -495,7 +497,7 @@
if(from === to)
return formatDate(from);
else
return 'de ' + formatDate(from) + ' a ' + formatDate(to);
return labels['dateFrom'] + ' ' + formatDate(from) + ' ' + labels['dateTo'] + ' ' + formatDate(to);
};

$scope.cleanEventDateFilters = function(){
Expand All @@ -510,7 +512,7 @@
var from = moment(project.registrationFrom.date).format('DD/MM/YYYY');
var to = moment(project.registrationTo.date).format('DD/MM/YYYY');

return from !== to ? 'de ' + from + ' a ' + to : from;
return from !== to ? labels['dateFrom'] + ' ' + from + ' ' + labels['dateTo'] + ' ' + to : from;
};

$scope.collapsedFilters = true;
Expand All @@ -533,4 +535,4 @@
}

}]);
})(angular);
})(angular);

0 comments on commit 6a5ab14

Please sign in to comment.