WordPress.org

Make WordPress Core

Changeset 8556


Ignore:
Timestamp:
08/05/08 21:28:50 (6 years ago)
Author:
ryan
Message:

Allow merging of similarly named text domains. Props sambauers. fixes #7376 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r8404 r8556  
    243243    global $l10n; 
    244244 
    245     if (isset($l10n[$domain])) 
    246         return; 
    247  
    248245    if ( is_readable($mofile)) 
    249246        $input = new CachedFileReader($mofile); 
     
    251248        return; 
    252249 
    253     $l10n[$domain] = new gettext_reader($input); 
     250    $gettext = new gettext_reader($input); 
     251 
     252    if (isset($l10n[$domain])) { 
     253        $l10n[$domain]->load_tables(); 
     254        $gettext->load_tables(); 
     255        $l10n[$domain]->cache_translations = array_merge($gettext->cache_translations, $l10n[$domain]->cache_translations); 
     256    } else 
     257        $l10n[$domain] = $gettext; 
     258 
     259    unset($input, $gettext); 
    254260} 
    255261 
Note: See TracChangeset for help on using the changeset viewer.