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

Bug 1434998 - Allow for REPLACE values to be Patterns or PatternElements #41

Merged
merged 2 commits into from
Feb 2, 2018

Conversation

stasm
Copy link
Contributor

@stasm stasm commented Feb 2, 2018

@stasm stasm requested a review from zbraniecki February 2, 2018 17:08
@stasm
Copy link
Contributor Author

stasm commented Feb 2, 2018

@zbraniecki This should help with the migration in bug 1424682. The first commit makes it possible to use Patterns and PatternElements as replacement values in REPLACE. Take a look at the changes in ast.py and the tests. The second commit is a refactor to make the code easier to understand and more Pythonic.

{
'#1': FTL.Placeable(
EXTERNAL_ARGUMENT('user')
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it work also with just EXTERNAL_ARGUMENT('user')?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, all other tests in this file are written that way :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stasm stasm merged commit 3d791a7 into projectfluent:master Feb 2, 2018
@stasm stasm deleted the replace-pattern branch February 2, 2018 18:28
@stasm stasm added this to the python-fluent 0.6.1 milestone Feb 6, 2018
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.

2 participants