diff --git a/translations/translationtool/src/translationtool.php b/translations/translationtool/src/translationtool.php index 42513563..8aa06618 100644 --- a/translations/translationtool/src/translationtool.php +++ b/translations/translationtool/src/translationtool.php @@ -67,7 +67,7 @@ public function createPotFile() { $this->createFakeFileForVueFiles(); $this->createFakeFileForLocale(); $translatableFiles = $this->findTranslatableFiles( - ['.php', '.js', '.jsx', '.mjs', '.html', '.ts', '.tsx'], + ['.php', '.js', '.jsx', '.mjs', '.html', '.ts', '.tsx', '.py'], ['.min.js'] ); @@ -79,6 +79,8 @@ public function createPotFile() { $keywords = ''; if (substr($entry, -4) === '.php') { $keywords = '--keyword=t --keyword=n:1,2'; + } else if (substr($entry, -3) === '.py') { + $keywords = '--keyword=_ --keyword=_n:1,2'; } else { $keywords = '--keyword=t:2 --keyword=n:2,3'; } @@ -86,6 +88,8 @@ public function createPotFile() { $language = '--language='; if (substr($entry, -4) === '.php') { $language .= 'PHP'; + } else if (substr($entry, -3) === '.py') { + $language .= 'Python'; } else { $language .= 'Javascript'; } diff --git a/translations/translationtool/translationtool.phar b/translations/translationtool/translationtool.phar index 20161563..28cd95fa 100755 Binary files a/translations/translationtool/translationtool.phar and b/translations/translationtool/translationtool.phar differ