ESC does not delete an empty subtitle if it is synced
Merge pull request #1365 from pculture/gh-1362

ESC does not delete an empty subtitle if it is synced
Trying out popcorn update
Always close dialogs when buttons are clicked.

Made to so that we always close the dialog when a button is clicked.
It's only logical to do, and we were basically doing it in every
callback.  Many times it would be the only line of code.  The one time
we didn't want to do it is when we were attempting to regain the
editor lock and in this case a freeze box makes more sense.
DialogManager.openDialog refactor

Changed a couple things with generic dialogs:
  - Moved the code that defines the title/text/buttons to the
    DialogManager class
  - Changed openDialog to input the dialog name instead of the entire
    definition.
  - Removed button callback functions from the button definition and
    made them a parameter to openDialog.

This makes dialogs more easily testable by spying on
DialogManager.openDialog.  It's much easier to check the dialog name
than the entire dialog -- and this check won't need to be updated if
we change the dialog text/title.  It's also easy to invoke callback
functions for buttons.

I'm going to be refactoring the code to save things so I wanted a way
to test that it pops up the correct dialogs.

Also I think it's a bit nicer to have the dialog definitions separate
from the code that calls them.  It's basically just a bunch of text
that overflows 80 columns, so I like having it sectioned off.  The one
thing that seems a little weird now is the overides parameter, but I
think that's an okay price to pay.  I also think I can refactor the
code that shows the subtitles saved dialog to not use overides.
One more refactor to DialogManager

Changed the way we create the DialogManager.  Instead registering a
class with the injector, we register a controller that creates a
singleton object.

I think this is the best way to handle these app-level controller
singletons.  Using a controller means that we can simply specify
dependencies like VideoPlayer and just get them passed to use rather
than force AppController to pass them along.  Also, I think this most
closely fits with the angular way, since DialogManager is a controller
class.

Made a few other changes:
  - Moved the dialog and button definitions out of DialogManager and
    into their own objects.  I think the split is nice because it
    keeps the DialogManager class lean.  It also makes it easier to
    mock out the dialogs/buttons for the tests.
  - Fixed the text for the resume button on the save dialog.
  - Added back allowClose attributes that I mistakenly deleted in the
    last commit.
Refactored saving things

Moved code that saves things into an app-level controller.  Added
tests for it.  I think this is a much better way to handle saving
things.  It also fixes the bug when exiting with unsaved changes.
Also it's much more easily tested.

Updated the HTML/CSS for the buttons on the top-right a bit.
One more change to make notes work with the new system.

Moved the collab data to the AppController.  Right now it's just
notes, but I figure we can put more stuff there as wel need it.
Again that issue with Chrome messing up a video open several times. Hopefully that solves part of the weired issues in #1357
Couple of UI fixes

Fixed background for the session buttons.

Changed button to read "Discard changes and open legacy editor"
Fix issue in flow player where end of clip did not trigger a stop in playback, hence sync up problems. Part of issue #1357
Fix approving tasks after saving subtitles.

Fixed the code that handles the response from
SubtitleStorage.saveSubtitles().
Change locking URL to use english locale (#1345)

The locale part on the locking URL is completely arbitrary because
there's no text in the response that's going to be translated.  So I
changed it to use "en" as the first component, which we can be pretty
sure won't result in the redirect issue from #1345
Merge pull request #1368 from pculture/gh-1357

Gh 1357
Merge pull request #1369 from pculture/gh-1330-fix

Gh 1330 fix
Updated transifex translations -- through update_translations.sh
Updated transifex translations -- through update_translations.sh
Updated transifex translations -- through update_translations.sh
Updated transifex translations -- through update_translations.sh
Updated transifex translations -- through update_translations.sh