Skip to content

Commit

Permalink
added textdomain, ready for 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Oct 3, 2015
1 parent 93b81b3 commit 3b11be4
Show file tree
Hide file tree
Showing 28 changed files with 344 additions and 140 deletions.
252 changes: 146 additions & 106 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,119 +1,159 @@
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsbanner: '/*!\n' +
' * <%= pkg.pluginName %> Scripts - Version <%= pkg.version %>\n' +
' * \n' +
' * Modifications and Additions to WPCF7 Scripts to work with CF7BS\n' +
' * <%= pkg.author.name %> <<%= pkg.author.email %>>\n' +
' */',
pluginheader: '/*\n' +
'Plugin Name: <%= pkg.pluginName %>\n' +
'Plugin URI: <%= pkg.homepage %>\n' +
'Description: <%= pkg.description %>\n' +
'Version: <%= pkg.version %>\n' +
'Author: <%= pkg.author.name %>\n' +
'Author URI: <%= pkg.author.url %>\n' +
'License: <%= pkg.license.name %>\n' +
'License URI: <%= pkg.license.url %>\n' +
'*/',
fileheader: '/**\n' +
' * @package CF7BS\n' +
' * @version <%= pkg.version %>\n' +
' * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n' +
' */',
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsbanner: '/*!\n' +
' * <%= pkg.pluginName %> Scripts - Version <%= pkg.version %>\n' +
' * \n' +
' * Modifications and Additions to WPCF7 Scripts to work with CF7BS\n' +
' * <%= pkg.author.name %> <<%= pkg.author.email %>>\n' +
' */',
pluginheader: '/*\n' +
'Plugin Name: <%= pkg.pluginName %>\n' +
'Plugin URI: <%= pkg.homepage %>\n' +
'Description: <%= pkg.description %>\n' +
'Version: <%= pkg.version %>\n' +
'Author: <%= pkg.author.name %>\n' +
'Author URI: <%= pkg.author.url %>\n' +
'License: <%= pkg.license.name %>\n' +
'License URI: <%= pkg.license.url %>\n' +
'Text Domain: bootstrap-for-contact-form-7\n' +
'Domain Path: /languages/\n' +
'*/',
fileheader: '/**\n' +
' * @package CF7BS\n' +
' * @version <%= pkg.version %>\n' +
' * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n' +
' */',

clean: {
scripts: [
'assets/scripts.min.js'
]
},
clean: {
scripts: [
'assets/scripts.min.js'
],
translation: [
'languages/bootstrap-for-contact-form-7.pot'
]
},

jshint: {
options: {
jshintrc: 'assets/.jshintrc'
},
src: [
'assets/scripts.js'
]
},
jshint: {
options: {
jshintrc: 'assets/.jshintrc'
},
src: [
'assets/scripts.js'
]
},

uglify: {
options: {
preserveComments: 'some',
report: 'min'
},
dist: {
src: 'assets/scripts.js',
dest: 'assets/scripts.min.js'
}
},
uglify: {
options: {
preserveComments: 'some',
report: 'min'
},
dist: {
src: 'assets/scripts.js',
dest: 'assets/scripts.min.js'
}
},

usebanner: {
options: {
position: 'top',
banner: '<%= jsbanner %>'
},
files: {
src: [
'assets/scripts.min.js'
]
}
},
usebanner: {
options: {
position: 'top',
banner: '<%= jsbanner %>'
},
files: {
src: [
'assets/scripts.min.js'
]
}
},

replace: {
header: {
src: [
'bootstrap-for-contact-form-7.php'
],
overwrite: true,
replacements: [{
from: /((?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:\/\/.*))/,
to: '<%= pluginheader %>'
}]
},
version: {
src: [
'bootstrap-for-contact-form-7.php',
'modifications.php',
'classes/*.php',
'modules/*.php'
],
overwrite: true,
replacements: [{
from: /\/\*\*\s+\*\s@package\s[^*]+\s+\*\s@version\s[^*]+\s+\*\s@author\s[^*]+\s\*\//,
to: '<%= fileheader %>'
}]
}
}
replace: {
header: {
src: [
'bootstrap-for-contact-form-7.php'
],
overwrite: true,
replacements: [{
from: /((?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:\/\/.*))/,
to: '<%= pluginheader %>'
}]
},
version: {
src: [
'bootstrap-for-contact-form-7.php',
'modifications.php',
'classes/*.php',
'modules/*.php'
],
overwrite: true,
replacements: [{
from: /\/\*\*\s+\*\s@package\s[^*]+\s+\*\s@version\s[^*]+\s+\*\s@author\s[^*]+\s\*\//,
to: '<%= fileheader %>'
}]
}
},

});

grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks('grunt-text-replace');
makepot: {
translation: {
options: {
mainFile: 'bootstrap-for-contact-form-7.php',
domainPath: '/languages',
exclude: [ 'vendor/.*' ],
potComments: 'Copyright (c) 2014-<%= grunt.template.today("yyyy") %> <%= pkg.author.name %>',
potFilename: 'bootstrap-for-contact-form-7.pot',
potHeaders: {
'language-team': '<%= pkg.author.name %> <<%= pkg.author.email %>>',
'last-translator': '<%= pkg.author.name %> <<%= pkg.author.email %>>',
'project-id-version': '<%= pkg.name %> <%= pkg.version %>',
'report-msgid-bugs-to': '<%= pkg.homepage %>',
'x-generator': 'grunt-wp-i18n 0.5.3',
'x-poedit-basepath': '.',
'x-poedit-language': 'English',
'x-poedit-country': 'UNITED STATES',
'x-poedit-sourcecharset': 'uft-8',
'x-poedit-keywordslist': '__;_e;_x:1,2c;_ex:1,2c;_n:1,2; _nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_attr__; esc_html__;esc_attr_e; esc_html_e;esc_attr_x:1,2c; esc_html_x:1,2c;',
'x-poedit-bookmars': '',
'x-poedit-searchpath-0': '.',
'x-textdomain-support': 'yes'
},
type: 'wp-plugin'
}
}
}

grunt.registerTask('scripts', [
'clean:scripts',
'jshint',
'uglify'
]);
});

grunt.registerTask('plugin', [
'usebanner',
'replace:version',
'replace:header'
]);
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-wp-i18n');

grunt.registerTask('default', [
'scripts'
]);
grunt.registerTask('scripts', [
'clean:scripts',
'jshint',
'uglify'
]);

grunt.registerTask('build', [
'scripts',
'plugin'
]);
grunt.registerTask('translation', [
'clean:translation',
'makepot:translation'
]);

grunt.registerTask('plugin', [
'usebanner',
'replace:version',
'replace:header'
]);

grunt.registerTask('default', [
'scripts'
]);

grunt.registerTask('build', [
'scripts',
'translation',
'plugin'
]);
};
2 changes: 1 addition & 1 deletion assets/scripts.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions bootstrap-for-contact-form-7.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
Plugin Name: Bootstrap for Contact Form 7
Plugin URI: http://wordpress.org/plugins/bootstrap-for-contact-form-7/
Description: This plugin modifies the output of the popular Contact Form 7 plugin to be styled in compliance with themes using the Bootstrap CSS framework.
Version: 1.2.3
Version: 1.2.4
Author: Felix Arntz
Author URI: http://leaves-and-love.net
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bootstrap-for-contact-form-7
Domain Path: /languages/
*/
/**
* @package CF7BS
* @version 1.2.3
* @version 1.2.4
* @author Felix Arntz <[email protected]>
*/

define( 'CF7BS_VERSION', '1.2.3' );
define( 'CF7BS_VERSION', '1.2.4' );
define( 'CF7BS_MAINFILE', __FILE__ );
define( 'CF7BS_PATH', untrailingslashit( plugin_dir_path( CF7BS_MAINFILE ) ) );
define( 'CF7BS_URL', untrailingslashit( plugin_dir_url( CF7BS_MAINFILE ) ) );
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
== Changelog ==

= 1.2.4 =
* Tweaked: added textdomain for translate.wordpress.org
* Fixed: defaults are now working correctly on all field types
* Fixed: the label for attribute is no longer printed if no ID has been provided

= 1.2.3 =
* Enhanced: Arguments for every field are now filtered to allow detailed adjustments

Expand Down
2 changes: 1 addition & 1 deletion classes/CF7BS_Alert.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package CF7BS
* @version 1.2.3
* @version 1.2.4
* @author Felix Arntz <[email protected]>
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/CF7BS_Button.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package CF7BS
* @version 1.2.3
* @version 1.2.4
* @author Felix Arntz <[email protected]>
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/CF7BS_Button_Group.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package CF7BS
* @version 1.2.3
* @version 1.2.4
* @author Felix Arntz <[email protected]>
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/CF7BS_Component.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package CF7BS
* @version 1.2.3
* @version 1.2.4
* @author Felix Arntz <[email protected]>
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/CF7BS_Form_Field.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @package CF7BS
* @version 1.2.3
* @version 1.2.4
* @author Felix Arntz <[email protected]>
*/

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "felixarntz/bootstrap-for-contact-form-7",
"description": "This plugin modifies the output of the popular Contact Form 7 plugin to be styled in compliance with themes using the Bootstrap CSS framework.",
"version": "1.2.3",
"version": "1.2.4",
"license": "GPL-2.0",
"type": "wordpress-plugin",
"keywords": [
Expand Down
Binary file added languages/bootstrap-for-contact-form-7-de_DE.mo
Binary file not shown.
Loading

0 comments on commit 3b11be4

Please sign in to comment.