Skip to content

Commit

Permalink
fix: update LSQ locale's Translatable inputs default to English (reso…
Browse files Browse the repository at this point in the history
…lves #1715) (#2062)

* fix: update order of languages array in TranslatableInput

* fix: update languages of TranslatableTextarea
  • Loading branch information
chosww authored Dec 11, 2023
1 parent 010d752 commit ccaa90c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/View/Components/TranslatableInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct($name, $label, $hint = null, $model = null, $shortLa
{
$languages = $model->languages ?? config('locales.supported');

if (($key = array_search(locale(), $languages)) !== false) {
if (($key = array_search(get_written_language_for_signed_language(locale()), $languages)) !== false) {
unset($languages[$key]);
array_unshift($languages, locale());
}
Expand Down
2 changes: 1 addition & 1 deletion app/View/Components/TranslatableTextarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct($name, $label, $hint = null, $model = null, $shortLa
{
$languages = $model->languages ?? config('locales.supported');

if (($key = array_search(locale(), $languages)) !== false) {
if (($key = array_search(get_written_language_for_signed_language(locale()), $languages)) !== false) {
unset($languages[$key]);
array_unshift($languages, locale());
}
Expand Down

0 comments on commit ccaa90c

Please sign in to comment.