support plugin locales

stable
Juanfran 2016-02-22 12:33:01 +01:00
parent eef8cfc0c7
commit 9a1e81f730
4 changed files with 21 additions and 65 deletions

View File

@ -580,6 +580,9 @@ i18nInit = (lang, $translate) ->
init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $navUrls, appMetaService, projectService, loaderService, navigationBarService) -> init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $navUrls, appMetaService, projectService, loaderService, navigationBarService) ->
$log.debug("Initialize application") $log.debug("Initialize application")
$rootscope.$on '$translatePartialLoaderStructureChanged', () ->
$translate.refresh()
# Checksley - Extra validators # Checksley - Extra validators
validators = { validators = {
linewidth: (val, width) -> linewidth: (val, width) ->

View File

@ -1480,69 +1480,5 @@
"ACTION_TITLE": "Search", "ACTION_TITLE": "Search",
"RESULTS": "Search results" "RESULTS": "Search results"
} }
},
"SUBSCRIPTIONS": {
"PLAN": "Plan",
"PLAN_STARTING": "Active Plans starting April 30, 2016",
"YOUR_PLAN": "Your plan",
"YOUR_RECOMMENDED_PLAN": "Your recommended plan",
"WANT_PLAN": "I want it!",
"UPDATE_PLAN": "Update Plan",
"PRIVATE_PROJECTS_LIMIT": "Up to <strong>{{number}}</strong> private projects + Unlimited public projects",
"MEMBERS_LIMIT": "Up to <strong>{{number}}</strong> members per private project",
"CONTACT_SUBSCRIBE": "Subscribe to this plan by contacting us at <a href='mailto:support@taiga.io'>support@taiga.io</a>",
"FREQUENCY_MONTH": "month",
"FREQUENCY_YEAR": "year",
"HELP": {
"WHY": "Why do we recommend this plan?",
"NO_PROJECTS": "Currently you have no private projects, so the plan that fits for you is the {{name}} plan.",
"FEW_PROJECTS": "You just have {{private_num}} private project, so the plan that fits for you is the {{name}} plan.",
"NUM_PROJECTS": "You own {{private_num}} private projects and {{public_num}} public projects, so the plan that better fits for you is the {{plan}} Plan.",
"NUM_PROJECTS_CUSTOM": "You own {{private_num}} private projects and {{public_num}} public projects, so the plan that better fits for you is the Custom Plan.",
"SUBSCRIBE": "You can already ensure the privacity of your projects subscribing the recommended plan, or that better fits for your use. You have until April, 30th to select your plan. You don't need to pay anything until then!",
"UPGRADE": "You can upgrade your plan if you need it.",
"ACTIVATION": "On 30th April we will activate the paid plans. If you have more than 1 provate project you could keep its privacity making the payment for the plan that better fits for you.",
"PAYMENT": "After April 30th, if you are not subscribed to a plan, your private projects will be temporarily blocked. Do not worry, we will not delete them, its just that we cannot decide for you what to do with your projects and we will wait for your decission",
"PUBLIC": "We love to share, so if you keep your projects public, it will be completely free.",
"MORE_INFO_TITLE": "Frequently Asked Questions",
"MORE_INFO": "More info (FAQ)"
},
"PAYMENT_HISTORY": {
"TITLE": "Payment History",
"FREE": "Free until April, 30th",
"CHANGE_DATA": "Change payment data"
},
"PLANS_SELECTOR": {
"TITLE": "What plan do you need?",
"FREE": "Enjoy free plans until <strong>30th April</strong>",
"CURRENT": "Current Plan",
"RECOMMENDED": "Recommended Plan",
"CUSTOM": "Custom",
"CONTACT": "Do you need more than 25 users per projects? We have custom plan for enterprises. Get in touch with us at <a href='mailto:support@taiga.io' title='Contact Us'>support@taiga.io</a>"
},
"DOWNGRADE": {
"TITLE": "Downgrade",
"IMAGE_ALT": "Downgrading a plan",
"REASON": "You own more private projects or users per project than the maximum allowed by this plan. Your selected plan only allows <strong>{{projects}} private projects and {{members}} members per private project</strong>, so if you want to change to the {{plan}} plan you should make the following changes",
"MORE_PROJECTS": "If you have more than {{projects}} private projects",
"MORE_PROJECTS_OPTION1": "Keep {{projects}} private projects as maximum and set the others as <strong>public</strong>",
"MORE_PROJECTS_OPTION2": "Keep {{projects}} private projects and <strong>delete</strong> the others",
"MORE_PROJECTS_OPTION3": "<strong>Transfer the property</strong> of the private projects to another person that has capacity to own more projects",
"MORE_PROJECTS_OPTION4": "Or a combination of the above options",
"MORE_MEMBERS": "If you have more than {{members}} members per private project",
"MORE_MEMBERS_OPTION1": "Have a maximum of {{members}} members in all your private projects",
"ACCEPT": "Ok, understood"
},
"SELECT_PLAN": {
"TITLE": "Subscribe to a plan",
"SUBTITLE": "You will not billed anything. Enjoy your plan for free until <strong>April, 30th</strong>",
"YOUR_NEW_PLAN": "Your new plan",
"INTERVAL": "<strong>After the free period</strong> How would you like to pay?",
"PAY_MONTHLY": "Monthly",
"PAY_YEARLY": "Yeary",
"BACK": "Back",
"BACK_TITLE": "Back to select plans",
"CONTINUE": "Continue"
}
} }
} }

View File

@ -28,6 +28,8 @@ var gulp = require("gulp"),
livereload = require('gulp-livereload'), livereload = require('gulp-livereload'),
gulpFilter = require('gulp-filter'), gulpFilter = require('gulp-filter'),
addsrc = require('gulp-add-src'); addsrc = require('gulp-add-src');
mergeStream = require('merge-stream'),
path = require('path'),
coffeelint = require('gulp-coffeelint'); coffeelint = require('gulp-coffeelint');
var argv = require('minimist')(process.argv.slice(2)); var argv = require('minimist')(process.argv.slice(2));
@ -379,8 +381,22 @@ gulp.task("app-loader", function() {
}); });
gulp.task("locales", function() { gulp.task("locales", function() {
return gulp.src(paths.locales) var plugins = gulp.src(paths.app + "modules/**/locales/*.json")
.pipe(rename(function (localeFile) {
// rename app/modules/compiles-modules/tg-contrib/locales/locale-en.json
// to tg-contrib/locale-en.json
var pluginPath = path.join(localeFile.dirname, '..');
var pluginFolder = pluginPath.split('/').pop();
localeFile.dirname = pluginFolder;
}))
.pipe(gulp.dest(paths.distVersion + "locales")); .pipe(gulp.dest(paths.distVersion + "locales"));
var core = gulp.src(paths.locales)
.pipe(gulp.dest(paths.distVersion + "locales"));
return mergeStream(plugins, core);
}); });
gulp.task("coffee-lint", function () { gulp.task("coffee-lint", function () {

View File

@ -72,6 +72,7 @@
"karma-coffee-preprocessor": "^0.3.0", "karma-coffee-preprocessor": "^0.3.0",
"karma-mocha": "^0.2.0", "karma-mocha": "^0.2.0",
"karma-sourcemap-loader": "^0.3.4", "karma-sourcemap-loader": "^0.3.4",
"merge-stream": "^1.0.0",
"minimist": "^1.1.1", "minimist": "^1.1.1",
"mocha": "^2.2.4", "mocha": "^2.2.4",
"node-uuid": "^1.4.3", "node-uuid": "^1.4.3",