diff options
author | 2023-10-02 20:53:41 +0600 | |
---|---|---|
committer | 2023-10-02 20:53:41 +0600 | |
commit | c318bbff57341429af5d646516788074a2d04a3c (patch) | |
tree | 1fcc2b0d9008ebe43ba3c1c1fa4b8ff4e74906bd /po/scripts/potfiles.py | |
parent | ee71f34db54722e5d4be44870ed9148536487a27 (diff) | |
download | jadupc-remote-support-console-c318bbff57341429af5d646516788074a2d04a3c.tar.gz jadupc-remote-support-console-c318bbff57341429af5d646516788074a2d04a3c.zip |
Add Bangla translations
Signed-off-by: Mubashshir <ahm@jadupc.com>
Diffstat (limited to 'po/scripts/potfiles.py')
-rwxr-xr-x | po/scripts/potfiles.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/po/scripts/potfiles.py b/po/scripts/potfiles.py new file mode 100755 index 0000000..4b00743 --- /dev/null +++ b/po/scripts/potfiles.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +from os import path, environ as ENV + +source, build = (ENV['MESON_SOURCE_ROOT'], ENV['MESON_BUILD_ROOT'],) +if not all([path.isdir(source), path.isdir(build)]): + print("Must be run inside meson.") + exit(1) + +with open(path.join(source, 'po', 'POTFILES'), 'w') as p: + with open(path.join(build, 'po', 'POTFILES')) as f: + for fp in map(str.strip, f.readlines()): + if path.isfile(path.join(source, fp)): + print(f'Found {fp}') + print(fp, file=p) + elif path.isfile(path.join(build, fp)): + print(f'Found {path.relpath(path.join(build, fp), source)}') + print(path.relpath(path.join(build, fp), source), file=p) |