namespace Transvision; use Cache\Cache; use VCS\Git; use VCS\Mercurial; use VCS\Subversion; foreach (Project::getRepositories() as $repo) { // Get the right locale for this repo $locale = Project::getLocaleInContext($page_locale, $repo); // We don't care about en-US if ($locale == 'en-US') { continue; } if (in_array($locale, Project::getRepositoryLocales($repo))) { $ref_locale = Project::getReferenceLocale($repo); // Get VCS data $repo_vcs = VersionControl::VCSRepoName($repo); $repo_path = $repo_vcs . '/' . $locale; switch (VersionControl::getVCS($repo)) { case 'hg': $vcs = new Mercurial(HG . $repo_path); break; case 'svn': $vcs = new Subversion(SVN . $repo_path); break; case 'git': $vcs = new Git(GIT . $repo_path); break; } // Extract, cache and store VCS data
public function testGetReferenceLocale() { $obj = new _Project(); $this->string($obj->getReferenceLocale('central'))->isEqualTo('en-US'); $this->string($obj->getReferenceLocale('mozilla_org'))->isEqualTo('en-US'); }