| @@ -173,10 +173,10 @@ | ||
| 173 | 173 | |
| 174 | 174 | $texts_unknow_by_chunk = array(); |
| 175 | 175 | $current_chunk = array(); |
| 176 | 176 | $current_chars = 0; |
| 177 | - $max_items_per_chunk = (int) ( WPLNG_MAX_TRANSLATIONS_STR / 2 ); | |
| 178 | - $max_chars_per_chunk = (int) ( WPLNG_MAX_TRANSLATIONS_CHAR / 2 ); | |
| 177 | + $max_items_per_chunk = (int) ( WPLNG_MAX_TRANSLATIONS_STR / 4 ); | |
| 178 | + $max_chars_per_chunk = (int) ( WPLNG_MAX_TRANSLATIONS_CHAR / 4 ); | |
| 179 | 179 | |
| 180 | 180 | foreach ( $args['texts_unknow'] as $text_unknow ) { |
| 181 | 181 | |
| 182 | 182 | $text = (string) $text_unknow; |
| @@ -202,8 +202,11 @@ | ||
| 202 | 202 | |
| 203 | 203 | $current_chunk[] = wplng_encryption_encrypt( $text ); |
| 204 | 204 | $current_chars += $len; |
| 205 | 205 | ++$numer_of_translated_texts; |
| 206 | + | |
| 207 | + $max_items_per_chunk = (int) ( WPLNG_MAX_TRANSLATIONS_STR / 2 ); | |
| 208 | + $max_chars_per_chunk = (int) ( WPLNG_MAX_TRANSLATIONS_CHAR / 2 ); | |
| 206 | 209 | } |
| 207 | 210 | |
| 208 | 211 | // Push last chunk if any |
| 209 | 212 | if ( ! empty( $current_chunk ) ) { |