Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automation #635

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
12 changes: 6 additions & 6 deletions class-tgm-plugin-activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,38 +338,38 @@ public function init() {
/* translators: %s: plugin name. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be a separate PR please.

'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'
Expand Down
61 changes: 61 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/**
* Give Gulp File
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect comment.

*
* 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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put these TGMPA-specific values into package.json, and have this file read from there.

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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, read from package.json.

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');
});
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}