Skip to content

Add script for handling translations #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Extend instead of append list for locale arg
  • Loading branch information
rffontenelle committed Aug 2, 2024
commit 66820a55a24cc6188f52ca1f79c2272833e84f32
4 changes: 2 additions & 2 deletions babel_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ def update_catalogs(locale: str):
"""Update translations from existing message catalogs"""
cmd = ["pybabel", "update", "-i", POT_FILE, "-d", LOCALES_DIR]
if locale != "":
cmd.append(["-l", locale])
cmd.extend(["-l", locale])
subprocess.run(cmd, check=True)


def compile_catalogs(locale: str):
"""Compile existing message catalogs"""
cmd = ["pybabel", "compile", "-d", LOCALES_DIR]
if locale != "":
cmd.append(["-l", locale])
cmd.extend(["-l", locale])
subprocess.run(cmd, check=True)


Expand Down