mirror of https://github.com/espruino/BangleApps
Add better deprecation descriptions
parent
74e5b6cb9f
commit
315d4b79d9
|
@ -209,7 +209,7 @@ exports = {
|
||||||
}
|
}
|
||||||
return s.substr(0, i + 3) + r + (d ? '${locale.decimal_point}' + d: '');
|
return s.substr(0, i + 3) + r + (d ? '${locale.decimal_point}' + d: '');
|
||||||
},
|
},
|
||||||
currency: n => {console.log("Warning: Currency information is deprecated");return ${js("£")}+exports.number(n)},
|
currency: n => {console.log("Warning: Currency information is deprecated, see https://github.com/espruino/BangleApps/issues/3269");return ${js("£")}+exports.number(n)},
|
||||||
distance: (n,dp) => n < ${distanceUnits[locale.distance[1]]} ? round(${unitConv(distanceUnits[locale.distance[0]])},dp) + ${js(locale.distance[0])} : round(${unitConv(distanceUnits[locale.distance[1]])},dp) + ${js(locale.distance[1])},
|
distance: (n,dp) => n < ${distanceUnits[locale.distance[1]]} ? round(${unitConv(distanceUnits[locale.distance[0]])},dp) + ${js(locale.distance[0])} : round(${unitConv(distanceUnits[locale.distance[1]])},dp) + ${js(locale.distance[1])},
|
||||||
speed: (n,dp) => round(${unitConv(speedUnits[locale.speed])},dp) + ${js(locale.speed)},
|
speed: (n,dp) => round(${unitConv(speedUnits[locale.speed])},dp) + ${js(locale.speed)},
|
||||||
temp: (t,dp) => round(${temperature},dp) + ${js(locale.temperature)},
|
temp: (t,dp) => round(${temperature},dp) + ${js(locale.temperature)},
|
||||||
|
|
|
@ -3,12 +3,20 @@ declare module Locale {
|
||||||
|
|
||||||
type Locale = {
|
type Locale = {
|
||||||
name: string,
|
name: string,
|
||||||
/** @deprecated */
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* There was no use case for this variable.
|
||||||
|
* For more details, see https://github.com/espruino/BangleApps/issues/3269
|
||||||
|
*/
|
||||||
currencySym: string,
|
currencySym: string,
|
||||||
dow(date: Date, short?: ShortBoolean): string,
|
dow(date: Date, short?: ShortBoolean): string,
|
||||||
month(date: Date, short?: ShortBoolean): string,
|
month(date: Date, short?: ShortBoolean): string,
|
||||||
number(n: number): string,
|
number(n: number): string,
|
||||||
/** @deprecated */
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* There was no use case for this method.
|
||||||
|
* For more details, see https://github.com/espruino/BangleApps/issues/3269
|
||||||
|
*/
|
||||||
currency(c: number): string,
|
currency(c: number): string,
|
||||||
distance(d: number): string,
|
distance(d: number): string,
|
||||||
speed(s: number): string,
|
speed(s: number): string,
|
||||||
|
|
Loading…
Reference in New Issue