Skip to content

Commit 786a405

Browse files
committed
Merge pull request #347 from katzwebservices/dev/1.7.6
Dev/1.7.6
2 parents b13830c + 5b16f37 commit 786a405

File tree

67 files changed

+665
-549
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+665
-549
lines changed

Gruntfile.js

Lines changed: 76 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
module.exports = function(grunt) {
22

3+
// Only need to install one package and this will load them all for you. Run:
4+
// npm install --save-dev load-grunt-tasks
5+
require('load-grunt-tasks')(grunt);
6+
37
grunt.initConfig({
48

59
pkg: grunt.file.readJSON('package.json'),
@@ -118,19 +122,80 @@ module.exports = function(grunt) {
118122

119123
// Create a ZIP file
120124
zip: 'python /usr/bin/git-archive-all ../gravityview.zip'
125+
},
126+
127+
// Build translations without POEdit
128+
makepot: {
129+
target: {
130+
options: {
131+
mainFile: 'gravityview.php',
132+
type: 'wp-plugin',
133+
domainPath: '/languages',
134+
updateTimestamp: false,
135+
exclude: ['node_modules/.*', 'assets/.*', 'vendor/.*', 'includes/lib/xml-parsers/.*', 'includes/lib/jquery-cookie/.*', 'includes/lib/standalone-phpenkoder/.*' ],
136+
potHeaders: {
137+
poedit: true,
138+
'x-poedit-keywordslist': true
139+
},
140+
processPot: function( pot, options ) {
141+
pot.headers['language'] = 'en_US';
142+
pot.headers['language-team'] = 'Katz Web Services, Inc. <support@katz.co>';
143+
pot.headers['last-translator'] = 'Katz Web Services, Inc. <support@katz.co>';
144+
pot.headers['report-msgid-bugs-to'] = 'https://gravityview.co/support/';
145+
146+
var translation,
147+
excluded_meta = [
148+
'GravityView',
149+
'Create directories based on a Gravity Forms form, insert them using a shortcode, and modify how they output.',
150+
'http://gravityview.co',
151+
'Katz Web Services, Inc.',
152+
'http://www.katzwebservices.com'
153+
];
154+
155+
for ( translation in pot.translations[''] ) {
156+
if ( 'undefined' !== typeof pot.translations[''][ translation ].comments.extracted ) {
157+
if ( excluded_meta.indexOf( pot.translations[''][ translation ].msgid ) >= 0 ) {
158+
console.log( 'Excluded meta: ' + pot.translations[''][ translation ].msgid );
159+
delete pot.translations[''][ translation ];
160+
}
161+
}
162+
}
163+
164+
return pot;
165+
}
166+
}
167+
}
168+
},
169+
170+
// Add textdomain to all strings, and modify existing textdomains in included packages.
171+
addtextdomain: {
172+
options: {
173+
textdomain: 'gravityview', // Project text domain.
174+
updateDomains: [ 'gravityview', 'gravityforms', 'edd_sl', 'edd' ] // List of text domains to replace.
175+
},
176+
target: {
177+
files: {
178+
src: [
179+
'*.php',
180+
'**/*.php',
181+
'!node_modules/**',
182+
'!tests/**',
183+
'!includes/lib/xml-parsers/**',
184+
'!includes/lib/jquery-cookie/**',
185+
'!includes/lib/standalone-phpenkoder/**'
186+
]
187+
}
188+
}
121189
}
122190
});
123191

124-
grunt.loadNpmTasks('grunt-sass');
125-
grunt.loadNpmTasks("grunt-contrib-jshint");
126-
grunt.loadNpmTasks('grunt-contrib-watch');
127-
grunt.loadNpmTasks('grunt-contrib-uglify');
128-
grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
129-
grunt.loadNpmTasks('grunt-potomo');
130-
grunt.loadNpmTasks('grunt-exec');
131-
grunt.loadNpmTasks('grunt-contrib-imagemin');
132-
grunt.loadNpmTasks('grunt-newer');
133-
134-
grunt.registerTask( 'default', [ 'sass', 'uglify', 'exec:transifex','potomo', 'imagemin', 'watch' ] );
192+
// Still have to manually add this one...
193+
grunt.loadNpmTasks('grunt-wp-i18n');
194+
195+
// Regular CSS/JS/Image Compression stuff
196+
grunt.registerTask( 'default', [ 'sass', 'uglify', 'imagemin', 'watch' ] );
197+
198+
// Translation stuff
199+
grunt.registerTask( 'translate', [ 'exec:transifex', 'potomo', 'addtextdomain', 'makepot' ] );
135200

136201
};

assets/css/admin-global.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/admin-license-key-fields.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/admin-settings.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/scss/admin-global.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
@import "font";
1414

1515
/* add gravityview menu icon */
16+
#toplevel_page_edit-post_type-gravityview-page-gravityview_settings .wp-menu-image:before,
1617
#adminmenu .menu-icon-gravityview div.wp-menu-image:before,
1718
#available-widgets [class*=gv_recent_entries] .widget-title:before,
1819
#available-widgets [class*=gravityview_search] .widget-title:before {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#gform-settings .gforms_form_settings {
2+
3+
// Margin right and bottom - provide the spacing for the buttons
4+
.edd-license-key {
5+
float: left;
6+
margin: 0 10px 10px 0;
7+
}
8+
9+
// Group the buttons together to prevent one wrapping and others not
10+
.gv-edd-button-wrapper {
11+
float: left;
12+
padding-left: 0;
13+
14+
.button,
15+
.button-primary {
16+
margin: 0 10px 10px 0!important;
17+
}
18+
19+
}
20+
21+
}

assets/css/scss/admin-settings.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
@import "admin-license-key-fields";
2+
13
/**
24
* Modify the GFAddon App Settings page
35
*/
6+
.admin_page_gravityview_settings,
47
.gravityview_page_gravityview_settings {
58

69
.gform_tab_content > h3 {
@@ -70,10 +73,6 @@
7073
display: none;
7174
}
7275

73-
#gaddon-setting-row-license_key .button {
74-
margin: 0 0 0 10px
75-
}
76-
7776
// Add the stars to the top
7877
#gform_tab_group {
7978
padding: 0;

assets/js/admin-edd-license.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
break;
6565
case 'deactivated':
6666
case 'site_inactive':
67+
default:
6768
hidebuttons = $('[data-edd_action=deactivate_license]' );
6869
showbuttons = $('[data-edd_action=activate_license],[data-edd_action=check_license]' );
6970
break;

0 commit comments

Comments
 (0)