@fadyshawky/react-native-magic 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/package.json +1 -1
  2. package/template/App.tsx +28 -19
  3. package/template/ios/reactnativemagic/AppDelegate.mm +5 -0
  4. package/template/src/common/components/Background.tsx +6 -4
  5. package/template/src/common/components/Container.tsx +6 -9
  6. package/template/src/common/components/OTPInput.tsx +3 -2
  7. package/template/src/common/components/PrimaryButton.tsx +23 -23
  8. package/template/src/common/components/PrimaryTextInput.tsx +189 -199
  9. package/template/src/common/components/RadioIcon.tsx +4 -4
  10. package/template/src/common/components/SafeText.tsx +41 -0
  11. package/template/src/common/components/SearchBar.tsx +19 -17
  12. package/template/src/common/components/TryAgain.tsx +3 -3
  13. package/template/src/common/localization/LocalizationProvider.tsx +14 -17
  14. package/template/src/common/localization/RTLInitializer.tsx +90 -0
  15. package/template/src/common/localization/localization.ts +8 -0
  16. package/template/src/common/localization/translations/commonLocalization.ts +33 -6
  17. package/template/src/common/localization/translations/emptyLocalization.ts +6 -2
  18. package/template/src/common/localization/translations/errorsLocalization.ts +33 -13
  19. package/template/src/common/localization/translations/homeLocalization.ts +6 -2
  20. package/template/src/common/localization/translations/loginLocalization.ts +32 -9
  21. package/template/src/common/localization/translations/mainNavigationLocalization.ts +30 -0
  22. package/template/src/common/localization/translations/navigationLocalization.ts +48 -0
  23. package/template/src/common/localization/translations/onboardingLocalization.ts +40 -9
  24. package/template/src/common/localization/translations/otpLocalization.ts +28 -0
  25. package/template/src/common/localization/translations/pagesLocalization.ts +13 -1
  26. package/template/src/common/localization/translations/passwordLocalization.ts +54 -0
  27. package/template/src/common/localization/translations/profileLocalization.ts +4 -4
  28. package/template/src/common/utils/FeesCaalculation.tsx +37 -0
  29. package/template/src/common/utils/index.tsx +11 -0
  30. package/template/src/common/utils/printData.tsx +161 -0
  31. package/template/src/common/validations/errorValidations.ts +3 -2
  32. package/template/src/core/api/serverHeaders.ts +62 -1
  33. package/template/src/core/store/Categories/categoryActions.ts +33 -0
  34. package/template/src/core/store/Categories/categorySlice.ts +75 -0
  35. package/template/src/core/store/Categories/categoryState.ts +41 -0
  36. package/template/src/core/store/Providers/providersActions.ts +102 -0
  37. package/template/src/core/store/Providers/providersSlice.ts +136 -0
  38. package/template/src/core/store/Providers/providersState.ts +37 -0
  39. package/template/src/core/store/Services/servicesActions.ts +191 -0
  40. package/template/src/core/store/Services/servicesSlice.ts +205 -0
  41. package/template/src/core/store/Services/servicesState.ts +466 -0
  42. package/template/src/core/store/app/appSlice.ts +13 -5
  43. package/template/src/core/store/app/appState.ts +10 -2
  44. package/template/src/core/store/rootReducer.ts +6 -1
  45. package/template/src/core/store/store.tsx +55 -2
  46. package/template/src/core/store/user/userActions.ts +164 -26
  47. package/template/src/core/store/user/userSlice.ts +193 -21
  48. package/template/src/core/store/user/userState.ts +148 -25
  49. package/template/src/core/theme/colors.ts +12 -0
  50. package/template/src/core/theme/themes.ts +1 -1
  51. package/template/src/core/utils/stringUtils.ts +114 -0
  52. package/template/src/navigation/AuthStack.tsx +8 -0
  53. package/template/src/navigation/HeaderComponents.tsx +52 -1
  54. package/template/src/navigation/MainNavigation.tsx +3 -1
  55. package/template/src/navigation/MainStack.tsx +39 -56
  56. package/template/src/navigation/TabBar.tsx +111 -59
  57. package/template/src/navigation/types.ts +24 -0
  58. package/template/src/screens/Login/Login.tsx +83 -85
  59. package/template/src/screens/OTP/OTPScreen.tsx +169 -0
  60. package/template/src/screens/home/Components/PayByCode.tsx +129 -0
  61. package/template/src/screens/home/HomeScreen.tsx +1 -103
  62. package/template/src/screens/home/hooks/useHomeData.ts +32 -38
  63. package/template/src/screens/index.tsx +24 -0
  64. package/template/src/common/components/Stepper.tsx +0 -153
  65. package/template/src/common/components/Svg.tsx +0 -25
  66. package/template/src/common/hooks/useDebounce.ts +0 -17
  67. package/template/src/common/hooks/usePrevious.ts +0 -11
  68. package/template/src/common/urls/emailUrl.ts +0 -20
  69. package/template/src/common/urls/mapUrl.ts +0 -22
  70. package/template/src/common/utils/listHandlers.ts +0 -30
  71. package/template/src/common/utils/serializeQueryParams.ts +0 -10
  72. package/template/src/common/validations/hooks/useDatesError.ts +0 -40
  73. package/template/src/common/validations/profileValidations.ts +0 -30
  74. package/template/src/navigation/TopTabBar.tsx +0 -77
  75. package/template/src/screens/Settings/Settings.tsx +0 -5
  76. package/template/src/screens/home/components/CarouselSection.tsx +0 -79
  77. package/template/src/screens/home/components/FeaturedCarousel.tsx +0 -128
  78. package/template/src/screens/main/Main.tsx +0 -5
  79. package/template/src/screens/registration/RegistrationScreen.tsx +0 -198
  80. package/template/src/screens/resetPassword/ForgotPasswordScreen.tsx +0 -129
@@ -46,41 +46,42 @@ export const LocalizationProvider: React.FC<LocalizationProviderProps> = ({
46
46
  storedIsRTL !== undefined ? storedIsRTL : currentLanguage === Languages.ar,
47
47
  );
48
48
 
49
+ // Update RTL state when stored values change
49
50
  useEffect(() => {
50
- setLanguageUtil(currentLanguage);
51
- setIsRTL(currentLanguage === Languages.ar);
51
+ if (storedIsRTL !== undefined) {
52
+ setIsRTL(storedIsRTL);
53
+ } else if (storedLanguage) {
54
+ setIsRTL(storedLanguage === Languages.ar);
55
+ }
56
+ }, [storedLanguage, storedIsRTL]);
52
57
 
53
- // Force app restart on Android when changing RTL/LTR
54
- if (Platform.OS === 'android') {
55
- const shouldBeRTL = currentLanguage === Languages.ar;
56
- if (I18nManager.isRTL !== shouldBeRTL) {
57
- I18nManager.allowRTL(shouldBeRTL);
58
- I18nManager.forceRTL(shouldBeRTL);
59
- }
58
+ // Set language utility when currentLanguage changes
59
+ useEffect(() => {
60
+ if (currentLanguage) {
61
+ setLanguageUtil(currentLanguage);
60
62
  }
61
63
  }, [currentLanguage]);
62
64
 
63
65
  const changeLanguage = (language: Languages) => {
64
- // Only restart if the language is actually changing
65
66
  if (language !== currentLanguage) {
67
+ console.log('Changing language from', currentLanguage, 'to', language);
68
+
66
69
  setCurrentLanguage(language);
67
70
  dispatch(setLanguageAction(language));
68
71
 
69
72
  // Set RTL configuration before restart
70
73
  const shouldBeRTL = language === Languages.ar;
71
74
  if (I18nManager.isRTL !== shouldBeRTL) {
75
+ console.log('Language change requires RTL update:', shouldBeRTL);
72
76
  I18nManager.allowRTL(shouldBeRTL);
73
77
  I18nManager.forceRTL(shouldBeRTL);
74
78
 
75
79
  // Restart the app to apply RTL/LTR changes properly
76
- // Small delay to ensure settings are applied
77
80
  setTimeout(() => {
78
81
  try {
79
- // Check if RNRestart is available
80
82
  if (RNRestart && typeof RNRestart.restart === 'function') {
81
83
  RNRestart.restart();
82
84
  } else if (Platform.OS === 'android') {
83
- // Fallback for Android using DevSettings
84
85
  const DevSettings = NativeModules.DevSettings;
85
86
  if (DevSettings && DevSettings.reload) {
86
87
  DevSettings.reload();
@@ -103,7 +104,6 @@ export const LocalizationProvider: React.FC<LocalizationProviderProps> = ({
103
104
  const keys = key.split('.');
104
105
  let result: any = localization[section];
105
106
 
106
- // If the key has dot notation (e.g., 'registration.title'), navigate through the object
107
107
  if (keys.length > 1) {
108
108
  for (const k of keys) {
109
109
  result = result[k];
@@ -111,7 +111,6 @@ export const LocalizationProvider: React.FC<LocalizationProviderProps> = ({
111
111
  return result || key;
112
112
  }
113
113
 
114
- // Simple key
115
114
  return result[key] || key;
116
115
  } catch (error) {
117
116
  console.warn(
@@ -139,13 +138,11 @@ export const useLocalization = () => {
139
138
  return context;
140
139
  };
141
140
 
142
- // Shorthand hook for translations
143
141
  export const useTranslation = () => {
144
142
  const {t} = useLocalization();
145
143
  return t;
146
144
  };
147
145
 
148
- // Hook to get RTL status
149
146
  export const useRTL = () => {
150
147
  const {isRTL} = useLocalization();
151
148
  return isRTL;
@@ -0,0 +1,90 @@
1
+ import React, {useEffect, useState} from 'react';
2
+ import {I18nManager, Platform, NativeModules} from 'react-native';
3
+ import {useAppSelector} from '../../core/store/reduxHelpers';
4
+ import {Languages} from './localization';
5
+
6
+ interface RTLInitializerProps {
7
+ children: React.ReactNode;
8
+ }
9
+
10
+ export const RTLInitializer: React.FC<RTLInitializerProps> = ({children}) => {
11
+ const [isInitialized, setIsInitialized] = useState(false);
12
+ const {language, isRTL} = useAppSelector(state => state.app);
13
+
14
+ useEffect(() => {
15
+ const initializeRTL = () => {
16
+ console.log('=== RTL Initializer - Starting initialization ===');
17
+ console.log('Stored language:', language);
18
+ console.log('Stored isRTL:', isRTL);
19
+ console.log('Current I18nManager.isRTL:', I18nManager.isRTL);
20
+ console.log('Current I18nManager.forceRTL:', I18nManager.forceRTL);
21
+
22
+ // Determine the correct RTL setting with better logic
23
+ let shouldBeRTL: boolean;
24
+
25
+ if (isRTL !== undefined) {
26
+ // Use stored RTL setting if available (highest priority)
27
+ shouldBeRTL = isRTL;
28
+ console.log('✅ Using stored isRTL setting:', shouldBeRTL);
29
+ } else if (language) {
30
+ // Use stored language to determine RTL
31
+ shouldBeRTL = language === Languages.ar;
32
+ console.log('✅ Using language-based RTL setting:', shouldBeRTL);
33
+ } else {
34
+ // Fall back to default (Arabic/RTL)
35
+ shouldBeRTL = true;
36
+ console.log('✅ Using default RTL setting:', shouldBeRTL);
37
+ }
38
+
39
+ // Apply RTL setting if it differs from current
40
+ if (I18nManager.isRTL !== shouldBeRTL) {
41
+ console.log(
42
+ '🔄 Updating I18nManager RTL from',
43
+ I18nManager.isRTL,
44
+ 'to',
45
+ shouldBeRTL,
46
+ );
47
+
48
+ // Force the RTL setting
49
+ I18nManager.allowRTL(shouldBeRTL);
50
+ I18nManager.forceRTL(shouldBeRTL);
51
+
52
+ // Double-check the setting was applied
53
+ setTimeout(() => {
54
+ console.log(
55
+ ' Verification - I18nManager.isRTL after update:',
56
+ I18nManager.isRTL,
57
+ );
58
+ if (I18nManager.isRTL !== shouldBeRTL) {
59
+ console.warn('⚠️ RTL setting was not applied correctly!');
60
+ } else {
61
+ console.log('✅ RTL setting applied successfully');
62
+ }
63
+ }, 100);
64
+ } else {
65
+ console.log(
66
+ '✅ I18nManager RTL setting is already correct:',
67
+ I18nManager.isRTL,
68
+ );
69
+ }
70
+
71
+ // Mark as initialized
72
+ setIsInitialized(true);
73
+ console.log('=== RTL Initializer - Initialization complete ===');
74
+ };
75
+
76
+ // Wait longer to ensure Redux state is fully hydrated
77
+ // Increased timeout to handle slower devices
78
+ const timer = setTimeout(initializeRTL, 800);
79
+ return () => clearTimeout(timer);
80
+ }, [language, isRTL]);
81
+
82
+ // Don't render children until RTL is initialized
83
+ if (!isInitialized) {
84
+ console.log('⏳ RTL Initializer: Waiting for initialization...');
85
+ return null; // or a loading screen
86
+ }
87
+
88
+ console.log('🚀 RTL Initializer: Rendering children');
89
+ return <>{children}</>;
90
+ };
@@ -9,6 +9,10 @@ import {loginLocalization} from './translations/loginLocalization';
9
9
  import {homeLocalization} from './translations/homeLocalization';
10
10
  import {profileLocalization} from './translations/profileLocalization';
11
11
  import {I18nManager} from 'react-native';
12
+ import {otpLocalization} from './translations/otpLocalization';
13
+ import {passwordLocalization} from './translations/passwordLocalization';
14
+ import {navigationLocalization} from './translations/navigationLocalization';
15
+ import {mainNavigationLocalization} from './translations/mainNavigationLocalization';
12
16
 
13
17
  export enum Languages {
14
18
  en = 'en',
@@ -24,6 +28,10 @@ export const localization = {
24
28
  login: new LocalizedStrings(loginLocalization),
25
29
  home: new LocalizedStrings(homeLocalization),
26
30
  profile: new LocalizedStrings(profileLocalization),
31
+ otp: new LocalizedStrings(otpLocalization),
32
+ password: new LocalizedStrings(passwordLocalization),
33
+ navigation: new LocalizedStrings(navigationLocalization),
34
+ mainNavigation: new LocalizedStrings(mainNavigationLocalization),
27
35
  };
28
36
 
29
37
  export function getLanguage(): string {
@@ -1,19 +1,19 @@
1
1
  export const commonLocalization = {
2
2
  en: {
3
3
  search: 'Search',
4
- selectPhoto: 'Select a photo',
5
- takePhoto: 'Take a photo',
6
- chooseFromLibrary: 'Choose from library',
4
+ selectPhoto: 'Select Photo',
5
+ takePhoto: 'Take Photo',
6
+ chooseFromLibrary: 'Choose from Library',
7
7
  cancel: 'Cancel',
8
8
  reject: 'Reject',
9
9
  delete: 'Delete',
10
10
  back: 'Back',
11
11
  next: 'Next',
12
12
  done: 'Done',
13
- ok: 'Ok',
13
+ ok: 'OK',
14
14
  continue: 'Continue',
15
15
  save: 'Save',
16
- loading: 'Loading',
16
+ loading: 'Loading...',
17
17
  photo: 'Photo',
18
18
  yes: 'Yes',
19
19
  no: 'No',
@@ -21,9 +21,36 @@ export const commonLocalization = {
21
21
  warning: 'Warning',
22
22
  success: 'Success',
23
23
  select: 'Select',
24
- dataSuccessfullyUpdated: 'Data has been successfully updated',
24
+ dataSuccessfullyUpdated: 'Data updated successfully',
25
25
  settings: 'Settings',
26
26
  required: ' (required)',
27
27
  optional: ' (optional)',
28
28
  },
29
+ ar: {
30
+ search: 'بحث',
31
+ selectPhoto: 'اختر صورة',
32
+ takePhoto: 'التقاط صورة',
33
+ chooseFromLibrary: 'اختر من المكتبة',
34
+ cancel: 'إلغاء',
35
+ reject: 'رفض',
36
+ delete: 'حذف',
37
+ back: 'رجوع',
38
+ next: 'التالي',
39
+ done: 'تم',
40
+ ok: 'موافق',
41
+ continue: 'متابعة',
42
+ save: 'حفظ',
43
+ loading: 'جاري التحميل...',
44
+ photo: 'صورة',
45
+ yes: 'نعم',
46
+ no: 'لا',
47
+ areYouSure: 'هل أنت متأكد؟',
48
+ warning: 'تحذير',
49
+ success: 'نجح',
50
+ select: 'اختيار',
51
+ dataSuccessfullyUpdated: 'تم تحديث البيانات بنجاح',
52
+ settings: 'الإعدادات',
53
+ required: ' (مطلوب)',
54
+ optional: ' (اختياري)',
55
+ },
29
56
  };
@@ -1,6 +1,10 @@
1
1
  export const emptyLocalization = {
2
2
  en: {
3
- noData: 'No data',
4
- checkThisPageLater: 'Check this page later',
3
+ noData: 'No data available',
4
+ checkThisPageLater: 'Check back later',
5
+ },
6
+ ar: {
7
+ noData: 'لا توجد بيانات',
8
+ checkThisPageLater: 'تحقق لاحقاً',
5
9
  },
6
10
  };
@@ -1,22 +1,42 @@
1
1
  export const errorsLocalization = {
2
2
  en: {
3
- listErrorTitle: 'Failed to load data.',
4
- tryAgain: 'Try again.',
5
- thisFieldIsRequired: 'This field is required.',
6
- unknownErrorHasOccurred: 'An unknown error has occurred.',
7
- failedToOpenUrl: 'Failed to open URL. Check that the app is installed.',
8
- pleaseCheckYourInternetConnection: 'Please check your Internet connection.',
9
- invalidEmail: 'Invalid Email',
3
+ listErrorTitle: 'Failed to load data',
4
+ tryAgain: 'Try again',
5
+ thisFieldIsRequired: 'This field is required',
6
+ unknownErrorHasOccurred: 'An error occurred',
7
+ failedToOpenUrl: 'Failed to open URL',
8
+ pleaseCheckYourInternetConnection: 'Please check your internet connection',
9
+ invalidEmail: 'Invalid email',
10
10
  invalidPhoneNumber: 'Invalid phone number',
11
- invalidFullName: 'Invalid full name',
11
+ invalidFullName: 'Invalid name',
12
12
  invalidFromDate: (fromField: string, toField: string) =>
13
- `${fromField} can't be later than ${toField.toLowerCase()}`,
13
+ `${fromField} cannot be later than ${toField.toLowerCase()}`,
14
14
  invalidToDate: (fromField: string, toField: string) =>
15
- `${toField} can't be earlier than ${fromField.toLowerCase()}`,
15
+ `${toField} cannot be earlier than ${fromField.toLowerCase()}`,
16
16
  datesCantBeEqual: (fromField: string, toField: string) =>
17
- `${fromField} and ${toField.toLowerCase()} can't be equal`,
18
- mobileDataIsTurnedOff: 'Mobile Data is Turned Off',
19
- turnOnMobileData: 'Turn on mobile data or use Wi-Fi to access data.',
17
+ `${fromField} and ${toField.toLowerCase()} cannot be equal`,
18
+ mobileDataIsTurnedOff: 'Mobile data is turned off',
19
+ turnOnMobileData: 'Turn on mobile data or use Wi-Fi',
20
20
  error: 'Error',
21
21
  },
22
+ ar: {
23
+ listErrorTitle: 'فشل تحميل البيانات',
24
+ tryAgain: 'حاول مرة أخرى',
25
+ thisFieldIsRequired: 'هذا الحقل مطلوب',
26
+ unknownErrorHasOccurred: 'حدث خطأ',
27
+ failedToOpenUrl: 'فشل فتح الرابط',
28
+ pleaseCheckYourInternetConnection: 'يرجى التحقق من اتصال الإنترنت',
29
+ invalidEmail: 'بريد إلكتروني غير صالح',
30
+ invalidPhoneNumber: 'رقم هاتف غير صالح',
31
+ invalidFullName: 'اسم غير صالح',
32
+ invalidFromDate: (fromField: string, toField: string) =>
33
+ `${fromField} لا يمكن أن يكون بعد ${toField.toLowerCase()}`,
34
+ invalidToDate: (fromField: string, toField: string) =>
35
+ `${toField} لا يمكن أن يكون قبل ${fromField.toLowerCase()}`,
36
+ datesCantBeEqual: (fromField: string, toField: string) =>
37
+ `${fromField} و ${toField.toLowerCase()} لا يمكن أن يكونا متساويين`,
38
+ mobileDataIsTurnedOff: 'بيانات الجوال مغلقة',
39
+ turnOnMobileData: 'قم بتشغيل بيانات الجوال أو استخدم Wi-Fi',
40
+ error: 'خطأ',
41
+ },
22
42
  };
@@ -1,6 +1,10 @@
1
1
  export const homeLocalization = {
2
2
  en: {
3
- welcome: 'Hi ',
4
- home: 'Home',
3
+ welcome: 'Welcome',
4
+ title: 'Home',
5
+ },
6
+ ar: {
7
+ welcome: 'مرحباً',
8
+ title: 'الرئيسية',
5
9
  },
6
10
  };
@@ -1,15 +1,17 @@
1
1
  export const loginLocalization = {
2
2
  en: {
3
3
  Login: 'Login',
4
- welcome: 'Welcome',
4
+ welcome: 'Welcome Back',
5
+ welcome_description: 'Sign in to your account to continue',
5
6
  Email: 'Email',
6
- EnterEmail: 'Enter email',
7
+ EnterEmail: 'Enter your email',
7
8
  Password: 'Password',
8
- EnterPassword: 'Enter password',
9
+ EnterPassword: 'Enter your password',
10
+ PhoneNumber: 'Phone Number',
9
11
  forgetPassword: 'Forgot Password?',
10
- continue: 'continue',
11
- notMember: 'Not a member? Register now',
12
- findNursery: 'Find nursery',
12
+ continue: 'Continue',
13
+ notMember: 'Not a member?',
14
+ identification_number: 'ID Number',
13
15
  registration: {
14
16
  title: 'Create Account',
15
17
  fullName: 'Full Name',
@@ -17,14 +19,35 @@ export const loginLocalization = {
17
19
  password: 'Password',
18
20
  confirmPassword: 'Confirm Password',
19
21
  register: 'Register',
20
- alreadyHaveAccount: 'Already have an account? Login',
22
+ alreadyHaveAccount: 'Already have an account?',
21
23
  },
22
24
  forgotPassword: {
23
25
  title: 'Forgot Password',
24
- description:
25
- "Enter your email address and we'll send you instructions to reset your password.",
26
+ description: 'Enter your email to reset your password',
26
27
  resetPassword: 'Reset Password',
27
28
  backToLogin: 'Back to Login',
28
29
  },
30
+ register_1: "Don't have an account?",
31
+ register_2: 'Sign up',
32
+ },
33
+ ar: {
34
+ Login: 'تسجيل الدخول',
35
+ welcome: 'مرحباً بك',
36
+ welcome_description: 'سجل دخولك للمتابعة',
37
+ identification_number: 'رقم الهوية',
38
+ Email: 'البريد الإلكتروني',
39
+ EnterEmail: 'أدخل بريدك الإلكتروني',
40
+ Password: 'كلمة المرور',
41
+ EnterPassword: 'أدخل كلمة المرور',
42
+ PhoneNumber: 'رقم الهاتف',
43
+ EnterPhoneNumber: 'أدخل رقم الهاتف',
44
+ Country: 'الدولة',
45
+ EnterCountry: 'أدخل الدولة',
46
+ CountryCode: 'رمز الدولة',
47
+ EnterCountryCode: 'أدخل رمز الدولة',
48
+ CountrySelector: 'اختر الدولة',
49
+ EnterCountrySelector: 'أدخل اختيار الدولة',
50
+ register_1: 'ليس لديك حساب؟',
51
+ register_2: 'سجل الآن',
29
52
  },
30
53
  };
@@ -0,0 +1,30 @@
1
+ export const mainNavigationLocalization = {
2
+ en: {
3
+ tabs: {
4
+ Main: 'Home',
5
+ Favorites: 'Favorites',
6
+ Financials: 'Financials',
7
+ Account: 'Account',
8
+ },
9
+ screens: {
10
+ Home: 'Home',
11
+ Settings: 'Settings',
12
+ ForceChangePassword: 'Change Password',
13
+ Services: 'Services',
14
+ },
15
+ },
16
+ ar: {
17
+ tabs: {
18
+ Main: 'الرئيسية',
19
+ Favorites: 'المفضلة',
20
+ Financials: 'المالية',
21
+ Account: 'الحساب',
22
+ },
23
+ screens: {
24
+ Home: 'الرئيسية',
25
+ Settings: 'الإعدادات',
26
+ ForceChangePassword: 'تغيير كلمة المرور',
27
+ Services: 'الخدمات',
28
+ },
29
+ },
30
+ };
@@ -0,0 +1,48 @@
1
+ export const navigationLocalization = {
2
+ en: {
3
+ screens: {
4
+ // Auth Stack
5
+ Splash: 'Splash',
6
+ Login: 'Login',
7
+ OTP: 'Verification',
8
+ ForceChangePassword: 'Change Password',
9
+ ForgotPassword: 'Forgot Password',
10
+ Registration: 'Registration',
11
+
12
+ // Main Stack
13
+ Home: 'Home',
14
+ Profile: 'Profile',
15
+ Settings: 'Settings',
16
+ Notifications: 'Notifications',
17
+
18
+ // Tab Bar
19
+ HomeTab: 'Home',
20
+ ProfileTab: 'Profile',
21
+ SettingsTab: 'Settings',
22
+ NotificationsTab: 'Notifications',
23
+ },
24
+ },
25
+ ar: {
26
+ screens: {
27
+ // Auth Stack
28
+ Splash: 'البداية',
29
+ Login: 'تسجيل الدخول',
30
+ OTP: 'التحقق',
31
+ ForceChangePassword: 'تغيير كلمة المرور',
32
+ ForgotPassword: 'نسيت كلمة المرور',
33
+ Registration: 'التسجيل',
34
+
35
+ // Main Stack
36
+ Home: 'الرئيسية',
37
+ Profile: 'الملف الشخصي',
38
+ Settings: 'الإعدادات',
39
+ Notifications: 'الإشعارات',
40
+
41
+ // Tab Bar
42
+ HomeTab: 'الرئيسية',
43
+ ProfileTab: 'الملف الشخصي',
44
+ SettingsTab: 'الإعدادات',
45
+ NotificationsTab: 'الإشعارات',
46
+ },
47
+ },
48
+ };
@@ -1,13 +1,44 @@
1
1
  export const onboardingLocalization = {
2
2
  en: {
3
- welcomeToApp: 'Welcome to\nApp',
4
- firstHeader: 'Welcome',
5
- firstBody: 'Thank you for choosing react-native-template-strong',
6
- secondHeader: 'Learn',
7
- secondBody:
8
- 'Some things are already done, to know more check the contents of pages and tabs',
9
- thirdHeader: 'Star',
10
- thirdBody:
11
- 'Star the repo if you find this project useful and participate in its development',
3
+ welcome: 'Welcome',
4
+ getStarted: 'Get Started',
5
+ skip: 'Skip',
6
+ next: 'Next',
7
+ done: 'Done',
8
+ slides: {
9
+ slide1: {
10
+ title: 'Welcome to Our App',
11
+ description: 'Discover amazing features and possibilities',
12
+ },
13
+ slide2: {
14
+ title: 'Easy to Use',
15
+ description: 'Simple and intuitive interface for everyone',
16
+ },
17
+ slide3: {
18
+ title: 'Get Started',
19
+ description: 'Ready to begin your journey with us',
20
+ },
21
+ },
22
+ },
23
+ ar: {
24
+ welcome: 'مرحباً',
25
+ getStarted: 'ابدأ',
26
+ skip: 'تخطي',
27
+ next: 'التالي',
28
+ done: 'تم',
29
+ slides: {
30
+ slide1: {
31
+ title: 'مرحباً بك في تطبيقنا',
32
+ description: 'اكتشف الميزات والإمكانيات الرائعة',
33
+ },
34
+ slide2: {
35
+ title: 'سهل الاستخدام',
36
+ description: 'واجهة بسيطة وبديهية للجميع',
37
+ },
38
+ slide3: {
39
+ title: 'ابدأ الآن',
40
+ description: 'مستعد لبدء رحلتك معنا',
41
+ },
42
+ },
12
43
  },
13
44
  };
@@ -0,0 +1,28 @@
1
+ export const otpLocalization = {
2
+ en: {
3
+ title: 'Verification',
4
+ subtitle: 'Enter the verification code sent to your phone',
5
+ didntReceiveCode: "Didn't receive code?",
6
+ resendIn: 'Resend in {0}s',
7
+ resend: 'Resend',
8
+ verify: 'Verify',
9
+ invalidCode: 'Invalid code',
10
+ verificationFailed: 'Verification failed',
11
+ verificationSuccess: 'Verification successful',
12
+ resendSuccess: 'Code sent successfully',
13
+ resendFailed: 'Failed to send code',
14
+ },
15
+ ar: {
16
+ title: 'التحقق',
17
+ subtitle: 'أدخل رمز التحقق المرسل إلى هاتفك',
18
+ didntReceiveCode: 'لم تستلم الرمز؟',
19
+ resendIn: 'إعادة إرسال خلال {0} ثانية',
20
+ resend: 'إعادة إرسال',
21
+ verify: 'تحقق',
22
+ invalidCode: 'رمز غير صالح',
23
+ verificationFailed: 'فشل التحقق',
24
+ verificationSuccess: 'تم التحقق بنجاح',
25
+ resendSuccess: 'تم إرسال الرمز بنجاح',
26
+ resendFailed: 'فشل إرسال الرمز',
27
+ },
28
+ };
@@ -8,7 +8,19 @@ export const pagesLocalization = {
8
8
  reports: 'Reports',
9
9
  learnings: 'Learnings',
10
10
  settings: 'Settings',
11
- selectDate: 'Select date',
11
+ selectDate: 'Select Date',
12
12
  storybook: 'Storybook',
13
13
  },
14
+ ar: {
15
+ main: 'الرئيسية',
16
+ login: 'تسجيل الدخول',
17
+ search: 'بحث',
18
+ pickup: 'استلام',
19
+ profile: 'الملف الشخصي',
20
+ reports: 'التقارير',
21
+ learnings: 'التعلم',
22
+ settings: 'الإعدادات',
23
+ selectDate: 'اختر التاريخ',
24
+ storybook: 'قصة',
25
+ },
14
26
  };
@@ -0,0 +1,54 @@
1
+ export const passwordLocalization = {
2
+ en: {
3
+ forceChange: {
4
+ title: 'Change Password',
5
+ subtitle: 'Please change your password to continue',
6
+ currentPassword: 'Current Password',
7
+ enterCurrentPassword: 'Enter current password',
8
+ newPassword: 'New Password',
9
+ enterNewPassword: 'Enter new password',
10
+ confirmPassword: 'Confirm Password',
11
+ confirmNewPassword: 'Confirm new password',
12
+ changePassword: 'Change Password',
13
+ passwordChanged: 'Password changed successfully',
14
+ passwordChangeFailed: 'Failed to change password',
15
+ passwordsDoNotMatch: 'Passwords do not match',
16
+ invalidCurrentPassword: 'Invalid current password',
17
+ invalidNewPassword: 'Invalid new password',
18
+ },
19
+ forgot: {
20
+ title: 'Forgot Password',
21
+ subtitle: 'Enter your email to reset your password',
22
+ resetPassword: 'Reset Password',
23
+ backToLogin: 'Back to Login',
24
+ resetEmailSent: 'Reset email sent',
25
+ resetEmailFailed: 'Failed to send reset email',
26
+ },
27
+ },
28
+ ar: {
29
+ forceChange: {
30
+ title: 'تغيير كلمة المرور',
31
+ subtitle: 'يرجى تغيير كلمة المرور للمتابعة',
32
+ currentPassword: 'كلمة المرور الحالية',
33
+ enterCurrentPassword: 'أدخل كلمة المرور الحالية',
34
+ newPassword: 'كلمة المرور الجديدة',
35
+ enterNewPassword: 'أدخل كلمة المرور الجديدة',
36
+ confirmPassword: 'تأكيد كلمة المرور',
37
+ confirmNewPassword: 'تأكيد كلمة المرور الجديدة',
38
+ changePassword: 'تغيير كلمة المرور',
39
+ passwordChanged: 'تم تغيير كلمة المرور بنجاح',
40
+ passwordChangeFailed: 'فشل تغيير كلمة المرور',
41
+ passwordsDoNotMatch: 'كلمات المرور غير متطابقة',
42
+ invalidCurrentPassword: 'كلمة المرور الحالية غير صحيحة',
43
+ invalidNewPassword: 'كلمة المرور الجديدة غير صالحة',
44
+ },
45
+ forgot: {
46
+ title: 'نسيت كلمة المرور',
47
+ subtitle: 'أدخل بريدك الإلكتروني لإعادة تعيين كلمة المرور',
48
+ resetPassword: 'إعادة تعيين كلمة المرور',
49
+ backToLogin: 'العودة إلى تسجيل الدخول',
50
+ resetEmailSent: 'تم إرسال بريد إعادة التعيين',
51
+ resetEmailFailed: 'فشل إرسال بريد إعادة التعيين',
52
+ },
53
+ },
54
+ };