Skip to content

Commit

Permalink
Optimize translation controller
Browse files Browse the repository at this point in the history
In order to only fetch group of translations one by one.
Thus it doesn't be slower with many resources.

See #8
  • Loading branch information
MattKetmo committed Dec 28, 2014
1 parent 5791d03 commit 92302bd
Show file tree
Hide file tree
Showing 11 changed files with 289 additions and 378 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## Unreleased

- Optimize editor load for project with many resources: translations calls are now done one by one

## 0.0.1 - 2014-12-12

Initial version.
Expand Down
22 changes: 11 additions & 11 deletions src/config/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,17 @@ app.config(function($stateProvider, $urlRouterProvider) {
},
}
})
// .state('translate.source.target.phrase', {
// url: '/{id:[0-9]+}',
// menu: 'translate',
// templateUrl: 'views/translate-phrase.html',
// controller: 'TranslatePhraseController',
// resolve: {
// translationId: function($stateParams) {
// return +$stateParams.id;
// },
// }
// })
.state('translate.source.target.phrase', {
url: '/{id:[0-9]+}',
menu: 'translate',
templateUrl: 'views/translate-phrase.html',
controller: 'TranslatePhraseController',
resolve: {
translationId: function($stateParams) {
return +$stateParams.id;
},
}
})
.state('glossary', {
url: '/glossary',
menu: 'glossary',
Expand Down
Loading

0 comments on commit 92302bd

Please sign in to comment.