Skip to content

Commit

Permalink
fix: improve plural in bulk actiosn
Browse files Browse the repository at this point in the history
  • Loading branch information
ArekChr committed Mar 18, 2024
1 parent 0cc4e5b commit 7a496c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1780,11 +1780,12 @@ export default {
deleteCategory: 'Delete category',
deleteCategoryPrompt: 'Are you sure you want to delete this category?',
disableCategories: 'Disable categories',
disableCategory: 'Disable category',
enableCategories: 'Enable categories',
enableCategory: 'Enable category',
deleteFailureMessage: 'An error occurred while deleting the category, please try again.',
categoryName: 'Category name',
requiresCategory: 'Members must categorize all spend',
enableCategory: 'Enable category',
subtitle: 'Get a better overview of where money is being spent. Use our default categories or add your own.',
emptyCategories: {
title: "You haven't created any categories",
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1804,11 +1804,12 @@ export default {
deleteCategory: 'Eliminar categoría',
deleteCategoryPrompt: '¿Estás seguro de que quieres eliminar esta categoría?',
disableCategories: 'Desactivar categorías',
disableCategory: 'Desactivar categoría',
enableCategories: 'Activar categorías',
enableCategory: 'Activar categoría',
deleteFailureMessage: 'Se ha producido un error al intentar eliminar la categoría. Por favor, inténtalo más tarde.',
categoryName: 'Nombre de la categoría',
requiresCategory: 'Los miembros deben categorizar todos los gastos',
enableCategory: 'Activar categoría',
subtitle: 'Obtén una visión general de dónde te gastas el dinero. Utiliza las categorías predeterminadas o añade las tuyas propias.',
emptyCategories: {
title: 'No has creado ninguna categoría',
Expand Down
6 changes: 3 additions & 3 deletions src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function WorkspaceCategoriesPage({policy, policyCategories, route}: WorkspaceCat
if (selectedCategoriesArray.length > 0) {
options.push({
icon: Expensicons.Trashcan,
text: translate('workspace.categories.deleteCategories'),
text: translate(selectedCategoriesArray.length === 1 ? 'workspace.categories.deleteCategory' : 'workspace.categories.deleteCategories'),
value: CONST.POLICY.CATEGORIES_BULK_ACTION_TYPES.DELETE,
onSelected: () => setDeleteCategoriesConfirmModalVisible(true),
});
Expand All @@ -188,7 +188,7 @@ function WorkspaceCategoriesPage({policy, policyCategories, route}: WorkspaceCat

options.push({
icon: Expensicons.DocumentSlash,
text: translate('workspace.categories.disableCategories'),
text: translate(enabledCategories.length === 1 ? 'workspace.categories.disableCategory' : 'workspace.categories.disableCategories'),
value: CONST.POLICY.CATEGORIES_BULK_ACTION_TYPES.DISABLE,
onSelected: () => {
setSelectedCategories({});
Expand All @@ -210,7 +210,7 @@ function WorkspaceCategoriesPage({policy, policyCategories, route}: WorkspaceCat
}, {});
options.push({
icon: Expensicons.Document,
text: translate('workspace.categories.enableCategories'),
text: translate(disabledCategories.length === 1 ? 'workspace.categories.enableCategory' : 'workspace.categories.enableCategories'),
value: CONST.POLICY.CATEGORIES_BULK_ACTION_TYPES.ENABLE,
onSelected: () => {
setSelectedCategories({});
Expand Down

0 comments on commit 7a496c8

Please sign in to comment.