Skip to content

Commit 0b82b52

Browse files
committed
I18N: Correct recurring lenghts typo.
Props mikaelmayer. Fixes #53600. git-svn-id: https://develop.svn.wordpress.org/trunk@51342 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0c25dca commit 0b82b52

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

src/wp-includes/pomo/mo.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ function export_to_file_handle( $fh ) {
102102
$magic = 0x950412de;
103103
$revision = 0;
104104
$total = count( $entries ) + 1; // All the headers are one entry.
105-
$originals_lenghts_addr = 28;
106-
$translations_lenghts_addr = $originals_lenghts_addr + 8 * $total;
105+
$originals_lengths_addr = 28;
106+
$translations_lengths_addr = $originals_lengths_addr + 8 * $total;
107107
$size_of_hash = 0;
108-
$hash_addr = $translations_lenghts_addr + 8 * $total;
108+
$hash_addr = $translations_lengths_addr + 8 * $total;
109109
$current_addr = $hash_addr;
110110
fwrite(
111111
$fh,
@@ -114,13 +114,13 @@ function export_to_file_handle( $fh ) {
114114
$magic,
115115
$revision,
116116
$total,
117-
$originals_lenghts_addr,
118-
$translations_lenghts_addr,
117+
$originals_lengths_addr,
118+
$translations_lengths_addr,
119119
$size_of_hash,
120120
$hash_addr
121121
)
122122
);
123-
fseek( $fh, $originals_lenghts_addr );
123+
fseek( $fh, $originals_lengths_addr );
124124

125125
// Headers' msgid is an empty string.
126126
fwrite( $fh, pack( 'VV', 0, $current_addr ) );
@@ -229,7 +229,7 @@ function import_from_reader( $reader ) {
229229
}
230230

231231
// Parse header.
232-
$header = unpack( "{$endian}revision/{$endian}total/{$endian}originals_lenghts_addr/{$endian}translations_lenghts_addr/{$endian}hash_length/{$endian}hash_addr", $header );
232+
$header = unpack( "{$endian}revision/{$endian}total/{$endian}originals_lengths_addr/{$endian}translations_lengths_addr/{$endian}hash_length/{$endian}hash_addr", $header );
233233
if ( ! is_array( $header ) ) {
234234
return false;
235235
}
@@ -240,10 +240,10 @@ function import_from_reader( $reader ) {
240240
}
241241

242242
// Seek to data blocks.
243-
$reader->seekto( $header['originals_lenghts_addr'] );
243+
$reader->seekto( $header['originals_lengths_addr'] );
244244

245245
// Read originals' indices.
246-
$originals_lengths_length = $header['translations_lenghts_addr'] - $header['originals_lenghts_addr'];
246+
$originals_lengths_length = $header['translations_lengths_addr'] - $header['originals_lengths_addr'];
247247
if ( $originals_lengths_length != $header['total'] * 8 ) {
248248
return false;
249249
}
@@ -254,13 +254,13 @@ function import_from_reader( $reader ) {
254254
}
255255

256256
// Read translations' indices.
257-
$translations_lenghts_length = $header['hash_addr'] - $header['translations_lenghts_addr'];
258-
if ( $translations_lenghts_length != $header['total'] * 8 ) {
257+
$translations_lengths_length = $header['hash_addr'] - $header['translations_lengths_addr'];
258+
if ( $translations_lengths_length != $header['total'] * 8 ) {
259259
return false;
260260
}
261261

262-
$translations = $reader->read( $translations_lenghts_length );
263-
if ( $reader->strlen( $translations ) != $translations_lenghts_length ) {
262+
$translations = $reader->read( $translations_lengths_length );
263+
if ( $reader->strlen( $translations ) != $translations_lengths_length ) {
264264
return false;
265265
}
266266

0 commit comments

Comments
 (0)