MCPcopy Create free account
hub / github.com/codecombat/codecombat / translateName

Method translateName

app/models/Product.js:38–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 translateName () {
39 if (/year_subscription/.test(this.get('name'))) {
40 return i18n.t('subscribe.year_subscription')
41 }
42 if (/lifetime_subscription/.test(this.get('name'))) {
43 return i18n.t('subscribe.lifetime')
44 }
45 return this.get('name')
46 }
47
48 purchase (token, options) {
49 if (options == null) { options = {} }

Callers 3

makeFakePayPalButtonFunction · 0.80
makeFakePayPalButtonFunction · 0.80
paymentFunction · 0.80

Calls 1

getMethod · 0.45

Tested by 2

makeFakePayPalButtonFunction · 0.64
makeFakePayPalButtonFunction · 0.64