This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Angular-translate and a start to translate labels
- Loading branch information
1 parent
9fac2c2
commit faf1bbe
Showing
13 changed files
with
1,184 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"LABEL": { | ||
"record": { | ||
"about.instanceTitle.titleValue": "Huvudtitel" | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
static/vendor/angular-translate-loader-url/angular-translate-loader-url.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*! | ||
* angular-translate - v2.1.0 - 2014-04-02 | ||
* http://github.com/PascalPrecht/angular-translate | ||
* Copyright (c) 2014 ; Licensed MIT | ||
*/ | ||
angular.module('pascalprecht.translate').factory('$translateUrlLoader', [ | ||
'$q', | ||
'$http', | ||
function ($q, $http) { | ||
return function (options) { | ||
if (!options || !options.url) { | ||
throw new Error('Couldn\'t use urlLoader since no url is given!'); | ||
} | ||
var deferred = $q.defer(); | ||
$http({ | ||
url: options.url, | ||
params: { lang: options.key }, | ||
method: 'GET' | ||
}).success(function (data) { | ||
deferred.resolve(data); | ||
}).error(function (data) { | ||
deferred.reject(options.key); | ||
}); | ||
return deferred.promise; | ||
}; | ||
} | ||
]); |
Oops, something went wrong.