add joyride translations
parent
bd5ef7fbc1
commit
46eefb7b18
|
@ -1357,6 +1357,12 @@
|
|||
"CANCEL": "Cancel"
|
||||
},
|
||||
"JOYRIDE": {
|
||||
"NAV": {
|
||||
"NEXT": "Next",
|
||||
"BACK": "Back",
|
||||
"SKIP": "Skip",
|
||||
"DONE": "Done"
|
||||
},
|
||||
"DASHBOARD": {
|
||||
"STEP1": {
|
||||
"TITLE": "Your project",
|
||||
|
|
|
@ -19,23 +19,11 @@
|
|||
|
||||
taiga = @.taiga
|
||||
|
||||
JoyRideDirective = ($rootScope, currentUserService, joyRideService, $location) ->
|
||||
JoyRideDirective = ($rootScope, currentUserService, joyRideService, $location, $translate) ->
|
||||
link = (scope, el, attrs, ctrl) ->
|
||||
unsuscribe = null
|
||||
intro = introJs()
|
||||
|
||||
#Todo: translate
|
||||
intro.setOptions({
|
||||
exitOnEsc: false,
|
||||
exitOnOverlayClick: false,
|
||||
showStepNumbers: false,
|
||||
nextLabel: 'Next →',
|
||||
prevLabel: '← Back',
|
||||
skipLabel: 'Skip',
|
||||
doneLabel: 'Done',
|
||||
disableInteraction: true
|
||||
})
|
||||
|
||||
intro.oncomplete () ->
|
||||
$('html,body').scrollTop(0)
|
||||
|
||||
|
@ -46,6 +34,17 @@ JoyRideDirective = ($rootScope, currentUserService, joyRideService, $location) -
|
|||
if !config[next.joyride]
|
||||
return
|
||||
|
||||
intro.setOptions({
|
||||
exitOnEsc: false,
|
||||
exitOnOverlayClick: false,
|
||||
showStepNumbers: false,
|
||||
nextLabel: $translate.instant('JOYRIDE.NAV.NEXT') + ' →',
|
||||
prevLabel: '← ' + $translate.instant('JOYRIDE.NAV.BACK'),
|
||||
skipLabel: $translate.instant('JOYRIDE.NAV.SKIP'),
|
||||
doneLabel: $translate.instant('JOYRIDE.NAV.DONE'),
|
||||
disableInteraction: true
|
||||
})
|
||||
|
||||
intro.setOption('steps', joyRideService.get(next.joyride))
|
||||
intro.start()
|
||||
|
||||
|
@ -78,7 +77,8 @@ JoyRideDirective.$inject = [
|
|||
"$rootScope",
|
||||
"tgCurrentUserService",
|
||||
"tgJoyRideService",
|
||||
"$location"
|
||||
"$location",
|
||||
"$translate"
|
||||
]
|
||||
|
||||
angular.module("taigaComponents").directive("tgJoyRide", JoyRideDirective)
|
||||
|
|
Loading…
Reference in New Issue