updateLocale() public method

Update the .po file headers by domain (mainly source-file paths)
public updateLocale ( $localePath, $locale, $domain ) : boolean
$localePath
$locale
$domain
return boolean
コード例 #1
0
 /**
  * Test the update 
  */
 public function testFileSystem()
 {
     // Domain path test
     $domainPath = $this->fileSystem->getDomainPath();
     // Locale path test
     $locale = 'es_AR';
     $localePath = $this->fileSystem->getDomainPath($locale);
     // Create locale test
     $localesGenerated = $this->fileSystem->generateLocales();
     $this->assertTrue($this->fileSystem->checkDirectoryStructure(true));
     $this->assertCount(3, $localesGenerated);
     $this->assertTrue(is_dir($domainPath));
     $this->assertTrue(strpos($domainPath, 'i18n') !== false);
     foreach ($localesGenerated as $localeGenerated) {
         $this->assertTrue(file_exists($localeGenerated));
     }
     $this->assertTrue(is_dir($localePath));
     // Update locale test
     $this->assertTrue($this->fileSystem->updateLocale($localePath, $locale, "backend"));
 }