@curless/hotel-storefront 0.55.0 → 0.55.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tools.js CHANGED
@@ -1179,7 +1179,8 @@ export const outputSchemasFor = (schemas, caps, lang, also = {}) => {
1179
1179
  !also.accent &&
1180
1180
  !also.primary &&
1181
1181
  !also.fonts &&
1182
- !also.homeImage)
1182
+ !also.homeImage &&
1183
+ !also.brandNames)
1183
1184
  return schemas;
1184
1185
  return Object.fromEntries(Object.entries(schemas).map(([name, schema]) => {
1185
1186
  const s = schema;
@@ -1197,6 +1198,9 @@ export const outputSchemasFor = (schemas, caps, lang, also = {}) => {
1197
1198
  // And the dark page's logo, where the group gave one.
1198
1199
  if (also.logoDark)
1199
1200
  properties.logoDarkUrl = STR;
1201
+ // And the group's own name in other languages, where its deployment gives them.
1202
+ if (also.brandNames)
1203
+ properties.brandNames = OBJ;
1200
1204
  // And the group's own colour, where its deployment gives one.
1201
1205
  if (also.accent)
1202
1206
  properties.accent = { type: 'string', pattern: '^#[0-9a-fA-F]{6}$' };
@@ -1987,6 +1991,8 @@ const common = (deps, key) => {
1987
1991
  const caps = deps.backend.capabilities ?? FULL_CAPABILITIES;
1988
1992
  return {
1989
1993
  brand: deps.vocab.brand,
1994
+ // The group in the card's language (「没有发到亚朵」) - see `HotelConfig.names`.
1995
+ ...(deps.brandNames ? { brandNames: deps.brandNames } : {}),
1990
1996
  ...(deps.logoUrl ? { logoUrl: deps.logoUrl } : {}),
1991
1997
  ...(deps.logoDarkUrl ? { logoDarkUrl: deps.logoDarkUrl } : {}),
1992
1998
  ...(deps.accent ? { accent: deps.accent } : {}),
@@ -5114,7 +5120,13 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
5114
5120
  : {}),
5115
5121
  ...degraded.structured,
5116
5122
  },
5117
- text: `${total} ${branded(deps.vocab, n)} in ${facets.cities.length} cities across ${countries.length} ${countries.length === 1 ? 'country' : 'countries'}, to choose from by region, country and city - ${regions.map((r) => `${r.name}: ${ctx.noCards ? everyWithCities(r.countries) : every(r.countries)}`).join('; ')}. A city or a country lists its ${n}. ${degraded.said ? `${degraded.said} ` : ''}${forPlans}`,
5123
+ // ⚠️ NOTHING TO SHOW IS SAID AS THAT (0.55.1), as the card says it: 「0 hotels in 0
5124
+ // cities across 0 countries, to choose from by region, country and city - .」 was a
5125
+ // home of places over none - Otaless on a backend with no group answering. Then the
5126
+ // groups that did not answer, by name; no places, no plans.
5127
+ text: total === 0
5128
+ ? `There are no ${n} to show right now.${degraded.said ? ` ${degraded.said}` : ''}`
5129
+ : `${total} ${branded(deps.vocab, n)} in ${facets.cities.length} cities across ${countries.length} ${countries.length === 1 ? 'country' : 'countries'}, to choose from by region, country and city - ${regions.map((r) => `${r.name}: ${ctx.noCards ? everyWithCities(r.countries) : every(r.countries)}`).join('; ')}. A city or a country lists its ${n}. ${degraded.said ? `${degraded.said} ` : ''}${forPlans}`,
5118
5130
  };
5119
5131
  }
5120
5132
  if (hotels.length === 0) {