-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ videomass (5.0.17-1) UNRELEASED; urgency=medium | |
packages. | ||
* Added `babel` as a new dependency needed for compiling language catalogs | ||
when building binaries. | ||
* Added compile MO files option before build standalone App using pyinstaller. | ||
|
||
-- Gianluca Pernigotto <[email protected]> Sat, 13 Jul 2024 12:00:00 +0200 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyleft (c) Videomass Development Team. | ||
# Distributed under the terms of the GPL3 License. | ||
|
||
import os | ||
import sys | ||
from babel.messages.frontend import compile_catalog | ||
|
||
|
||
def build_translation_catalog(pathtolocale): | ||
cmd = compile_catalog() | ||
cmd.directory = pathtolocale | ||
cmd.domain = "videomass" | ||
cmd.statistics = True | ||
cmd.finalize_options() | ||
cmd.run() | ||
|
||
if __name__ == '__main__': | ||
if not len(sys.argv) > 1: | ||
sys.exit('ERROR: Please provide path to locale directory.') | ||
|
||
pathtolocale = sys.argv[1] | ||
if os.path.exists(pathtolocale) and os.path.isdir(pathtolocale): | ||
build = build_translation_catalog(pathtolocale) | ||
else: | ||
sys.exit(f'ERROR: Invalid pathname «{pathtolocale}».') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters