Skip to content

Commit

Permalink
Feat(INJI-502): Changed the sub header testId name along with locals …
Browse files Browse the repository at this point in the history
…key name

Signed-off-by: anil_majji <[email protected]>
  • Loading branch information
Anil-kumar-Majji committed Oct 31, 2023
1 parent ff9e33a commit 2fd4cec
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion locales/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
},
"IssuersScreen": {
"title": "أضف بطاقة جديدة",
"addCardDescription": "يرجى اختيار جهة الإصدار المفضلة لديك من الخيارات أدناه لإضافة بطاقة جديدة.",
"description": "يرجى اختيار جهة الإصدار المفضلة لديك من الخيارات أدناه لإضافة بطاقة جديدة.",
"searchByIssuersName": "البحث حسب اسم المصدر",
"itemHeading": "التنزيل عبر {{issuer}}",
"itemSubHeading": "أدخل رقم الهوية الوطنية الخاص بك لتنزيل بطاقتك.",
Expand Down
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
},
"IssuersScreen": {
"title": "Add new card",
"addCardDescription": "Please choose your preferred issuer from the options below to add a new card.",
"description": "Please choose your preferred issuer from the options below to add a new card.",
"searchByIssuersName": "Search by Issuer’s name",
"itemHeading": "Download via {{issuer}}",
"itemSubHeading": "Enter your national ID to download your card.",
Expand Down
2 changes: 1 addition & 1 deletion locales/fil.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
},
"IssuersScreen": {
"title": "Magdagdag ng bagong card",
"addCardDescription": "Mangyaring piliin ang iyong gustong tagabigay mula sa mga opsyon sa ibaba upang magdagdag ng bagong card.",
"description": "Mangyaring piliin ang iyong gustong tagabigay mula sa mga opsyon sa ibaba upang magdagdag ng bagong card.",
"searchByIssuersName": "Maghanap ayon sa pangalan ng Nag-isyu",
"itemHeading": "I-download sa pamamagitan ng {{issuer}}",
"itemSubHeading": "Ilagay ang iyong national ID para i-download ang iyong card.",
Expand Down
2 changes: 1 addition & 1 deletion locales/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
},
"IssuersScreen": {
"title": "नया कार्ड जोड़ें",
"addCardDescription": "नया कार्ड जोड़ने के लिए कृपया नीचे दिए गए विकल्पों में से अपना पसंदीदा जारीकर्ता चुनें।",
"description": "नया कार्ड जोड़ने के लिए कृपया नीचे दिए गए विकल्पों में से अपना पसंदीदा जारीकर्ता चुनें।",
"searchByIssuersName": "जारीकर्ता के नाम से खोजें",
"itemHeading": "{{issuer}} के माध्यम से डाउनलोड करें",
"itemSubHeading": "अपना कार्ड डाउनलोड करने के लिए अपनी राष्ट्रीय आईडी दर्ज करें।",
Expand Down
2 changes: 1 addition & 1 deletion locales/kan.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
},
"IssuersScreen": {
"title": "ಹೊಸ ಕಾರ್ಡ್ ಸೇರಿಸಿ",
"addCardDescription": "ದಯವಿಟ್ಟು ಹೊಸ ಕಾರ್ಡ್ ಸೇರಿಸಲು ಕೆಳಗಿನ ಆಯ್ಕೆಗಳಿಂದ ನಿಮ್ಮ ಆದ್ಯತೆ ನೀಡುವವರನ್ನು ಆಯ್ಕೆಮಾಡಿ.",
"description": "ದಯವಿಟ್ಟು ಹೊಸ ಕಾರ್ಡ್ ಸೇರಿಸಲು ಕೆಳಗಿನ ಆಯ್ಕೆಗಳಿಂದ ನಿಮ್ಮ ಆದ್ಯತೆ ನೀಡುವವರನ್ನು ಆಯ್ಕೆಮಾಡಿ.",
"searchByIssuersName": "ವಿತರಕರ ಹೆಸರಿನ ಮೂಲಕ ಹುಡುಕಿ",
"itemHeading": "{{issuer}} ಮೂಲಕ ಡೌನ್‌ಲೋಡ್ ಮಾಡಿ",
"itemSubHeading": "ನಿಮ್ಮ ಕಾರ್ಡ್ ಅನ್ನು ಡೌನ್‌ಲೋಡ್ ಮಾಡಲು ನಿಮ್ಮ ರಾಷ್ಟ್ರೀಯ ID ಅನ್ನು ನಮೂದಿಸಿ.",
Expand Down
2 changes: 1 addition & 1 deletion locales/spa.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
},
"IssuersScreen": {
"title": "Agregar nueva tarjeta",
"addCardDescription": "Elija su emisor preferido entre las opciones siguientes para agregar una nueva tarjeta.",
"description": "Elija su emisor preferido entre las opciones siguientes para agregar una nueva tarjeta.",
"searchByIssuersName": "Buscar por nombre del emisor",
"itemHeading": "Descargar vía {{issuer}}",
"itemSubHeading": "Introduce tu DNI para descargar tu tarjeta.",
Expand Down
2 changes: 1 addition & 1 deletion locales/tam.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
},
"IssuersScreen": {
"title": "புதிய அட்டையைச் சேர்க்கவும்",
"addCardDescription": "புதிய கார்டைச் சேர்க்க, கீழே உள்ள விருப்பங்களிலிருந்து உங்களுக்கு விருப்பமான வழங்குபவரைத் தேர்ந்தெடுக்கவும்.",
"description": "புதிய கார்டைச் சேர்க்க, கீழே உள்ள விருப்பங்களிலிருந்து உங்களுக்கு விருப்பமான வழங்குபவரைத் தேர்ந்தெடுக்கவும்.",
"searchByIssuersName": "வழங்குபவரின் பெயரால் தேடவும்",
"itemHeading": "{{issuer}} மூலம் பதிவிறக்கவும்",
"itemSubHeading": "உங்கள் கார்டைப் பதிவிறக்க உங்கள் தேசிய ஐடியை உள்ளிடவும்.",
Expand Down
33 changes: 15 additions & 18 deletions screens/Issuers/IssuersScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,36 +129,33 @@ export const IssuersScreen: React.FC<
);
}

const filterIssuers = text => {
let filterdData = issuers;
if (text.length > 0) {
filterdData = issuers.filter(item => {
if (
getDisplayObjectForCurrentLanguage(item.display)
?.name.toLowerCase()
.includes(text.toLowerCase())
) {
return getDisplayObjectForCurrentLanguage(item.display);
}
}, []);
}
const filterIssuers = (searchText: string) => {
let filterdData = issuers.filter(item => {
if (
getDisplayObjectForCurrentLanguage(item.display)
?.name.toLowerCase()
.includes(searchText.toLowerCase())
) {
return getDisplayObjectForCurrentLanguage(item.display);
}
});
setFilteredSearchData(filterdData);
setSearch(text);
setSearch(searchText);
};

return (
<React.Fragment>
{controller.issuers.length > 0 && (
<Column style={Theme.IssuersScreenStyles.issuerListOuterContainer}>
<Text
{...testIDProps('addCardDescription')}
{...testIDProps('issuersScreenDescription')}
style={{
...Theme.TextStyles.regularGrey,
paddingTop: 0.5,
marginVertical: 14,
marginHorizontal: 9,
}}>
{t('addCardDescription')}
{t('description')}
</Text>
<Row margin="3">
<Icon
Expand All @@ -173,8 +170,8 @@ export const IssuersScreen: React.FC<
style={Theme.IssuersScreenStyles.issuersSearchBar}
placeholder={t('searchByIssuersName')}
value={search}
onChangeText={text => filterIssuers(text)}
onLayout={filterIssuers}
onChangeText={searchText => filterIssuers(searchText)}
onLayout={() => filterIssuers('')}
/>
</Row>

Expand Down

0 comments on commit 2fd4cec

Please sign in to comment.