Skip to content

Commit

Permalink
Rename some translation keys to solve Weblate confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
bbliem committed Sep 29, 2023
1 parent 473d1f5 commit 7141325
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 22 deletions.
4 changes: 3 additions & 1 deletion components/indicators/IndicatorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ function IndicatorCard({

// FIXME: It sucks that we only use the context for the translation key 'action'
const indicatorType =
level === 'action' ? t('action', getActionTermContext(plan)) : t(level);
level === 'action'
? t('action', getActionTermContext(plan))
: t(`${level}-indicator`);

return (
<CardLink level={level} indicatorId={objectid}>
Expand Down
2 changes: 1 addition & 1 deletion components/indicators/IndicatorHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function IndicatorHero(props: IndicatorHeroProps) {
indicator.level === 'action'
? t('action', getActionTermContext(plan))
: indicator.level != null
? t(indicator.level)
? t(`${indicator.level}-indicator`)
: null;

return (
Expand Down
4 changes: 3 additions & 1 deletion components/indicators/IndicatorHighlightCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ function IndicatorHighlightCard(props) {

// FIXME: It sucks that we only use the context for the translation key 'action'
const indicatorType =
level === 'action' ? t('action', getActionTermContext(plan)) : t(level);
level === 'action'
? t('action', getActionTermContext(plan))
: t(`${level}-indicator`);

return (
<StyledCard>
Expand Down
2 changes: 1 addition & 1 deletion components/indicators/IndicatorListFiltered.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ const IndicatorListFiltered = (props) => {
const indicatorType =
item.level === 'action'
? t('action', getActionTermContext(plan))
: t(item.level);
: t(`${item.level}-indicator`);
let [normalizedValue, normalizedUnit] = [null, null];
// We currently support only one normalizer, the population indicator
const normalizations = item.common?.normalizations;
Expand Down
6 changes: 3 additions & 3 deletions locales/da/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"no-actions": "Ingen handlinger",
"number-of-search-results_one": "et hit til søgning",
"number-of-search-results_other": "{{count}} hits til søgning",
"operational": "Driftsindikator",
"operational-indicator": "Driftsindikator",
"other-plans-only": "Søg i alle andre planer",
"over-x-days": "Over {{days}} dage",
"page": "Side",
Expand Down Expand Up @@ -141,9 +141,9 @@
"search-no-results": "Ingen resultater for denne søgning. Prøv at ændre søgetermerne.",
"send": "Sende",
"skip-to-content": "Hoppe til hovedindhold",
"strategic": "Strategisk indikator",
"strategic-indicator": "Strategisk indikator",
"supported-by": "Støttet af",
"tactical": "Taktisk indikator",
"tactical-indicator": "Taktisk indikator",
"themes": "Temaer",
"to-reduce": "Skal reduceres",
"total": "I alt",
Expand Down
6 changes: 3 additions & 3 deletions locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"number-of-search-results_one": "Ein Suchergebnis",
"number-of-search-results_other": "{{count}} Suchergebnisse",
"open": "Öffnen",
"operational": "Operativer Indikator",
"operational-indicator": "Operativer Indikator",
"other-plans-only": "Suche in allen anderen Plänen",
"over-x-days": "Mehr als {{days}} Tage",
"page": "Seite",
Expand Down Expand Up @@ -142,9 +142,9 @@
"search-no-results": "Keine Ergebnisse für diese Suche. Versuchen Sie, die Suchbegriffe zu ändern.",
"send": "Abschicken",
"skip-to-content": "Zum Hauptinhalt springen",
"strategic": "Strategischer Indikator",
"strategic-indicator": "Strategischer Indikator",
"supported-by": "Unterstützt von",
"tactical": "Taktischer Indikator",
"tactical-indicator": "Taktischer Indikator",
"themes": "Themen",
"to-reduce": "Noch zu reduzieren",
"total": "Gesamtwert",
Expand Down
6 changes: 3 additions & 3 deletions locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"number-of-search-results_one": "one hit for search",
"number-of-search-results_other": "{{count}} hits for search",
"open": "open",
"operational": "Operational indicator",
"operational-indicator": "Operational indicator",
"other-plans-only": "Search all other plans",
"over-x-days": "Over {{days}} days",
"page": "Page",
Expand Down Expand Up @@ -152,9 +152,9 @@
"search-no-results": "No results for this search. Try changing the search terms.",
"send": "Send",
"skip-to-content": "Skip to main content",
"strategic": "Strategic indicator",
"strategic-indicator": "Strategic indicator",
"supported-by": "Supported by",
"tactical": "Tactical indicator",
"tactical-indicator": "Tactical indicator",
"themes": "Themes",
"to-reduce": "Left to reduce",
"total": "total",
Expand Down
6 changes: 3 additions & 3 deletions locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"no-actions": "Ninguna acción",
"number-of-search-results_one": "un acierto para la búsqueda",
"number-of-search-results_other": "{{count}} resultados de la búsqueda",
"operational": "Indicador operativo",
"operational-indicator": "Indicador operativo",
"other-plans-only": "Buscar todos los demás planes",
"over-x-days": "Más de {{días}} días",
"page": "Página",
Expand Down Expand Up @@ -141,9 +141,9 @@
"search-no-results": "No hay resultados para esta búsqueda. Pruebe a cambiar los términos de búsqueda.",
"send": "Envíe",
"skip-to-content": "Ir al contenido principal",
"strategic": "Indicador estratégico",
"strategic-indicator": "Indicador estratégico",
"supported-by": "Con el apoyo de",
"tactical": "Indicador táctico",
"tactical-indicator": "Indicador táctico",
"themes": "Temas",
"to-reduce": "Izquierda para reducir",
"total": "total",
Expand Down
6 changes: 3 additions & 3 deletions locales/fi/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"no-actions": "Ei toimenpiteitä",
"number-of-search-results_one": "1 osuma haulle",
"number-of-search-results_other": "{{count}} osumaa haulle",
"operational": "Toiminnallinen mittari",
"operational-indicator": "Toiminnallinen mittari",
"other-plans-only": "Hae kaikista muista toimenpideohjelmista",
"over-x-days": "Yli {{days}} päivää",
"page": "Sivu",
Expand Down Expand Up @@ -143,9 +143,9 @@
"search-no-results": "Haulla ei löytynyt tuloksia. Yritä muokata hakuehtoja.",
"send": "Lähetä",
"skip-to-content": "Hyppää sisältöön",
"strategic": "Strateginen mittari",
"strategic-indicator": "Strateginen mittari",
"supported-by": "Kehitystä tukenut",
"tactical": "Taktinen mittari",
"tactical-indicator": "Taktinen mittari",
"themes": "Teemat",
"to-reduce": "Vähennettävää",
"total": "yhteensä",
Expand Down
6 changes: 3 additions & 3 deletions locales/sv/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"next": "Nästa",
"no-graph": "Inget diagram",
"no-actions": "Inga åtgärder",
"operational": "Driftsindikator",
"operational-indicator": "Driftsindikator",
"over-x-days": "Över {{days}} dagar",
"page-not-found": "Sidan hittas inte",
"percent-point-abbreviation": "p.p.",
Expand All @@ -119,9 +119,9 @@
"search-no-results": "Inga resultat",
"send": "Skicka",
"skip-to-content": "Hoppa till huvudinnehåll",
"strategic": "Strategisk indikator",
"strategic-indicator": "Strategisk indikator",
"supported-by": "Stöds av",
"tactical": "Taktisk indikator",
"tactical-indicator": "Taktisk indikator",
"themes": "Teman",
"to-reduce": "Kvar för att minska",
"total": "totalt",
Expand Down

0 comments on commit 7141325

Please sign in to comment.