Skip to content

Conversation

@stasm
Copy link
Contributor

@stasm stasm commented Oct 30, 2017

https://bugzilla.mozilla.org/show_bug.cgi?id=1412808

Its most common use-case can be fullfilled with a simple FTL.TextElement() because CONCAT is also capable of concatenating TextElements and Placables.

Its other use-case (defining a hard-coded value for a Message) is rare and the alternative is not too bad:

FTL.Pattern([
    FTL.TextElement("Hardcoded value")
])

Its third use-case was in REPLACE as the foreach function. That's already covered by the default value of foreach, however.

Copy link
Contributor

@Pike Pike left a comment

Choose a reason for hiding this comment

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

I'd avoid the trailing whitespace decision in this patch, otherwise, r=me.

evaluate(self, msg).to_json(),
ftl_message_to_json('''
channel-desc = You are on the { $channelname } channel.
channel-desc = You are on the { $channelname } channel.\u0020
Copy link
Contributor

Choose a reason for hiding this comment

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

This smells like anticipating a particular solution to bug 1374246. Want to remove the trailing whitespace in line 153 instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.

Its most common use-case can be fullfilled with a simple
FTL.TextElement() because CONCAT is also capable of concatenating
TextElements and Placables.

Its other use-case (defining a hard-coded value for a Message) is rare
and the alternative is not too bad:

    FTL.Pattern([
        FTL.TextElement("Hardcoded value")
    ])

Its third use-case was in REPLACE as the foreach function. That's
already covered by the default value of foreach, however.
@stasm stasm force-pushed the migrate-remove-literal branch from 1755713 to 5f24a54 Compare October 30, 2017 18:29
@stasm stasm merged commit e12bf03 into projectfluent:master Oct 30, 2017
@stasm stasm deleted the migrate-remove-literal branch October 30, 2017 18:33
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