Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change edit allowance text to edit preferences #2232

Merged
merged 5 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/components/AllowanceMenu/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe("AllowanceMenu", () => {
user.click(editButton);
});

await screen.findByText("Edit Allowance");
await screen.findByText("Edit Preferences");

// update fiat value when modal is open
expect(mockGetFiatValue).toHaveBeenCalledWith(
Expand Down Expand Up @@ -120,7 +120,7 @@ describe("AllowanceMenu", () => {
user.click(editButton);
});

await screen.findByText("Edit Allowance");
await screen.findByText("Edit Preferences");

const toggleButton = await screen.findByRole("switch");

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/AllowanceMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) {
closeTimeoutMS={200}
isOpen={modalIsOpen}
onRequestClose={closeModal}
contentLabel={t("edit_allowance.screen_reader")}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No sure, but I don't think we need to change the i18n string here. We can just adjust the translation. Technically it's still an allowance, we just try to make it easier to understand for the user.
wdyt @im-adithya ?

contentLabel={t("edit_preferences.screen_reader")}
overlayClassName="bg-black bg-opacity-25 fixed inset-0 flex justify-center items-center p-5"
className="rounded-lg bg-white w-full max-w-lg"
style={{ content: { maxHeight: "90vh" } }}
>
<div className="p-5 flex justify-between dark:bg-surface-02dp">
<h2 className="text-2xl font-bold dark:text-white">
{t("edit_allowance.title")}
{t("edit_preferences.title")}
</h2>
<button onClick={closeModal}>
<CrossIcon className="w-6 h-6 dark:text-white" />
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/cs/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@
"title": "Povolit přihlášení k webovým stránkám",
"subtitle": "Automaticky přihlásit bez potvrzení, když to webová stránka vyžádá."
},
"edit_allowance": {
"edit_preferences": {
"title": "Upravit příspěvek",
"screen_reader": "Možnosti příspěvku"
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/da/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
"title": "Aktiver log ind til hjemmeside",
"subtitle": "Log ind automatisk uden bekræftelse efter anmodning fra hjemmesiden."
},
"edit_allowance": {
"edit_preferences": {
"title": "Rediger pulje",
"screen_reader": "Indstillinger for pulje"
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@
"heading": "Wie willst du dich mit dem TOR-Netzwerk verbinden?"
},
"allowance_menu": {
"edit_allowance": {
"edit_preferences": {
"title": "Zulage bearbeiten",
"screen_reader": "Zulässigkeitsoptionen"
},
Expand Down
4 changes: 2 additions & 2 deletions src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -840,8 +840,8 @@
"title": "Enable website login",
"subtitle": "Automatically log in without confirmation when the website requests."
},
"edit_allowance": {
"title": "Edit Allowance",
"edit_preferences": {
"title": "Edit Preferences",
"screen_reader": "Allowance Options"
},
"edit_permissions": "Edit Permissions"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/eo/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@
"title": "",
"subtitle": ""
},
"edit_allowance": {
"edit_preferences": {
"title": "",
"screen_reader": ""
}
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@
"new_budget": {
"label": "Nuevo presupuesto"
},
"edit_allowance": {
"edit_preferences": {
"title": "Editar Asignación",
"screen_reader": "Opciones de Asignación"
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/fi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@
"title": "Ota verkkosivustoon kirjautuminen käyttöön",
"subtitle": "Automaattinen kirjautuminen ilman vahvistusta, kun verkkosivusto pyytää."
},
"edit_allowance": {
"edit_preferences": {
"title": "Muokkaa korvausta",
"screen_reader": "Korvausvaihtoehdot"
}
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
"title": "Activer la connexion au site Web",
"subtitle": "Connectez-vous automatiquement sans confirmation lorsque le site Web le demande."
},
"edit_allowance": {
"edit_preferences": {
"title": "Modifier l'allocation",
"screen_reader": "Options d'allocation"
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/it/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
"title": "Abilita l'accesso al sito web",
"subtitle": "Accedi automaticamente senza conferma quando il sito web lo richiede."
},
"edit_allowance": {
"edit_preferences": {
"title": "Modifica tolleranza",
"screen_reader": "Opzioni di tolleranza"
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/nl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@
"title": "",
"subtitle": ""
},
"edit_allowance": {
"edit_preferences": {
"title": "",
"screen_reader": ""
}
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/pl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
"title": "",
"subtitle": ""
},
"edit_allowance": {
"edit_preferences": {
"title": "",
"screen_reader": ""
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/pt_BR/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@
"new_budget": {
"label": "Novo limite"
},
"edit_allowance": {
"edit_preferences": {
"title": "Editar preferências",
"screen_reader": "Opções limite de gastos"
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/ro/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
"title": "",
"subtitle": ""
},
"edit_allowance": {
"edit_preferences": {
"title": "",
"screen_reader": ""
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/ru/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
"title": "",
"subtitle": ""
},
"edit_allowance": {
"edit_preferences": {
"title": "",
"screen_reader": ""
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/sv/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@
"title": "Aktivera webbplatsinloggning",
"subtitle": "Logga in automatiskt utan bekräftelse när webbplatsen begär det."
},
"edit_allowance": {
"edit_preferences": {
"title": "Redigera Beloppsgräns",
"screen_reader": "Alternativ för Beloppsgräns"
}
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/tl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
"title": "",
"subtitle": ""
},
"edit_allowance": {
"edit_preferences": {
"title": "",
"screen_reader": ""
}
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/uk/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
"title": "",
"subtitle": ""
},
"edit_allowance": {
"edit_preferences": {
"title": "",
"screen_reader": ""
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/zh_Hans/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@
"title": "启用网站登录",
"subtitle": "网站请求时自动登录,无需确认。"
},
"edit_allowance": {
"edit_preferences": {
"title": "编辑限额",
"screen_reader": "限额选项"
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/zh_Hant/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
"title": "",
"subtitle": ""
},
"edit_allowance": {
"edit_preferences": {
"title": "",
"screen_reader": ""
},
Expand Down