tutorialProject.directive('createTranslation', function ($window) {
  return {
    restrict: 'AE',
    replace: true,
    templateUrl: 'app/features/create-translation/create-translation.html',
    controller: function ($scope) {

      $scope.languages = availableLanguages;
      $scope.selectedLanguage = $scope.languages[0];
      $scope.sentence = "";

      $scope.createTranslation = function () {
        console.log($scope.selectedLanguage)
        console.log($scope.sentence)

        if ($scope.selectedLanguage && $scope.sentence.length > 0) {

          var TranslationBunch = Parse.Object.extend("TranslationBunch");
          var translationBunch = new TranslationBunch();

          var translations = [
            {
              language: $scope.selectedLanguage.code,
              translation: $scope.sentence
            }
          ];

          translationBunch.set("translations", translations);

          translationBunch.save(null, {
            success: function (translationBunch) {
              $window.location.reload();
            },
            error: function (translationBunch, error) {
            }
          });

        }
      }

    }
  };
});
@@ -220,24 +220,67 @@
 ($scope) %7B%0A%0A
+      $scope.user = Parse.User.current();%0A%0A
       $scope
@@ -444,90 +444,8 @@
 () %7B
-%0A        console.log($scope.selectedLanguage)%0A        console.log($scope.sentence)
 %0A%0A  
@@ -785,16 +785,53 @@
 sentence
+,%0A              owner: $scope.user.id
 %0A       

add creator while creating a new translation bunch