Просмотр исходного кода

i18n is cleaned and working with requirejs

Henry Oswald 12 лет назад
Родитель
Сommit
49c7d52208

+ 0 - 5
services/web/app/views/layout.jade

@@ -36,11 +36,6 @@ html(itemscope, itemtype='http://schema.org/Product')
 		block scripts
 		script(src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js")
 		script(src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.14/angular.min.js")
-		script(src="/js/libs/i18next.js")
-		script(src="/js/libs/ng-i18next/provider.js")
-		script(src="/js/libs/ng-i18next/filter/filter.js")
-		script(src="/js/libs/ng-i18next/directive/directive.js")
-
 		
 		script.
 			window.sharelatex = {

+ 1 - 1
services/web/public/coffee/main.coffee

@@ -18,6 +18,6 @@ define [
 	"directives/selectAll"
 	"directives/maxHeight"
 	"filters/formatDate"
-
+	"utils/i18nextProvider"
 ], () ->
 	angular.bootstrap(document.body, ["SharelatexApp"])

+ 0 - 11
services/web/public/coffee/main/project-list.coffee

@@ -3,17 +3,6 @@ define [
 ], (App) ->
 
 
-	angular.module('jm.i18next').config ['$i18nextProvider', ($i18nextProvider)->
-		console.log("hello")
-		$i18nextProvider.options =
-			lng: 'en-GB',
-			useCookie: false,
-			useLocalStorage: false,
-			fallbackLng: 'en',
-			resGetPath: '/locales/__lng__.json'
-	]
-
-
 	App.factory "queuedHttp", ($http, $q) ->
 		pendingRequests = []
 		inflight = false

+ 9 - 0
services/web/public/coffee/utils/i18nextProvider.coffee

@@ -0,0 +1,9 @@
+angular.module('jm.i18next').config ['$i18nextProvider', ($i18nextProvider)->
+	console.log("hello")
+	$i18nextProvider.options =
+		lng: 'en-GB',
+		useCookie: false,
+		useLocalStorage: false,
+		fallbackLng: 'en',
+		resGetPath: '/locales/__lng__.json'
+]