File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,12 +39,13 @@ sub crawlFiles{
3939 foreach my $i ( @files ){
4040 next if substr ( $i , 0, 1 ) eq ' .' ;
4141 next if $i eq ' l10n' ;
42+ next if $i eq ' node_modules' ;
4243
4344 if ( -d $dir .' /' .$i ){
4445 push ( @found , crawlFiles( $dir .' /' .$i ));
4546 }
4647 else {
47- push (@found ,$dir .' /' .$i ) if $i =~ / .*(?<!\. min)\. js$ / || $i =~ / \. php$ / ;
48+ push (@found ,$dir .' /' .$i ) if $i =~ / .*(?<!\. min)\. js$ / || $i =~ / \. vue $ / || $i =~ / \. php$ / ;
4849 }
4950 }
5051
130131 foreach my $file ( @totranslate ){
131132 next if $ignore {$file };
132133 my $keywords = ' ' ;
133- if ( $file =~ / \. js$ / ){
134+ if ( $file =~ / \. js$ / || $file =~ / \. vue $ / ){
134135 $keywords = ' --keyword=t:2 --keyword=n:2,3' ;
135136 }
136137 else {
137138 $keywords = ' --keyword=t --keyword=n:1,2' ;
138139 }
139- my $language = ( $file =~ / \. js$ / ? ' Javascript' : ' PHP' );
140+ my $language = ( $file =~ / \. js$ / || $file =~ / \. vue $ / ? ' Javascript' : ' PHP' );
140141 my $joinexisting = ( -e $output ? ' --join-existing' : ' ' );
141142 print " Reading $file \n " ;
142143 ` xgettext --output="$output " $joinexisting $keywords --language=$language "$file " --add-comments=TRANSLATORS --from-code=UTF-8 --package-version="8.0.0" --package-name="ownCloud Core" --msgid-bugs-address="translations\@ owncloud.org"` ;
You can’t perform that action at this time.
0 commit comments