Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit 15954e2

Browse files
author
Stephen Miller
committed
temporary fix to not try to translate english words into english
1 parent 4aaf657 commit 15954e2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/language/language.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
async function tr_start(): Awaitable<void> {
88
$config = await Configuration::gen('language');
9+
global $language; // temporary fix
910
$language = $config->getValue();
1011
$document_root = must_have_string(Utils::getSERVER(), 'DOCUMENT_ROOT');
1112
if (preg_match('/^[^,;]+$/', $language) &&
@@ -28,8 +29,12 @@ function tr(string $word): string {
2829
/* HH_IGNORE_ERROR[2049] */
2930
/* HH_IGNORE_ERROR[4106] */
3031
global $lang;
32+
global $language;
3133
/* HH_IGNORE_ERROR[2050] */
32-
if (array_key_exists($word, $lang)) {
34+
if ($language === 'en') { // temporary fix for
35+
return $word; // reducing function calls to
36+
} // tr()
37+
elseif (array_key_exists($word, $lang)) {
3338
/* HH_IGNORE_ERROR[2050] */
3439
return $lang[$word];
3540
} else {

0 commit comments

Comments
 (0)