Skip to content
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

Remove puente: add necessary babel configuration instead #19097

Merged
merged 7 commits into from
Apr 11, 2022

Conversation

diox
Copy link
Member

@diox diox commented Apr 7, 2022

def test_extract_jinja_no_options():
# Doesn't actually extract, just tests that extract_jinja() doesn't fail
# when converting our settings in options for the underlying function.
extract_jinja(BytesIO(), DEFAULT_KEYWORDS, ['L10n:'], {})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's out of scope for this but I think we should consider run a true extract (without merging the locale files) as part of the test suite. This would ensure we can actually run the extraction at all times on master branch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diox diox marked this pull request as ready for review April 11, 2022 10:57
@diox diox requested a review from eviljeff April 11, 2022 10:57
locale/templates/LC_MESSAGES/django.pot Outdated Show resolved Hide resolved
locale/templates/LC_MESSAGES/djangojs.pot Outdated Show resolved Hide resolved
babel.cfg Outdated Show resolved Hide resolved
@@ -551,52 +555,10 @@ def get_db_config(environ_var, atomic_requests=True):
'https://addons.mozilla.org/api/v5/shelves/editorial'
)

# Filename where the strings will be stored. Used in puente config below.
# Filename where the strings will be stored. Used in extract_content_strings
# management command, but note that the filename is hardcoded in babel.cfg.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a shame we can't define/generate all the babel config in one place 😞

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could generate the babel config, but that's one more cog in the machine... Alternatively we could do what puente used to do and provide our own extract command, but I thought it'd be better if we tried to stay closer to how babel works...

@diox diox merged commit 3a19fe3 into mozilla:master Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove puente
2 participants