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

Update tagSelection and categorySelection copies #38242

Merged
merged 5 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 2 additions & 3 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ import type {
SizeExceededParams,
SplitAmountParams,
StepCounterParams,
TagSelectionParams,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should also remove this from types since it's no longer used

type TagSelectionParams = {tagName: string};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed! Very strange to me that this type existed just to define a string 😕

TaskCreatedActionParams,
TermsParams,
ThreadRequestReportNameParams,
Expand Down Expand Up @@ -657,8 +656,8 @@ export default {
`changed the distance to ${newDistanceToDisplay} (previously ${oldDistanceToDisplay}), which updated the amount to ${newAmountToDisplay} (previously ${oldAmountToDisplay})`,
threadRequestReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `${formattedAmount} ${comment ? `for ${comment}` : 'request'}`,
threadSentMoneyReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} sent${comment ? ` for ${comment}` : ''}`,
tagSelection: ({tagName}: TagSelectionParams) => `Select a ${tagName} to add additional organization to your money.`,
categorySelection: 'Select a category to add additional organization to your money.',
tagSelection: 'Select a tag to better organize your spend.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we no longer using the tagName? If the field is called "Department" for example, they won't know what "tag" means right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See the linked conversation, but 2 reasons:

  • The tag list can be called Departments, Select a Departments to better organize your spend. is not english
  • Departments is present at the top of the view

categorySelection: 'Select a category to better organize your spend.',
error: {
invalidCategoryLength: 'The length of the category chosen exceeds the maximum allowed (255). Please choose a different or shorten the category name first.',
invalidAmount: 'Please enter a valid amount before continuing.',
Expand Down
3 changes: 1 addition & 2 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import type {
SizeExceededParams,
SplitAmountParams,
StepCounterParams,
TagSelectionParams,
TaskCreatedActionParams,
TermsParams,
ThreadRequestReportNameParams,
Expand Down Expand Up @@ -652,7 +651,7 @@ export default {
`cambió la distancia a ${newDistanceToDisplay} (previamente ${oldDistanceToDisplay}), lo que cambió el importe a ${newAmountToDisplay} (previamente ${oldAmountToDisplay})`,
threadRequestReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `${comment ? `${formattedAmount} para ${comment}` : `Solicitud de ${formattedAmount}`}`,
threadSentMoneyReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} enviado${comment ? ` para ${comment}` : ''}`,
tagSelection: ({tagName}: TagSelectionParams) => `Seleccione una ${tagName} para organizar mejor tu dinero.`,
tagSelection: 'Selecciona una etiqueta para organizar mejor tu dinero.',
categorySelection: 'Seleccione una categoría para organizar mejor tu dinero.',
error: {
invalidCategoryLength: 'El largo de la categoría escogida excede el máximo permitido (255). Por favor, escoge otra categoría o acorta la categoría primero.',
Expand Down
3 changes: 0 additions & 3 deletions src/languages/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ type UpdatedTheDistanceParams = {newDistanceToDisplay: string; oldDistanceToDisp

type FormattedMaxLengthParams = {formattedMaxLength: string};

type TagSelectionParams = {tagName: string};

type WalletProgramParams = {walletProgram: string};

type ViolationsAutoReportedRejectedExpenseParams = {rejectedBy: string; rejectReason: string};
Expand Down Expand Up @@ -362,7 +360,6 @@ export type {
SizeExceededParams,
SplitAmountParams,
StepCounterParams,
TagSelectionParams,
TaskCreatedActionParams,
TermsParams,
ThreadRequestReportNameParams,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/EditRequestTagPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function EditRequestTagPage({defaultTag, policyID, tagName, tagIndex, onSubmit})
title={tagName || translate('common.tag')}
onBackButtonPress={Navigation.goBack}
/>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.tagSelection', {tagName: tagName || translate('common.tag')})}</Text>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.tagSelection')}</Text>
<TagPicker
selectedTag={defaultTag}
tag={tagName}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function IOURequestStepTag({
>
{({insets}) => (
<>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.tagSelection', {tagName: policyTagListName})}</Text>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.tagSelection')}</Text>
<TagPicker
policyID={report.policyID}
tag={policyTagListName}
Expand Down
Loading