Skip to content

Commit 049088f

Browse files
committed
fixes some typos
1 parent 7f2f918 commit 049088f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Translation/TranslationLoader.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,31 @@
1717

1818
/**
1919
* TranslationLoader loads translation messages from translation files.
20-
*
20+
*
2121
* @author Michel Salib <[email protected]>
2222
*/
2323
class TranslationLoader
2424
{
2525
/**
2626
* Loaders used for import.
27-
*
27+
*
2828
* @var array
2929
*/
3030
private $loaders = array();
31-
31+
3232
/**
3333
* Adds a loader to the translation extractor.
3434
* @param string $format The format of the loader
35-
* @param LoaderInterface $loader
35+
* @param LoaderInterface $loader
3636
*/
3737
public function addLoader($format, LoaderInterface $loader)
3838
{
3939
$this->loaders[$format] = $loader;
4040
}
41-
41+
4242
/**
4343
* Loads translation messages from a directory to the catalogue.
44-
*
44+
*
4545
* @param string $directory the directory to look into
4646
* @param MessageCatalogue $catalogue the catalogue
4747
*/
@@ -50,10 +50,10 @@ public function loadMessages($directory, MessageCatalogue $catalogue)
5050
foreach($this->loaders as $format => $loader) {
5151
// load any existing translation files
5252
$finder = new Finder();
53-
$files = $finder->files()->name('*.'.$catalogue->getLocale().$format)->in($directory);
53+
$files = $finder->files()->name('*.'.$catalogue->getLocale().'.'.$format)->in($directory);
5454
foreach ($files as $file) {
55-
$domain = substr($file->getFileName(), 0, strrpos($file->getFileName(), $input->getArgument('locale').$format) - 1);
56-
$catalogue->addCatalogue($loader->load($file->getPathname(), $input->getArgument('locale'), $domain));
55+
$domain = substr($file->getFileName(), 0, strrpos($file->getFileName(), $catalogue->getLocale().$format) - 1);
56+
$catalogue->addCatalogue($loader->load($file->getPathname(), $catalogue->getLocale(), $domain));
5757
}
5858
}
5959
}

0 commit comments

Comments
 (0)