MOBILE-2613 lang: Add option to make create lang index faster
This commit is contained in:
		
							parent
							
								
									b015770835
								
							
						
					
					
						commit
						c7e799b75b
					
				| @ -219,6 +219,7 @@ function find_better_file { | |||||||
| 
 | 
 | ||||||
| #Parses the file. | #Parses the file. | ||||||
| function parse_file { | function parse_file { | ||||||
|  |     findbetter=$2 | ||||||
|     keys=`jq -r 'keys[]' $1` |     keys=`jq -r 'keys[]' $1` | ||||||
|     for key in $keys; do |     for key in $keys; do | ||||||
|         # Check if already parsed. |         # Check if already parsed. | ||||||
| @ -229,7 +230,7 @@ function parse_file { | |||||||
|         value=`$exec` |         value=`$exec` | ||||||
|         if [ -z "$found" ] || [ "$found" == 'null' ]; then |         if [ -z "$found" ] || [ "$found" == 'null' ]; then | ||||||
|             guess_file $key "$value" |             guess_file $key "$value" | ||||||
|         else |         elif [ ! -z "$findbetter" ]; then | ||||||
|             find_better_file "$key" "$value" "$found" |             find_better_file "$key" "$value" "$found" | ||||||
|         fi |         fi | ||||||
|     done |     done | ||||||
| @ -253,7 +254,8 @@ if [ ! -f 'langindex.json' ]; then | |||||||
|     echo "{}" > langindex.json |     echo "{}" > langindex.json | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| parse_file '../src/assets/lang/en.json' | findbetter=$1 | ||||||
|  | parse_file '../src/assets/lang/en.json' $findbetter | ||||||
| 
 | 
 | ||||||
| echo | echo | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user