Skip to content

Commit

Permalink
fix: correct typos
Browse files Browse the repository at this point in the history
  • Loading branch information
samshara committed Dec 26, 2024
1 parent 9f63f03 commit 776630f
Show file tree
Hide file tree
Showing 93 changed files with 199 additions and 192 deletions.
2 changes: 1 addition & 1 deletion app/scripts/translatte/commands/applyMigrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async function applyMigrations(
console.info(`Found ${selectedMigrationFilesAttrs.length} migration files`);

if (selectedMigrationFilesAttrs.length < 1) {
throw 'There should be atleast 1 migration file';
throw 'There should be at least 1 migration file';
}

const selectedMigrations = await readMigrations(
Expand Down
6 changes: 3 additions & 3 deletions app/src/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ function Application() {
] = useState<Record<string, LanguageNamespaceStatus>>({});

const setAndStoreCurrentLanguage = useCallback(
(newLanugage: Language) => {
setCurrentLanguage(newLanugage);
setToStorage(KEY_LANGUAGE_STORAGE, newLanugage);
(newLanguage: Language) => {
setCurrentLanguage(newLanguage);
setToStorage(KEY_LANGUAGE_STORAGE, newLanguage);
},
[],
);
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/Navbar/LanguageDropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const languageList = mapToList(
(value, key) => ({ key: key as Language, value }),
);

function LangaugeDropdown() {
function LanguageDropdown() {
const {
currentLanguage,
setCurrentLanguage,
Expand Down Expand Up @@ -90,4 +90,4 @@ function LangaugeDropdown() {
);
}

export default LangaugeDropdown;
export default LanguageDropdown;
4 changes: 2 additions & 2 deletions app/src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import useAuth from '#hooks/domain/useAuth';

import AuthenticatedUserDropdown from './AuthenticatedUserDropdown';
import CountryDropdown from './CountryDropdown';
import LangaugeDropdown from './LanguageDropdown';
import LanguageDropdown from './LanguageDropdown';

import i18n from './i18n.json';
import styles from './styles.module.css';
Expand Down Expand Up @@ -71,7 +71,7 @@ function Navbar(props: Props) {
className={styles.actions}
variant="tertiary"
>
<LangaugeDropdown />
<LanguageDropdown />
{!isAuthenticated && (
<>
<NavigationTab
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/domain/ActiveOperationMap/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"operationPopoverEmpty": "No Current Operations",
"operationType": "Type of Appeal",
"operationFilterTypePlaceholder": "All Appeal Types",
"operationDisastertype": "Disaster Type",
"operationDisasterType": "Disaster Type",
"operationFilterDisastersPlaceholder": "All Disaster Types",
"mapStartDateAfter": "Start After",
"mapStartDateBefore": "Start Before",
Expand Down
6 changes: 3 additions & 3 deletions app/src/components/domain/ActiveOperationMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ function ActiveOperationMap(props: Props) {
[setClickedPoint],
);

const handleClearFiltersButtonclick = useCallback(() => {
const handleClearFiltersButtonClick = useCallback(() => {
setFilter({});
}, [setFilter]);

Expand Down Expand Up @@ -403,15 +403,15 @@ function ActiveOperationMap(props: Props) {
/>
<DisasterTypeSelectInput
placeholder={strings.operationFilterDisastersPlaceholder}
label={strings.operationDisastertype}
label={strings.operationDisasterType}
name="displacement"
value={rawFilter.displacement}
onChange={setFilterField}
/>
<div>
<Button
name={undefined}
onClick={handleClearFiltersButtonclick}
onClick={handleClearFiltersButtonClick}
variant="secondary"
disabled={!filtered}
>
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/domain/AppealsTable/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"appealsTableType": "Appeal Type",
"appealsTableCode": "Appeal Code",
"appealsTableOperation": "Active Operation",
"appealsTableDisastertype": "Disaster Type",
"appealsTableDisasterType": "Disaster Type",
"appealsTableRequestedAmount": "Funding Requirements",
"appealsTableFundedAmount": "Funding Coverage",
"appealsTableCountry": "Country",
Expand Down
10 changes: 5 additions & 5 deletions app/src/components/domain/AppealsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function AppealsTable(props: Props) {
const strings = useTranslation(i18n);
const { api_appeal_type: appealTypeOptions } = useGlobalEnums();

const handleClearFiltersButtonclick = useCallback(() => {
const handleClearFiltersButtonClick = useCallback(() => {
setFilter({});
}, [setFilter]);

Expand Down Expand Up @@ -157,7 +157,7 @@ function AppealsTable(props: Props) {
),
createStringColumn<AppealListItem, string>(
'dtype',
strings.appealsTableDisastertype,
strings.appealsTableDisasterType,
(item) => item.dtype?.name,
{ sortable: true },
),
Expand Down Expand Up @@ -198,7 +198,7 @@ function AppealsTable(props: Props) {
strings.appealsTableType,
strings.appealsTableCode,
strings.appealsTableOperation,
strings.appealsTableDisastertype,
strings.appealsTableDisasterType,
strings.appealsTableRequestedAmount,
strings.appealsTableFundedAmount,
strings.appealsTableCountry,
Expand Down Expand Up @@ -294,15 +294,15 @@ function AppealsTable(props: Props) {
/>
<DisasterTypeSelectInput
placeholder={strings.appealsTableFilterDisastersPlaceholder}
label={strings.appealsTableDisastertype}
label={strings.appealsTableDisasterType}
name="displacement"
value={rawFilter.displacement}
onChange={setFilterField}
/>
<div className={styles.filterActions}>
<Button
name={undefined}
onClick={handleClearFiltersButtonclick}
onClick={handleClearFiltersButtonClick}
variant="secondary"
disabled={!filtered}
>
Expand Down
6 changes: 3 additions & 3 deletions app/src/components/domain/GlobalMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,22 @@ function GlobalMap(props: Props) {
...baseMapProps
} = props;

const [hoveredCountryIso3, setHoverdCountryIso3] = useState<string | undefined>();
const [hoveredCountryIso3, setHoveredCountryIso3] = useState<string | undefined>();

const handleFeatureMouseEnter = (feature: MapboxGeoJSONFeature) => {
const hoveredFeatureProperties = feature.properties as (
AdminZeroFeatureProperties | undefined
);

setHoverdCountryIso3(hoveredFeatureProperties?.iso3);
setHoveredCountryIso3(hoveredFeatureProperties?.iso3);

if (onHover) {
onHover(hoveredFeatureProperties);
}
};

const handleFeatureMouseLeave = () => {
setHoverdCountryIso3(undefined);
setHoveredCountryIso3(undefined);

if (onHover) {
onHover(undefined);
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/domain/GoMultiFileInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import React, {
useRef,
} from 'react';
import { DeleteBinFillIcon } from '@ifrc-go/icons';
import type {
import {
Button,
ButtonVariant,
type ButtonVariant,
InputError,
type NameType,
RawFileInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"strings": {
"operationCardLastUpdated": "Last updated",
"operationCardTargetedPopulation": "Targeted Population",
"operationCardDepoloyedUnits": "Deployed Emergency Response Units",
"operationCardDeployedUnits": "Deployed Emergency Response Units",
"operationCardFunding": "Funding Requirements",
"operationCardIFRCSurgePersonnel": "IFRC Surge Personnel",
"operationCardNSReportingActivities": "NS Reporting Activities",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function MultiImageWithCaptionInput<const N extends string | number>(props: Prop
<div className={styles.fileList}>
{value?.map((fileValue, index) => {
// NOTE: Not sure why this is here, need to
// talk with @frozenhelium
// TODO: talk with @frozenhelium
if (isNotDefined(fileValue.id)) {
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/domain/OperationListItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type EventResponseItem = NonNullable<EventGet['results']>[number];
export interface Props {
className?: string;
eventItem: EventResponseItem;
updateSubscibedEvents: () => void;
updateSubscribedEvents: () => void;
isLastItem: boolean;
}

Expand All @@ -31,7 +31,7 @@ function OperationInfoCard(props: Props) {
name,
updated_at,
},
updateSubscibedEvents: updateSubscribedEvents,
updateSubscribedEvents,
isLastItem,
} = props;

Expand Down
10 changes: 5 additions & 5 deletions app/src/components/domain/RiskImminentEventMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import {
exposureFillLayer,
exposureFillOutlineLayer,
geojsonSourceOptions,
hazardKeyToIconmap,
hazardKeyToIconMap,
hazardPointIconLayout,
hazardPointLayer,
invisibleCircleLayer,
Expand All @@ -68,10 +68,10 @@ const mapImageOption = {

type HazardType = components<'read'>['schemas']['HazardTypeEnum'];

const hazardKeys = Object.keys(hazardKeyToIconmap) as HazardType[];
const hazardKeys = Object.keys(hazardKeyToIconMap) as HazardType[];

const mapIcons = mapToList(
hazardKeyToIconmap,
hazardKeyToIconMap,
(icon, key) => (icon ? ({ key, icon }) : undefined),
).filter(isDefined);

Expand Down Expand Up @@ -282,7 +282,7 @@ function RiskImminentEventMap<
{hazardTypeSelector(event) === 'TC' && (
<LayerOptions
value={layerOptions}
// NOTE: Currently the information is only visible in gdacas
// NOTE: Currently the information is only visible in gdacs
exposureAreaControlHidden={source !== 'gdacs'}
onChange={setLayerOptions}
/>
Expand Down Expand Up @@ -355,7 +355,7 @@ function RiskImminentEventMap<
className={styles.mapContainer}
/>
{hazardKeys.map((key) => {
const url = hazardKeyToIconmap[key];
const url = hazardKeyToIconMap[key];

if (isNotDefined(url)) {
return null;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/domain/RiskImminentEventMap/mapStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {

type HazardType = components<'read'>['schemas']['HazardTypeEnum'];

export const hazardKeyToIconmap: Record<HazardType, string | null> = {
export const hazardKeyToIconMap: Record<HazardType, string | null> = {
EQ: earthquakeIcon,
FL: floodIcon,
TC: cycloneIcon,
Expand All @@ -49,7 +49,7 @@ export const hazardKeyToIconmap: Record<HazardType, string | null> = {
};

const mapIcons = mapToList(
hazardKeyToIconmap,
hazardKeyToIconMap,
(icon, key) => (icon ? ({ key, icon }) : undefined),
).filter(isDefined);

Expand Down
4 changes: 2 additions & 2 deletions app/src/components/domain/RiskImminentEvents/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"namespace": "riskImminentEvents",
"strings": {
"imminentEventsHeading": "Imminent Events",
"imminentEventsDescription": "This map displays information about the modeled impact of specific forecasted or detected natural hazards (floods, storms, droughts, wildfires, earthquakes). By hovering over the icons, if available, you can see the forecasted/observed footprint of the hazard; when you click on it, the table of modeled impact estimates will appear, as well as an information about who produced the impact estimate.",
"imminentEventsDescription": "This map displays information about the modelled impact of specific forecasted or detected natural hazards (floods, storms, droughts, wildfires, earthquakes). By hovering over the icons, if available, you can see the forecasted/observed footprint of the hazard; when you click on it, the table of modelled impact estimates will appear, as well as an information about who produced the impact estimate.",
"imminentEventsSourcePdcLabel": "PDC",
"imminentEventsSourceWfpAdamLabel": "WFP ADAM",
"imminentEventsSourceGdacsLabel": "GDACS",
Expand All @@ -11,7 +11,7 @@
"pdcTooltipDescription": "These impacts are produced by the Pacific Disaster Center's All-hazards Impact Model (AIM) 3.0. Click {here} for more information about the model and its inputs.",
"here": "here",
"wfpAdamTitle": "Source: WFP ADAM",
"wfpAdamDescription": "These data points are recieved from the WFP ADAM, which performs a 24/7 automated data harvesting, analysis and mapping of natural hazards events. Click {here} for more information.",
"wfpAdamDescription": "These data points are received from the WFP ADAM, which performs a 24/7 automated data harvesting, analysis and mapping of natural hazards events. Click {here} for more information.",
"gdacsTitle": "Source: GDACS",
"gdacsDescription": "Click {here} for more information about the model and its inputs.",
"meteoSwissTitle": "Source: MeteoSwiss",
Expand Down
4 changes: 2 additions & 2 deletions app/src/utils/domain/risk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function getDataWithTruthyHazardType<

return {
...data,
// FIXME: server should not pass emtpy string
// FIXME: server should not pass empty string
hazard_type: data.hazard_type as Exclude<HazardType, ''>,
};
}
Expand Down Expand Up @@ -176,7 +176,7 @@ export function getPrioritizedIpcData(data: IpcData) {
// For IPC, we can have multiple estimations or observed value
// for same year and month.
// So we need to prioritize entries that is from latest
// observation or predection
// observation or prediction
// So the priority order is
// Observed > Estimated
// Latest analysis date
Expand Down
2 changes: 1 addition & 1 deletion app/src/views/AccountDetails/EditAccountInfo/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"phoneNumberInputLabel": "Phone Number",
"editProfileConfirmButtonLabel": "Confirm",
"editProfileCancelButtonLabel": "Cancel",
"editAccoutSuccessfulMessage": "Account edited successfully!",
"editAccountSuccessfulMessage": "Account edited successfully!",
"editAccountFailureMessage": "Sorry, failed to edit account!"
}
}
2 changes: 1 addition & 1 deletion app/src/views/AccountDetails/EditAccountInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function EditAccountInfo(props: Props) {
body: (body: AccountRequestBody) => body,
onSuccess: () => {
alert.show(
strings.editAccoutSuccessfulMessage,
strings.editAccountSuccessfulMessage,
{ variant: 'success' },
);
invalidate('user-me');
Expand Down
2 changes: 1 addition & 1 deletion app/src/views/AccountDetails/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"changePasswordButtonLabel": "Change Password",
"editProfileButtonLabel": "Edit Profile",
"externalConnectionsTitle": "External Connections",
"externalConnectionsDescription": "You can connect and recieve the data to use it in the external platform or dashboard using the GO APIs. You'll need an access token to make the connection.",
"externalConnectionsDescription": "You can connect and receive the data to use it in the external platform or dashboard using the GO APIs. You'll need an access token to make the connection.",
"externalConnectionMontandonTitle": "Montandon - Global Crisis Data Bank",
"externalConnectionMontandonDescription": "The Montandon is the world’s largest disaster database: a public good with applications beyond IFRC. It contains information about natural hazards (both forecasted and observed), their impacts (also modeled and observed) as well as what actions were taken when, where, by whom and to what effect.",
"viewMoreDetailsLabel": "View more details",
Expand Down
Loading

0 comments on commit 776630f

Please sign in to comment.