Skip to content

Commit

Permalink
hotfix: deepl deprecation of 2 letter locale code
Browse files Browse the repository at this point in the history
  • Loading branch information
kalebheitzman committed Mar 4, 2024
1 parent 69f2694 commit 2035880
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/task/autotranslate_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ public function execute() {
$sourcerecord = $DB->get_record('filter_autotranslate', ['hash' => $job->hash, 'lang' => $sitelang]);
$targetrecord = $DB->get_record('filter_autotranslate', ['hash' => $job->hash, 'lang' => $job->lang]);

if ($job->lang === 'en') {
$job->lang = 'en-US';
}

// Get glossary if it exists.
$glossary = $DB->get_record(
'filter_autotranslate_gids',
Expand Down

0 comments on commit 2035880

Please sign in to comment.