Skip to content

Commit

Permalink
make translate files commands public
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmuhittin committed Apr 2, 2019
1 parent fd41d4f commit 3f78716
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/commands/TranslateFilesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public function __construct($base_locale = 'en', $locales = 'tr,it', $target_fil
{
parent::__construct();
$this->base_locale = $base_locale;
$this->locales = $locales;
$this->target_files = $target_files;
$this->locales = array_filter(explode(",", $locales));
$this->target_files = array_filter(explode(",", $target_files));
$this->force = $force;
$this->json = $json;
$this->verbose = $verbose;
$this->excluded_files = $excluded_files;
$this->excluded_files = array_filter(explode(",", $excluded_files));
}

/**
Expand Down Expand Up @@ -180,7 +180,7 @@ private static function translate_via_api_key($base_locale, $locale, $text){
* @param $locale
* @throws \Exception
*/
private function translate_php_array_files($locale)
public function translate_php_array_files($locale)
{
$files = preg_grep('/^([^.])/', scandir(resource_path('lang/' . $this->base_locale)));

Expand Down Expand Up @@ -286,9 +286,11 @@ private function explore_strings(){

/**
* @param $locale
* @param $stringKeys
* @throws \ErrorException
* @throws \Exception
*/
private function translate_json_array_file($locale,$stringKeys)
public function translate_json_array_file($locale,$stringKeys)
{
$new_lang = [];
$json_existing_translations = [];
Expand Down

0 comments on commit 3f78716

Please sign in to comment.