Skip to content

Commit 09c354c

Browse files
committed
don't include non strings in the translation list
1 parent 78930c6 commit 09c354c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ gulp.task( 'generate-translations-js', gulp.series(
107107
// Extract all gettext calls.
108108
.pipe( collect( {
109109
file: path.resolve( __dirname, './dist/translation-strings.js' ),
110-
regex: /(\/\/ translators:(.*)?[\s\n](.*)?)?_.\((.*?)\s?(i18n|STACKABLE_I18N)\s?\)/g,
110+
regex: /(\/\/ translators:(.*)?[\s\n](.*)?)?_.\(\s*['"](.*?)\s?(i18n|STACKABLE_I18N)\s?\)/g,
111111
} ) )
112112
},
113113
function gatherBlockJsonStrings( cb ) {
@@ -189,7 +189,7 @@ gulp.task( 'generate-translations-php', gulp.series(
189189
// Extract all gettext calls.
190190
.pipe( collect( {
191191
file: 'dist/translation-strings.php',
192-
regex: /(\/\/ translators:(.*)?[\s\n](.*)?)?_.\((.*?)\s?(i18n|STACKABLE_I18N)\s?\)/g,
192+
regex: /(\/\/ translators:(.*)?[\s\n](.*)?)?_.\(\s*['"](.*?)\s?(i18n|STACKABLE_I18N)\s?\)/g,
193193
} ) )
194194
},
195195
function cleanupPHPTranslationFile() {

0 commit comments

Comments
 (0)