Skip to content
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
7 changes: 0 additions & 7 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ import type {
SubscriptionSettingsSummaryParams,
SubscriptionSizeParams,
SyncStageNameConnectionsParams,
TagSelectionParams,
TaskCreatedActionParams,
TaxAmountParams,
TermsParams,
Expand Down Expand Up @@ -1343,12 +1342,6 @@ const translations: TranslationDeepObject<typeof en> = {
movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) =>
`Ausgabe von persönlichem Bereich nach ${workspaceName ?? `Chat mit ${reportName}`} verschoben`,
movedToPersonalSpace: 'Ausgabe in den persönlichen Bereich verschoben',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => {
const article = policyTagListName && StringUtils.startsWithVowel(policyTagListName) ? 'ein' : 'a';
const tag = policyTagListName ?? 'Tag';
return `Wähle ${article} ${tag}, um deine Ausgaben besser zu organisieren.`;
},
categorySelection: 'Wähle eine Kategorie aus, um deine Ausgaben besser zu organisieren.',
error: {
invalidCategoryLength: 'Der Kategoriename überschreitet 255 Zeichen. Bitte kürze ihn oder wähle eine andere Kategorie.',
invalidTagLength: 'Der Tagname überschreitet 255 Zeichen. Bitte verkürze ihn oder wähle einen anderen Tag.',
Expand Down
7 changes: 0 additions & 7 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ import type {
SubscriptionSettingsSummaryParams,
SubscriptionSizeParams,
SyncStageNameConnectionsParams,
TagSelectionParams,
TaskCreatedActionParams,
TaxAmountParams,
TermsParams,
Expand Down Expand Up @@ -1316,12 +1315,6 @@ const translations = {
threadPaySomeoneReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} sent${comment ? ` for ${comment}` : ''}`,
movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `moved expense from personal space to ${workspaceName ?? `chat with ${reportName}`}`,
movedToPersonalSpace: 'moved expense to personal space',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => {
const article = policyTagListName && StringUtils.startsWithVowel(policyTagListName) ? 'an' : 'a';
const tag = policyTagListName ?? 'tag';
return `Select ${article} ${tag} to better organize your spend.`;
},
categorySelection: 'Select a category to better organize your spend.',
error: {
invalidCategoryLength: 'The category name exceeds 255 characters. Please shorten it or choose a different category.',
invalidTagLength: 'The tag name exceeds 255 characters. Please shorten it or choose a different tag.',
Expand Down
4 changes: 1 addition & 3 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {CONST as COMMON_CONST} from 'expensify-common';
import dedent from '@libs/StringUtils/dedent';
import CONST from '@src/CONST';
import type en from './en';
import type {BeginningOfChatHistoryParams, HarvestCreatedExpenseReportParams, TagSelectionParams, ViolationsRterParams} from './params';
import type {BeginningOfChatHistoryParams, HarvestCreatedExpenseReportParams, ViolationsRterParams} from './params';
import type {TranslationDeepObject} from './types';

/* eslint-disable max-len */
Expand Down Expand Up @@ -996,8 +996,6 @@ const translations: TranslationDeepObject<typeof en> = {
threadPaySomeoneReportName: ({formattedAmount, comment}) => `${formattedAmount} enviado${comment ? ` para ${comment}` : ''}`,
movedFromPersonalSpace: ({workspaceName, reportName}) => `movió el gasto desde su espacio personal a ${workspaceName ?? `un chat con ${reportName}`}`,
movedToPersonalSpace: 'movió el gasto a su espacio personal',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => `Selecciona ${policyTagListName ?? 'una etiqueta'} para organizar mejor tus gastos.`,
categorySelection: 'Selecciona una categoría para organizar mejor tus gastos.',
error: {
invalidCategoryLength: 'La longitud de la categoría escogida excede el máximo permitido (255). Por favor, escoge otra categoría o acorta la categoría primero.',
invalidTagLength: 'La longitud de la etiqueta escogida excede el máximo permitido (255). Por favor, escoge otra etiqueta o acorta la etiqueta primero.',
Expand Down
7 changes: 0 additions & 7 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ import type {
SubscriptionSettingsSummaryParams,
SubscriptionSizeParams,
SyncStageNameConnectionsParams,
TagSelectionParams,
TaskCreatedActionParams,
TaxAmountParams,
TermsParams,
Expand Down Expand Up @@ -1346,12 +1345,6 @@ const translations: TranslationDeepObject<typeof en> = {
movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) =>
`dépense déplacée de l’espace personnel vers ${workspaceName ?? `discuter avec ${reportName}`}`,
movedToPersonalSpace: 'dépense déplacée vers l’espace personnel',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => {
const article = policyTagListName && StringUtils.startsWithVowel(policyTagListName) ? 'un' : 'a';
const tag = policyTagListName ?? 'étiquette';
return `Sélectionnez ${article} ${tag} pour mieux organiser vos dépenses.`;
},
categorySelection: 'Sélectionnez une catégorie pour mieux organiser vos dépenses.',
error: {
invalidCategoryLength: 'Le nom de la catégorie dépasse 255 caractères. Veuillez le raccourcir ou choisir une autre catégorie.',
invalidTagLength: 'Le nom de l’étiquette dépasse 255 caractères. Veuillez le raccourcir ou choisir une autre étiquette.',
Expand Down
7 changes: 0 additions & 7 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ import type {
SubscriptionSettingsSummaryParams,
SubscriptionSizeParams,
SyncStageNameConnectionsParams,
TagSelectionParams,
TaskCreatedActionParams,
TaxAmountParams,
TermsParams,
Expand Down Expand Up @@ -1339,12 +1338,6 @@ const translations: TranslationDeepObject<typeof en> = {
threadPaySomeoneReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} inviato${comment ? `per ${comment}` : ''}`,
movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `ha spostato la spesa dallo spazio personale a ${workspaceName ?? `chatta con ${reportName}`}`,
movedToPersonalSpace: 'spesa spostata nello spazio personale',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => {
const article = policyTagListName && StringUtils.startsWithVowel(policyTagListName) ? 'un' : 'a';
const tag = policyTagListName ?? 'etichetta';
return `Seleziona ${article} ${tag} per organizzare meglio le tue spese.`;
},
categorySelection: 'Seleziona una categoria per organizzare meglio le tue spese.',
error: {
invalidCategoryLength: "Il nome della categoria supera i 255 caratteri. Accorcialo o scegli un'altra categoria.",
invalidTagLength: 'Il nome dell’etichetta supera i 255 caratteri. Accorcialo o scegli un’etichetta diversa.',
Expand Down
7 changes: 0 additions & 7 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ import type {
SubscriptionSettingsSummaryParams,
SubscriptionSizeParams,
SyncStageNameConnectionsParams,
TagSelectionParams,
TaskCreatedActionParams,
TaxAmountParams,
TermsParams,
Expand Down Expand Up @@ -1341,12 +1340,6 @@ const translations: TranslationDeepObject<typeof en> = {
threadPaySomeoneReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} を送信済み${comment ? `${comment} 用` : ''}`,
movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `経費を個人スペースから${workspaceName ?? `${reportName} とチャット`}に移動しました`,
movedToPersonalSpace: '経費を個人スペースに移動しました',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => {
const article = policyTagListName && StringUtils.startsWithVowel(policyTagListName) ? '1つの' : 'a';
const tag = policyTagListName ?? 'タグ';
return `支出をより適切に整理するために、${article} ${tag} を選択してください。`;
},
categorySelection: '支出をより整理しやすくするためにカテゴリを選択してください。',
error: {
invalidCategoryLength: 'カテゴリ名が255文字を超えています。短くするか、別のカテゴリを選択してください。',
invalidTagLength: 'タグ名が255文字を超えています。短くするか、別のタグを選択してください。',
Expand Down
7 changes: 0 additions & 7 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ import type {
SubscriptionSettingsSummaryParams,
SubscriptionSizeParams,
SyncStageNameConnectionsParams,
TagSelectionParams,
TaskCreatedActionParams,
TaxAmountParams,
TermsParams,
Expand Down Expand Up @@ -1339,12 +1338,6 @@ const translations: TranslationDeepObject<typeof en> = {
movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) =>
`heeft uitgave verplaatst van persoonlijke ruimte naar ${workspaceName ?? `chat met ${reportName}`}`,
movedToPersonalSpace: 'uitgave verplaatst naar persoonlijke ruimte',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => {
const article = policyTagListName && StringUtils.startsWithVowel(policyTagListName) ? 'een' : 'een';
const tag = policyTagListName ?? 'label';
return `Selecteer ${article} ${tag} om je uitgaven beter te organiseren.`;
},
categorySelection: 'Selecteer een categorie om je uitgaven beter te organiseren.',
error: {
invalidCategoryLength: 'De categorienaam bevat meer dan 255 tekens. Verkort deze of kies een andere categorie.',
invalidTagLength: 'De namen van tags mogen niet langer zijn dan 255 tekens. Verkort de tagnaam of kies een andere tag.',
Expand Down
5 changes: 0 additions & 5 deletions src/languages/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import type {DelegateRole} from '@src/types/onyx/Account';
import type {AllConnectionName, ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy';
import type {ViolationDataType} from '@src/types/onyx/TransactionViolation';

type TagSelectionParams = {
policyTagListName?: string;
};

type CharacterLengthLimitParams = {
limit: number;
length: number;
Expand Down Expand Up @@ -1109,7 +1105,6 @@ export type {
NextStepParams,
ReportFieldParams,
FocusModeUpdateParams,
TagSelectionParams,
UpdatedPolicyCustomUnitRateIndexParams,
UpdatedPolicyCustomUnitRateEnabledParams,
};
7 changes: 0 additions & 7 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ import type {
SubscriptionSettingsSummaryParams,
SubscriptionSizeParams,
SyncStageNameConnectionsParams,
TagSelectionParams,
TaskCreatedActionParams,
TaxAmountParams,
TermsParams,
Expand Down Expand Up @@ -1337,12 +1336,6 @@ const translations: TranslationDeepObject<typeof en> = {
threadPaySomeoneReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} wysłano${comment ? `dla ${comment}` : ''}`,
movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `przeniósł wydatek z przestrzeni osobistej do ${workspaceName ?? `czat z ${reportName}`}`,
movedToPersonalSpace: 'przeniesiono wydatek do przestrzeni osobistej',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => {
const article = policyTagListName && StringUtils.startsWithVowel(policyTagListName) ? 'jeden' : 'a';
const tag = policyTagListName ?? 'tag';
return `Wybierz ${article} ${tag}, aby lepiej zorganizować swoje wydatki.`;
},
categorySelection: 'Wybierz kategorię, aby lepiej uporządkować swoje wydatki.',
error: {
invalidCategoryLength: 'Nazwa kategorii przekracza 255 znaków. Skróć ją lub wybierz inną kategorię.',
invalidTagLength: 'Nazwa tagu przekracza 255 znaków. Skróć ją lub wybierz inny tag.',
Expand Down
7 changes: 0 additions & 7 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ import type {
SubscriptionSettingsSummaryParams,
SubscriptionSizeParams,
SyncStageNameConnectionsParams,
TagSelectionParams,
TaskCreatedActionParams,
TaxAmountParams,
TermsParams,
Expand Down Expand Up @@ -1337,12 +1336,6 @@ const translations: TranslationDeepObject<typeof en> = {
threadPaySomeoneReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} enviado${comment ? `para ${comment}` : ''}`,
movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `despesa movida do espaço pessoal para ${workspaceName ?? `conversar com ${reportName}`}`,
movedToPersonalSpace: 'despesa movida para o espaço pessoal',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => {
const article = policyTagListName && StringUtils.startsWithVowel(policyTagListName) ? 'um' : 'a';
const tag = policyTagListName ?? 'Tag';
return `Selecione ${article} ${tag} para organizar melhor seus gastos.`;
},
categorySelection: 'Selecione uma categoria para organizar melhor seus gastos.',
error: {
invalidCategoryLength: 'O nome da categoria excede 255 caracteres. Reduza-o ou escolha uma categoria diferente.',
invalidTagLength: 'O nome da tag excede 255 caracteres. Reduza-o ou escolha uma tag diferente.',
Expand Down
7 changes: 0 additions & 7 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ import type {
SubscriptionSettingsSummaryParams,
SubscriptionSizeParams,
SyncStageNameConnectionsParams,
TagSelectionParams,
TaskCreatedActionParams,
TaxAmountParams,
TermsParams,
Expand Down Expand Up @@ -1317,12 +1316,6 @@ const translations: TranslationDeepObject<typeof en> = {
threadPaySomeoneReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `已发送 ${formattedAmount}${comment ? `为 ${comment}` : ''}`,
movedFromPersonalSpace: ({workspaceName, reportName}: MovedFromPersonalSpaceParams) => `已将报销从个人空间移动到 ${workspaceName ?? `与 ${reportName} 聊天`}`,
movedToPersonalSpace: '已将报销移动到个人空间',
tagSelection: ({policyTagListName}: TagSelectionParams = {}) => {
const article = policyTagListName && StringUtils.startsWithVowel(policyTagListName) ? '一个' : 'a';
const tag = policyTagListName ?? '标签';
return `选择${article} ${tag},以更好地整理您的支出。`;
},
categorySelection: '选择一个类别,以便更好地整理您的支出。',
error: {
invalidCategoryLength: '类别名称超过 255 个字符。请缩短名称或选择其他类别。',
invalidTagLength: '标签名称超过了255个字符。请缩短它或选择其他标签。',
Expand Down
14 changes: 5 additions & 9 deletions src/pages/iou/request/step/IOURequestStepCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import CategoryPicker from '@components/CategoryPicker';
import FixedFooter from '@components/FixedFooter';
import {useSearchContext} from '@components/Search/SearchContext';
import type {ListItem} from '@components/SelectionListWithSections/types';
import Text from '@components/Text';
import WorkspaceEmptyStateSection from '@components/WorkspaceEmptyStateSection';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset';
Expand Down Expand Up @@ -220,14 +219,11 @@ function IOURequestStepCategory({
</View>
)}
{!shouldShowEmptyState && !isLoading && !shouldShowOfflineView && (
<>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.categorySelection')}</Text>
<CategoryPicker
selectedCategory={categoryForDisplay}
policyID={policyID ?? report?.policyID}
onSubmit={updateCategory}
/>
</>
<CategoryPicker
selectedCategory={categoryForDisplay}
policyID={policyID ?? report?.policyID}
onSubmit={updateCategory}
/>
)}
</StepScreenWrapper>
);
Expand Down
25 changes: 10 additions & 15 deletions src/pages/iou/request/step/IOURequestStepTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Button from '@components/Button';
import FixedFooter from '@components/FixedFooter';
import {useSearchContext} from '@components/Search/SearchContext';
import TagPicker from '@components/TagPicker';
import Text from '@components/Text';
import WorkspaceEmptyStateSection from '@components/WorkspaceEmptyStateSection';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset';
Expand All @@ -18,7 +17,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
import {setDraftSplitTransaction, setMoneyRequestTag, updateMoneyRequestTag} from '@libs/actions/IOU';
import {insertTagIntoTransactionTagsString} from '@libs/IOUUtils';
import Navigation from '@libs/Navigation/Navigation';
import {getTagList, getTagListName, getTagLists, hasDependentTags as hasDependentTagsPolicyUtils, isDefaultTagName, isPolicyAdmin} from '@libs/PolicyUtils';
import {getTagList, getTagListName, getTagLists, hasDependentTags as hasDependentTagsPolicyUtils, isPolicyAdmin} from '@libs/PolicyUtils';
import type {OptionData} from '@libs/ReportUtils';
import {hasEnabledTags} from '@libs/TagsOptionsListUtils';
import {getTag, getTagArrayFromName, isExpenseUnreported} from '@libs/TransactionUtils';
Expand Down Expand Up @@ -66,7 +65,6 @@ function IOURequestStepTag({

const tagListIndex = Number(rawTagIndex);
const policyTagListName = getTagListName(policyTags, tagListIndex);
const tagListNameToShow = useMemo(() => (isDefaultTagName(policyTagListName) ? undefined : policyTagListName), [policyTagListName]);

const isEditing = action === CONST.IOU.ACTION.EDIT;
const isSplitBill = iouType === CONST.IOU.TYPE.SPLIT;
Expand Down Expand Up @@ -193,18 +191,15 @@ function IOURequestStepTag({
</View>
)}
{!!shouldShowTag && (
<>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.tagSelection', {policyTagListName: tagListNameToShow})}</Text>
<TagPicker
policyID={policyID}
tagListName={policyTagListName}
tagListIndex={tagListIndex}
selectedTag={tag}
transactionTag={transactionTag}
hasDependentTags={hasDependentTags}
onSubmit={updateTag}
/>
</>
<TagPicker
policyID={policyID}
tagListName={policyTagListName}
tagListIndex={tagListIndex}
selectedTag={tag}
transactionTag={transactionTag}
hasDependentTags={hasDependentTags}
onSubmit={updateTag}
/>
)}
</StepScreenWrapper>
);
Expand Down
Loading