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 Ember.String.fmt #15882

Merged
merged 1 commit into from
Jan 1, 2018
Merged

Remove Ember.String.fmt #15882

merged 1 commit into from
Jan 1, 2018

Conversation

locks
Copy link
Contributor

@locks locks commented Nov 29, 2017

No description provided.

@locks locks mentioned this pull request Nov 29, 2017
34 tasks
@rwjblue
Copy link
Member

rwjblue commented Nov 29, 2017

Seems good to me. We need to ensure this functionality sticks around when you have ember-2-legacy addon installed, but its super easy to just move the implementation over there.

Can you make an issue over on https://github.com/emberjs/ember-2-legacy to add support to add these back when the legacy addon is present? I just don't want to lose track...

@@ -49,35 +49,6 @@ const STRING_DECAMELIZE_REGEXP = (/([a-z\d])([A-Z])/g);

const DECAMELIZE_CACHE = new Cache(1000, str => str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase());

function _fmt(str, formats) {
Copy link
Contributor

@sduquej sduquej Dec 1, 2017

Choose a reason for hiding this comment

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

_fmt is used in loc:

function loc(str, formats) {
if (!isArray(formats) || arguments.length > 2) {
formats = Array.prototype.slice.call(arguments, 1);
}
str = getString(str) || str;
return _fmt(str, formats);
}

and fmt is referenced in the documentation for it.

Think we'll need to update these too. (Happy to help with this in any way)

@lorcan
Copy link
Contributor

lorcan commented Dec 1, 2017

Ember.String.loc also depends on the same functionality of Ember.String.fmt. Is there a case for deprecating Ember.String.loc? Too late for 3.0.0, but worth flagging?

@locks
Copy link
Contributor Author

locks commented Dec 2, 2017

@lorcan thanks for the review. loc is already deprecated by RFC 236, and you can follow the implementation of this deprecation in #15624.
As mentioned in The Road to Ember 3.0, "No additional 3.0-targeted deprecations will be introduced."

If we manage to finish all the Ember.String work soon, the deprecation should land in the 3.x series, with an until of 4.0.0.

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.

4 participants