Skip to content

Commit

Permalink
Adds debug code for finding translations
Browse files Browse the repository at this point in the history
  • Loading branch information
octoberapp committed Sep 22, 2023
1 parent bb116e4 commit 92b3601
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ public function get($key, array $replace = [], $locale = null, $fallback = true)
return $line;
}

// This is debug code to determine if language keys are
// migrated to JSON or translated in the first place
//
// $locale = $locale ?: $this->locale;
// $val = parent::get($key, $replace, $locale, $fallback);
// if (!isset($this->loaded['*']['*'][$locale][$key])) {
// return is_string($val) ? '→'.$val.'←' : $val;
// }
// return $val;

return parent::get($key, $replace, $locale, $fallback);
}

Expand Down

0 comments on commit 92b3601

Please sign in to comment.