<commit_before>var gulp = require( 'gulp' );
var plugins = require( 'gulp-load-plugins' )();
var sequence = require( 'run-sequence' );
var renameLangs = require( '../plugins/gulp-rename-langs.js' );
var splitTranslations = require( '../plugins/gulp-split-translations.js' );
var sanitizeTranslations = require( '../plugins/gulp-sanitize-translations.js' );

module.exports = function( config )
{
	gulp.task( 'translations:extract', function()
	{
		return gulp.src( [
			'src/**/*.{js,html}',
			'!src/bower-lib/**/*',
		] )
			.pipe( plugins.angularGettext.extract( 'main.pot' ) )
			.pipe( gulp.dest( 'build/translations' ) );
	} );

	gulp.task( 'translations:compile', function()
	{
		return gulp.src( config.libDir + '/' + config.translations + '/**/*.po' )
			.pipe( plugins.angularGettext.compile( {<commit_msg>Fix translation extraction. Was breaking because it only pulls from js and html. TS doesn't work. Changed to pull from the build files folder instead.<commit_after>var gulp = require( 'gulp' );
var plugins = require( 'gulp-load-plugins' )();
var sequence = require( 'run-sequence' );
var renameLangs = require( '../plugins/gulp-rename-langs.js' );
var splitTranslations = require( '../plugins/gulp-split-translations.js' );
var sanitizeTranslations = require( '../plugins/gulp-sanitize-translations.js' );

module.exports = function( config )
{
	gulp.task( 'translations:extract', function()
	{
		return gulp.src( [
			'build/dev/**/*.{js,html}',
		] )
			.pipe( plugins.angularGettext.extract( 'main.pot' ) )
			.pipe( gulp.dest( 'build/translations' ) );
	} );

	gulp.task( 'translations:compile', function()
	{
		return gulp.src( config.libDir + '/' + config.translations + '/**/*.po' )
			.pipe( plugins.angularGettext.compile( {
{'fraction_non_alphanumeric': 0.18467695826186392, 'fraction_numerical': 0.0, 'mean_word_length': 4.087209302325581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '784000', 'n_tokens_mistral': 624, 'n_tokens_neox': 598, 'n_words': 123}