public function isWriteAllowed()
    {
        $msgRepl = ['%s' => $this->relPath];

        // No file, directory not writable
        if (!file_exists($this->absPath) && (!is_writable(dirname($this->absPath)) && !is_writable(dirname(dirname($this->absPath))))) {
            $msg = Trans::__(
                "The translations file '%s' can't be created. You will have to use your own editor to make modifications to this file.",
                $msgRepl
            );
            $this->app['logger.flash']->warning($msg);

        // Have a file, but not writable
        } elseif (file_exists($this->absPath) && !is_writable($this->absPath)) {
            $msg = Trans::__(
                'general.phrase.file-not-writable',
                $msgRepl
            );
            $this->app['logger.flash']->warning($msg);

        // File is not readable: abort
        } elseif (file_exists($this->absPath) && !is_readable($this->absPath)) {
            $msg = Trans::__('general.phrase.error-translation-file-not-readable', $msgRepl);
            $this->app->abort(Response::HTTP_NOT_FOUND, $msg);

        // File is writeable
        } else {
            return true;
        }

        return false;
    }