From 24379ed2352f51d8f1a23eaddd26c7f3926d1df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Fri, 17 Apr 2015 13:32:05 +0200 Subject: [PATCH] [l18n] More minor fixes --- app/coffee/app.coffee | 14 ++++---------- app/locales/locale-en.json | 3 ++- app/partials/admin/admin-third-parties-github.jade | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/coffee/app.coffee b/app/coffee/app.coffee index bedf531e..477db887 100644 --- a/app/coffee/app.coffee +++ b/app/coffee/app.coffee @@ -200,9 +200,8 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $tgEven $httpProvider.interceptors.push('authHttpIntercept') # If there is an error in the version throw a notify error - versionCheckHttpIntercept = ($q, $confirm) -> - versionErrorMsg = "Someone inside Taiga has changed this before and our Oompa Loompas cannot apply your changes. - Please reload and apply your changes again (they will be lost)." #TODO: i18n + versionCheckHttpIntercept = ($q, $confirm, $translate) -> + versionErrorMsg = $translate.instant("ERROR.VERSION_ERROR") httpResponseError = (response) -> if response.status == 400 && response.data.version @@ -216,9 +215,9 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $tgEven responseError: httpResponseError } - $provide.factory("versionCheckHttpIntercept", ["$q", "$tgConfirm", versionCheckHttpIntercept]) + $provide.factory("versionCheckHttpIntercept", ["$q", "$tgConfirm", "$translate", versionCheckHttpIntercept]) - $httpProvider.interceptors.push('versionCheckHttpIntercept'); + $httpProvider.interceptors.push('versionCheckHttpIntercept') window.checksley.updateValidators({ linewidth: (val, width) -> @@ -230,10 +229,6 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $tgEven return valid }) - window.checksley.updateMessages("default", { - linewidth: "The subject must have a maximum size of %s" - }) - $compileProvider.debugInfoEnabled(window.taigaConfig.debugInfo || false) $translateProvider.useStaticFilesLoader({ @@ -258,7 +253,6 @@ init = ($log, $config, $rootscope, $auth, $events, $analytics, $translate) -> $analytics.initialize() - modules = [ # Main Global Modules "taigaBase", diff --git a/app/locales/locale-en.json b/app/locales/locale-en.json index cb734804..fc47c476 100644 --- a/app/locales/locale-en.json +++ b/app/locales/locale-en.json @@ -582,7 +582,8 @@ "NOT_FOUND": "Not found", "NOT_FOUND_TEXT": "Error 404. The page you are looking for no longer exists. Perhaps you can return back to TAIGA homepage and see if you can find what you are looking for.", "PERMISSION_DENIED": "Permission denied", - "PERMISSION_DENIED_CODE": "Error 403." + "PERMISSION_DENIED_CODE": "Error 403.", + "VERSION_ERROR": "Someone inside Taiga has changed this before and our Oompa Loompas cannot apply your changes. Please reload and apply your changes again (they will be lost)." }, "TASKBOARD": { "SECTION_NAME": "Taskboard", diff --git a/app/partials/admin/admin-third-parties-github.jade b/app/partials/admin/admin-third-parties-github.jade index 03d2400b..0b3efe32 100644 --- a/app/partials/admin/admin-third-parties-github.jade +++ b/app/partials/admin/admin-third-parties-github.jade @@ -25,7 +25,7 @@ div.wrapper.roles(tg-github-webhooks, ng-controller="GithubController as ctrl", .icon.icon-copy .help-copy(translate="COMMON.COPY_TO_CLIPBOARD") - button.button-green.submit-button(type="submit", title="{{'COMMON.SAVE' | translate}}") + button.button-green.submit-button(type="submit", title="{{'COMMON.SAVE' | translate}}", translate="COMMON.SAVE") a.help-button(href="https://taiga.io/support/github-integration/", target="_blank") span.icon.icon-help