diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..07e6e472 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/node_modules diff --git a/class-tgm-plugin-activation.php b/class-tgm-plugin-activation.php index e4656afb..8259ae5a 100755 --- a/class-tgm-plugin-activation.php +++ b/class-tgm-plugin-activation.php @@ -338,38 +338,38 @@ public function init() { /* translators: %s: plugin name. */ 'updating' => __( 'Updating Plugin: %s', 'tgmpa' ), 'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ), + /* translators: 1: plugin name(s). */ 'notice_can_install_required' => _n_noop( - /* translators: 1: plugin name(s). */ 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'tgmpa' ), + /* translators: 1: plugin name(s). */ 'notice_can_install_recommended' => _n_noop( - /* translators: 1: plugin name(s). */ 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'tgmpa' ), + /* translators: 1: plugin name(s). */ 'notice_ask_to_update' => _n_noop( - /* translators: 1: plugin name(s). */ 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'tgmpa' ), + /* translators: 1: plugin name(s). */ 'notice_ask_to_update_maybe' => _n_noop( - /* translators: 1: plugin name(s). */ 'There is an update available for: %1$s.', 'There are updates available for the following plugins: %1$s.', 'tgmpa' ), + /* translators: 1: plugin name(s). */ 'notice_can_activate_required' => _n_noop( - /* translators: 1: plugin name(s). */ 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'tgmpa' ), + /* translators: 1: plugin name(s). */ 'notice_can_activate_recommended' => _n_noop( - /* translators: 1: plugin name(s). */ 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'tgmpa' diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 00000000..09a874fb --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,61 @@ +/** + * Give Gulp File + * + * Used for automating development tasks. + */ + +/* Modules (Can be installed with npm install command using package.json) + ------------------------------------- */ +var gulp = require('gulp'), + sort = require('gulp-sort'), + wpPot = require('gulp-wp-pot'), + checktextdomain = require('gulp-checktextdomain'); + +/* POT file task + ------------------------------------- */ +gulp.task('pot', function () { + return gulp.src('**/*.php') + .pipe(sort()) + .pipe(wpPot({ + package: 'TGM Plugin Activation', + domain: 'tgmpa', //textdomain + destFile: 'tgmpa.pot', + lastTranslator: '', + team: 'TGMPA' + })) + .pipe(gulp.dest('languages')); +}); + +/* Text-domain task + ------------------------------------- */ +gulp.task('textdomain', function () { + var options = { + text_domain: 'tgmpa', + keywords: [ + '__:1,2d', + '_e:1,2d', + '_x:1,2c,3d', + 'esc_html__:1,2d', + 'esc_html_e:1,2d', + 'esc_html_x:1,2c,3d', + 'esc_attr__:1,2d', + 'esc_attr_e:1,2d', + 'esc_attr_x:1,2c,3d', + '_ex:1,2c,3d', + '_n:1,2,4d', + '_nx:1,2,4c,5d', + '_n_noop:1,2,3d', + '_nx_noop:1,2,3c,4d' + ], + correct_domain: true + }; + return gulp.src('**/*.php') + .pipe(checktextdomain(options)) +}); + +/* Default Gulp task + ------------------------------------- */ +gulp.task('default', function () { + // Run all the tasks! + gulp.start('textdomain','pot'); +}); diff --git a/package.json b/package.json new file mode 100644 index 00000000..668a554c --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "name": "TGMPA", + "private": true, + "devDependencies": { + "fs-extra": "^0.30.0", + "gulp": "^3.9.1", + "gulp-sort": "^2.0.0", + "gulp-util": "^3.0.7", + "gulp-wp-pot": "^1.2.2", + "gulp-checktextdomain": "^1.0.2" + } +}