Skip to content

Commit

Permalink
Merge pull request #3536 from LiteFarmOrg/LF-4417-change-breed-and-ty…
Browse files Browse the repository at this point in the history
…pe-placeholders

LF-4417 change breed and type fields placeholders
  • Loading branch information
kathyavini authored Nov 21, 2024
2 parents f894c8c + df48db6 commit e1d2293
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 15 deletions.
1 change: 1 addition & 0 deletions packages/webapp/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"SELECTED_COUNT_one": "{{count}} selected",
"SELECTED_COUNT_many": "{{count}} selected",
"SELECTED_COUNT_other": "{{count}} selected",
"SELECT_OR_ADD_YOUR_OWN": "Select or add your own",
"SET": "Set",
"SHOWING_ALL": "Showing all",
"SKIP": "Skip",
Expand Down
2 changes: 0 additions & 2 deletions packages/webapp/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"BATCH_NAME": "Batch name",
"BATCH_NAME_PLACEHOLDER": "Type in batch name",
"BREED": "Breed",
"BREED_PLACEHOLDER": "Add your animal breed",
"BREED_PLACEHOLDER_DISABLED": "Please select a type first",
"CREATE_INDIVIDUAL_PROFILES": "Create individual animal profiles",
"CREATE_INDIVIDUAL_PROFILES_TOOLTIP": "Select this option if you want to track and manage each animal separately",
Expand Down Expand Up @@ -62,7 +61,6 @@
"MAIN": "You successfully added {{animalCount}} {{and}} {{batchCount}} to your inventory."
},
"TYPE": "Type",
"TYPE_PLACEHOLDER": "Select the animal type",
"UNIQUE_DETAILS": "Unique details"
},
"ADD_FARM": {
Expand Down
2 changes: 0 additions & 2 deletions packages/webapp/public/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"BATCH_NAME": "MISSING",
"BATCH_NAME_PLACEHOLDER": "MISSING",
"BREED": "MISSING",
"BREED_PLACEHOLDER": "MISSING",
"BREED_PLACEHOLDER_DISABLED": "MISSING",
"CREATE_INDIVIDUAL_PROFILES": "MISSING",
"CREATE_INDIVIDUAL_PROFILES_TOOLTIP": "MISSING",
Expand Down Expand Up @@ -67,7 +66,6 @@
"MAIN": "MISSING"
},
"TYPE": "MISSING",
"TYPE_PLACEHOLDER": "MISSING",
"UNIQUE_DETAILS": "MISSING"
},
"ADD_FARM": {
Expand Down
2 changes: 0 additions & 2 deletions packages/webapp/public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"BATCH_NAME": "MISSING",
"BATCH_NAME_PLACEHOLDER": "MISSING",
"BREED": "MISSING",
"BREED_PLACEHOLDER": "MISSING",
"BREED_PLACEHOLDER_DISABLED": "MISSING",
"CREATE_INDIVIDUAL_PROFILES": "MISSING",
"CREATE_INDIVIDUAL_PROFILES_TOOLTIP": "MISSING",
Expand Down Expand Up @@ -67,7 +66,6 @@
"MAIN": "MISSING"
},
"TYPE": "MISSING",
"TYPE_PLACEHOLDER": "MISSING",
"UNIQUE_DETAILS": "MISSING"
},
"ADD_FARM": {
Expand Down
2 changes: 0 additions & 2 deletions packages/webapp/public/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"BATCH_NAME": "MISSING",
"BATCH_NAME_PLACEHOLDER": "MISSING",
"BREED": "MISSING",
"BREED_PLACEHOLDER": "MISSING",
"BREED_PLACEHOLDER_DISABLED": "MISSING",
"CREATE_INDIVIDUAL_PROFILES": "MISSING",
"CREATE_INDIVIDUAL_PROFILES_TOOLTIP": "MISSING",
Expand Down Expand Up @@ -67,7 +66,6 @@
"MAIN": "MISSING"
},
"TYPE": "MISSING",
"TYPE_PLACEHOLDER": "MISSING",
"UNIQUE_DETAILS": "MISSING"
},
"ADD_FARM": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export function AnimalTypeSelect<T extends FieldValues>({
render={({ field: { onChange, value } }) => (
<CreatableSelect
label={t('ADD_ANIMAL.TYPE')}
placeholder={t('ADD_ANIMAL.TYPE_PLACEHOLDER')}
options={typeOptions}
onChange={(option) => {
onChange(option);
Expand Down Expand Up @@ -94,11 +93,7 @@ export function AnimalBreedSelect<T extends FieldValues>({
label={t('ADD_ANIMAL.BREED')}
optional
controlShouldRenderValue={isTypeSelected}
placeholder={
isTypeSelected
? t('ADD_ANIMAL.BREED_PLACEHOLDER')
: t('ADD_ANIMAL.BREED_PLACEHOLDER_DISABLED')
}
placeholder={isTypeSelected ? undefined : t('ADD_ANIMAL.BREED_PLACEHOLDER_DISABLED')}
isDisabled={!isTypeSelected || isDisabled}
onChange={(option) => onChange(option)}
value={value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const CreatableSelect = React.forwardRef((props, ref) => {
optional,
components,
createPromptText = t('common:CREATE'),
placeholder = t('common:SELECT') + '...',
placeholder = t('common:SELECT_OR_ADD_YOUR_OWN'),
...restProps
} = props;

Expand Down

0 comments on commit e1d2293

Please sign in to comment.