Skip to content

Commit

Permalink
Remove short label from projects (#182)
Browse files Browse the repository at this point in the history
## Description

Short labels were only used with the row-of-pills project selector,
which is now gone.

## Test Plan

Grep for `shortLabel`, find nothing.
  • Loading branch information
oyamauchi authored Sep 23, 2024
1 parent fd8f44b commit 4928171
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 44 deletions.
6 changes: 0 additions & 6 deletions src/i18n/strings/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const templates = {
s07607bad0f288304: `reemplazo de puertas y ventanas`,
s07ecbff17886eb50: `un vehículo eléctrico usado`,
s084d252e989bd0d1: `¡Pronto dispondremos de más dinero!`,
s08fb6007b5965c82: `Vehículo eléctrico`,
s0d2b126617a4b9e6: `Ver resultados`,
s0ec469a91a15f4a5: `kilovatio hora`,
s0f06604c95e47b84: `Wisconsin`,
Expand Down Expand Up @@ -111,7 +110,6 @@ export const templates = {
s7f5b705d1bd02849: `La elegibilidad depende de la ubicación de residencia.`,
s8194d17164cbd6de: `Florida`,
s81aa671e64f2010e: `Dakota del Norte`,
s81f5c9b4a6da995f: `Césped`,
s82397872ac9bddcf: `Tamaño del hogar`,
s863623721dcb0072: str`Esperado en ${0}`,
s8735995522894316: `una secadora`,
Expand Down Expand Up @@ -156,7 +154,6 @@ export const templates = {
sb5b955a693af9c2e: `Virginia`,
sb661e8297dd681e2: `Incentivo`,
sb694f3d582a0dbb9: `Selecciona "Cabeza de familia" si tiene un hijo o pariente que vive con usted y paga más de la mitad de los gastos de su hogar. Selecciona "Conjunta" si declara sus impuestos como pareja casada.`,
sb6975fd8aa3fa26f: `Climatización`,
sb842284a98e8aed1: `una bomba de calor sin ductos`,
sb932cf0734934406: `Su código postal ayuda a determinar la cantidad de descuentos y créditos fiscales para los que califica.`,
sb9e8a9bfc8bcf398: `Rhode Island`,
Expand All @@ -170,7 +167,6 @@ export const templates = {
sc026bbb64721085f: `Casado que presenta una declaración conjunta`,
sc0a81e0d1ea51046: `Seleccione proyecto…`,
sc2e0d466583b17f8: `aislamiento del entrepiso`,
sc373af4c1a974b57: `Cocina`,
sc5b20cb72269bc4f: `Los propietarios y inquilinos califican para diferentes incentivos.`,
sc9266b1b6ae1aad4: `Esperado en 2024-2025`,
sc991c5ecbb3023ef: `aislamiento térmico`,
Expand All @@ -194,14 +190,12 @@ export const templates = {
se518d56b2bb45670: `cableado`,
se581b8fe2e188251: `Crédito de cuenta`,
se6845b7d2d664ad8: `Dakota del Sur`,
se94a76041107bbf3: `Eléctrico`,
sec13c0ca288e67eb: `aislamiento del desván/techo`,
secc3df112f8ab69d: `un vehículo eléctrico`,
sf05c1c17e90b0ddd: `Inquilino`,
sf12bd6cb13bc154f: `Arizona`,
sf1e2063bc64f3539: `Arkansas`,
sf3affd5c9f2915e0: `Connecticut`,
sf459faf797f733a9: `Impermeabilización`,
sf59668536419404a: `aislamiento del sótano`,
sf685070e5a85e7d1: `reemplazo de ductos`,
sf844ac31d5fba2c9: `impermeabilización`,
Expand Down
16 changes: 0 additions & 16 deletions src/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { MsgFn } from './i18n/use-translated';

type ProjectInfo = {
label: (msg: MsgFn) => string;
shortLabel?: (msg: MsgFn) => string;
getIcon: () => React.ReactElement;
items: ItemType[];
};
Expand All @@ -32,9 +31,6 @@ export type Project =

export const NO_PROJECT = '';

export const shortLabel = (p: Project, msg: MsgFn) =>
(PROJECTS[p].shortLabel ?? PROJECTS[p].label)(msg);

/**
* Icons, labels, and API `item` values for the various projects for which we
* show incentives.
Expand All @@ -55,10 +51,6 @@ export const PROJECTS: Record<Project, ProjectInfo> = {
'other_heat_pump',
],
label: msg => msg('Heating, ventilation & cooling'),
shortLabel: msg =>
msg('HVAC', {
desc: 'short label for "heating, ventilation & cooling"',
}),
getIcon: () => <HvacIcon width="1em" />,
},
ev: {
Expand All @@ -71,8 +63,6 @@ export const PROJECTS: Record<Project, ProjectInfo> = {
'ebike',
],
label: msg => msg('Electric transportation'),
shortLabel: msg =>
msg('EV', { desc: 'short label for "electric transportation"' }),
getIcon: () => <EvIcon width="1em" />,
},
solar: {
Expand All @@ -93,15 +83,11 @@ export const PROJECTS: Record<Project, ProjectInfo> = {
cooking: {
items: ['electric_stove'],
label: msg => msg('Cooking stove/range'),
shortLabel: msg =>
msg('Cooking', { desc: 'short label for stove/range incentives' }),
getIcon: () => <CookingIcon width="1em" />,
},
wiring: {
items: ['electric_panel', 'electric_wiring'],
label: msg => msg('Electrical panel & wiring'),
shortLabel: msg =>
msg('Electrical', { desc: 'short for "electrical panel and wiring"' }),
getIcon: () => <ElectricalWiringIcon width="1em" />,
},
weatherization_and_efficiency: {
Expand All @@ -122,13 +108,11 @@ export const PROJECTS: Record<Project, ProjectInfo> = {
'energy_audit',
],
label: msg => msg('Weatherization & efficiency'),
shortLabel: msg => msg('Weatherization'),
getIcon: () => <WeatherizationIcon width="1em" />,
},
lawn_care: {
items: ['electric_outdoor_equipment'],
label: msg => msg('Lawn Care'),
shortLabel: msg => msg('Lawn'),
getIcon: () => <LawnMowerIcon width="1em" height="1em" />,
},
};
22 changes: 0 additions & 22 deletions translations/es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@
<trans-unit id="s5a2b25d2a25ce5b9">
<source>Heating, ventilation &amp; cooling</source>
<target>Sistemas de climatización</target></trans-unit>
<trans-unit id="sb6975fd8aa3fa26f">
<source>HVAC</source>

<note from="lit-localize">short label for "heating, ventilation &amp; cooling"</note><target>Climatización</target></trans-unit>
<trans-unit id="s08fb6007b5965c82">
<source>EV</source>

<note from="lit-localize">short label for "electric transportation"</note><target>Vehículo eléctrico</target></trans-unit>
<trans-unit id="sfe16afc784bb9d76">
<source>Solar</source>

Expand All @@ -35,16 +27,9 @@
<trans-unit id="s6c8911fbc526fb43">
<source>Electrical panel &amp; wiring</source>
<target>Tablero eléctrico y cableado</target></trans-unit>
<trans-unit id="se94a76041107bbf3">
<source>Electrical</source>

<note from="lit-localize">short for "electrical panel and wiring"</note><target>Eléctrico</target></trans-unit>
<trans-unit id="s39aa50b686d665a8">
<source>Weatherization &amp; efficiency</source>
<target>Impermeabilización y eficiencia energética</target></trans-unit>
<trans-unit id="sf459faf797f733a9">
<source>Weatherization</source>
<target>Impermeabilización</target></trans-unit>
<trans-unit id="s3ec21e39dec13351">
<source>Homeowner</source>
<target>Propietario</target></trans-unit>
Expand Down Expand Up @@ -246,10 +231,6 @@
<source>Project</source>
<note from="lit-localize">label for a selector input</note>
<target>Proyecto</target></trans-unit>
<trans-unit id="sc373af4c1a974b57">
<source>Cooking</source>
<note from="lit-localize">short label for stove/range incentives</note>
<target>Cocina</target></trans-unit>
<trans-unit id="sf12bd6cb13bc154f">
<source>Arizona</source>
<target>Arizona</target>
Expand Down Expand Up @@ -789,9 +770,6 @@
<trans-unit id="s8ff568239ce4b254">
<source>Lawn Care</source>
<target>Cuidado del césped</target></trans-unit>
<trans-unit id="s81f5c9b4a6da995f">
<source>Lawn</source>
<target>Césped</target></trans-unit>
<trans-unit id="sab856460d5aed19e">
<source>electric outdoor equipment</source>
<note from="lit-localize">e.g. "$100 off [this string]"</note>
Expand Down

0 comments on commit 4928171

Please sign in to comment.