@umituz/react-native-localization 1.5.2 → 1.5.4
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.
package/package.json
CHANGED
|
@@ -197,6 +197,16 @@ const buildResources = (): Record<string, { translation: any }> => {
|
|
|
197
197
|
|
|
198
198
|
const resources = buildResources();
|
|
199
199
|
|
|
200
|
+
// Debug: Log loaded resources in development
|
|
201
|
+
/* eslint-disable-next-line no-console */
|
|
202
|
+
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
203
|
+
console.log('🌍 i18n Resources loaded:', {
|
|
204
|
+
languages: Object.keys(resources),
|
|
205
|
+
enUSKeys: resources['en-US']?.translation ? Object.keys(resources['en-US'].translation) : [],
|
|
206
|
+
hasGoals: !!resources['en-US']?.translation?.goals,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
200
210
|
/**
|
|
201
211
|
* Initialize i18next
|
|
202
212
|
* Deferred initialization to avoid React Native renderer conflicts
|
|
@@ -228,10 +238,27 @@ const initializeI18n = () => {
|
|
|
228
238
|
compatibilityJSON: 'v3', // Use v3 format for React Native (no Intl.PluralRules support)
|
|
229
239
|
pluralSeparator: '_', // Use underscore separator for plural keys
|
|
230
240
|
keySeparator: '.', // Use dot separator for nested keys
|
|
241
|
+
|
|
242
|
+
// Debug options
|
|
243
|
+
debug: typeof __DEV__ !== 'undefined' && __DEV__,
|
|
231
244
|
});
|
|
232
245
|
|
|
233
246
|
isInitialized = true;
|
|
247
|
+
|
|
248
|
+
// Debug: Verify initialization
|
|
249
|
+
/* eslint-disable-next-line no-console */
|
|
250
|
+
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
251
|
+
console.log('✅ i18n initialized:', {
|
|
252
|
+
language: i18n.language,
|
|
253
|
+
hasResource: !!i18n.getResourceBundle(i18n.language, 'translation'),
|
|
254
|
+
goalsTitle: i18n.t('goals.list.title', { defaultValue: 'NOT_FOUND' }),
|
|
255
|
+
});
|
|
256
|
+
}
|
|
234
257
|
} catch (error) {
|
|
258
|
+
/* eslint-disable-next-line no-console */
|
|
259
|
+
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
260
|
+
console.error('❌ i18n initialization error:', error);
|
|
261
|
+
}
|
|
235
262
|
// Don't throw - allow app to continue without i18n
|
|
236
263
|
}
|
|
237
264
|
};
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
{
|
|
2
|
+
"goals": {
|
|
3
|
+
"home": {
|
|
4
|
+
"title": "My Goals",
|
|
5
|
+
"addGoal": "Add New Goal",
|
|
6
|
+
"overallProgress": "Overall Progress",
|
|
7
|
+
"activeGoals": "active goals",
|
|
8
|
+
"completedGoals": "completed",
|
|
9
|
+
"quickStats": {
|
|
10
|
+
"active": "Active",
|
|
11
|
+
"completed": "Completed",
|
|
12
|
+
"onTrack": "On Track"
|
|
13
|
+
},
|
|
14
|
+
"sections": {
|
|
15
|
+
"activeGoals": "Active Goals",
|
|
16
|
+
"recentlyCompleted": "Recently Completed",
|
|
17
|
+
"quickActions": "Quick Actions"
|
|
18
|
+
},
|
|
19
|
+
"actions": {
|
|
20
|
+
"viewAll": "View All",
|
|
21
|
+
"allGoals": "All Goals",
|
|
22
|
+
"statistics": "Statistics",
|
|
23
|
+
"progress": "Progress"
|
|
24
|
+
},
|
|
25
|
+
"time": {
|
|
26
|
+
"remaining": "remaining",
|
|
27
|
+
"today": "Today",
|
|
28
|
+
"tomorrow": "Tomorrow",
|
|
29
|
+
"days": "days",
|
|
30
|
+
"weeks": "weeks",
|
|
31
|
+
"months": "months"
|
|
32
|
+
},
|
|
33
|
+
"completed": "Completed!",
|
|
34
|
+
"quote": {
|
|
35
|
+
"text": "A goal without a plan is just a wish.",
|
|
36
|
+
"author": "Antoine de Saint-Exupéry"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"list": {
|
|
40
|
+
"title": "All Goals",
|
|
41
|
+
"filters": {
|
|
42
|
+
"title": "Filter Goals",
|
|
43
|
+
"all": "All",
|
|
44
|
+
"active": "Active",
|
|
45
|
+
"completed": "Completed",
|
|
46
|
+
"archived": "Archived"
|
|
47
|
+
},
|
|
48
|
+
"empty": "No goals found",
|
|
49
|
+
"emptyActive": "No active goals found",
|
|
50
|
+
"emptyCompleted": "No completed goals found",
|
|
51
|
+
"emptyArchived": "No archived goals found",
|
|
52
|
+
"milestones": "milestones",
|
|
53
|
+
"target": "Target",
|
|
54
|
+
"daysRemaining": "days remaining",
|
|
55
|
+
"overdue": "Overdue"
|
|
56
|
+
},
|
|
57
|
+
"add": {
|
|
58
|
+
"title": "Create New Goal",
|
|
59
|
+
"sections": {
|
|
60
|
+
"basicInfo": "Basic Information",
|
|
61
|
+
"priority": "Priority",
|
|
62
|
+
"target": "Target",
|
|
63
|
+
"milestones": "Milestones"
|
|
64
|
+
},
|
|
65
|
+
"fields": {
|
|
66
|
+
"title": {
|
|
67
|
+
"label": "Goal Title",
|
|
68
|
+
"placeholder": "e.g., Learn Spanish, Run a Marathon",
|
|
69
|
+
"required": true
|
|
70
|
+
},
|
|
71
|
+
"description": {
|
|
72
|
+
"label": "Description",
|
|
73
|
+
"placeholder": "What do you want to achieve?",
|
|
74
|
+
"required": false
|
|
75
|
+
},
|
|
76
|
+
"category": {
|
|
77
|
+
"label": "Category",
|
|
78
|
+
"required": true
|
|
79
|
+
},
|
|
80
|
+
"targetDate": {
|
|
81
|
+
"label": "Target Date",
|
|
82
|
+
"placeholder": "YYYY-MM-DD",
|
|
83
|
+
"required": true
|
|
84
|
+
},
|
|
85
|
+
"targetValue": {
|
|
86
|
+
"label": "Target Value",
|
|
87
|
+
"placeholder": "e.g., 100",
|
|
88
|
+
"required": false
|
|
89
|
+
},
|
|
90
|
+
"unit": {
|
|
91
|
+
"label": "Unit",
|
|
92
|
+
"placeholder": "e.g., kg, km, $",
|
|
93
|
+
"required": false
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"categories": {
|
|
97
|
+
"personal": "Personal",
|
|
98
|
+
"career": "Career",
|
|
99
|
+
"fitness": "Fitness",
|
|
100
|
+
"finance": "Finance",
|
|
101
|
+
"education": "Education",
|
|
102
|
+
"health": "Health",
|
|
103
|
+
"hobby": "Hobby",
|
|
104
|
+
"other": "Other"
|
|
105
|
+
},
|
|
106
|
+
"priorities": {
|
|
107
|
+
"low": "Low",
|
|
108
|
+
"medium": "Medium",
|
|
109
|
+
"high": "High"
|
|
110
|
+
},
|
|
111
|
+
"info": {
|
|
112
|
+
"milestones": "You can add milestones after creating the goal"
|
|
113
|
+
},
|
|
114
|
+
"actions": {
|
|
115
|
+
"cancel": "Cancel",
|
|
116
|
+
"create": "Create Goal",
|
|
117
|
+
"save": "Save Changes"
|
|
118
|
+
},
|
|
119
|
+
"validation": {
|
|
120
|
+
"title": "Validation Error",
|
|
121
|
+
"message": "Please fill all required fields",
|
|
122
|
+
"invalidDateTitle": "Invalid Date",
|
|
123
|
+
"invalidDateMessage": "Please enter date in YYYY-MM-DD format"
|
|
124
|
+
},
|
|
125
|
+
"success": {
|
|
126
|
+
"created": "Goal created successfully!",
|
|
127
|
+
"updated": "Goal updated successfully!"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"details": {
|
|
131
|
+
"title": "Goal Details",
|
|
132
|
+
"goalNotFound": "Goal not found",
|
|
133
|
+
"sections": {
|
|
134
|
+
"progress": "Progress",
|
|
135
|
+
"timeline": "Timeline",
|
|
136
|
+
"milestones": "Recent Milestones",
|
|
137
|
+
"allMilestones": "All Milestones"
|
|
138
|
+
},
|
|
139
|
+
"progress": {
|
|
140
|
+
"overall": "Overall Progress",
|
|
141
|
+
"milestones": "Milestones",
|
|
142
|
+
"current": "Current",
|
|
143
|
+
"target": "Target",
|
|
144
|
+
"updateProgress": "Update Progress"
|
|
145
|
+
},
|
|
146
|
+
"timeline": {
|
|
147
|
+
"created": "Created",
|
|
148
|
+
"targetDate": "Target Date",
|
|
149
|
+
"daysRemaining": "Days Remaining",
|
|
150
|
+
"completed": "Completed",
|
|
151
|
+
"archived": "Archived"
|
|
152
|
+
},
|
|
153
|
+
"actions": {
|
|
154
|
+
"viewAll": "View All",
|
|
155
|
+
"markCompleted": "Mark as Completed",
|
|
156
|
+
"archive": "Archive Goal",
|
|
157
|
+
"delete": "Delete Goal",
|
|
158
|
+
"edit": "Edit Goal"
|
|
159
|
+
},
|
|
160
|
+
"alerts": {
|
|
161
|
+
"complete": {
|
|
162
|
+
"title": "Complete Goal",
|
|
163
|
+
"message": "Mark \"{title}\" as completed?"
|
|
164
|
+
},
|
|
165
|
+
"archive": {
|
|
166
|
+
"title": "Archive Goal",
|
|
167
|
+
"message": "Archive \"{title}\"?"
|
|
168
|
+
},
|
|
169
|
+
"delete": {
|
|
170
|
+
"title": "Delete Goal",
|
|
171
|
+
"message": "Are you sure you want to delete \"{title}\"? This action cannot be undone."
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"milestones": {
|
|
176
|
+
"title": "Milestones",
|
|
177
|
+
"add": "Add Milestone",
|
|
178
|
+
"addNew": "Add New Milestone",
|
|
179
|
+
"empty": "No milestones yet. Add your first milestone!",
|
|
180
|
+
"completed": "Completed",
|
|
181
|
+
"pending": "Pending",
|
|
182
|
+
"remaining": "Remaining",
|
|
183
|
+
"complete": "Complete",
|
|
184
|
+
"selectGoal": "Select a goal to view milestones",
|
|
185
|
+
"goalNotFound": "Goal not found",
|
|
186
|
+
"noActiveGoals": "No active goals. Create a goal first to add milestones.",
|
|
187
|
+
"changeGoal": "Change Goal",
|
|
188
|
+
"newMilestone": "New Milestone",
|
|
189
|
+
"milestonesCompleted": "{completed} of {total} milestones completed",
|
|
190
|
+
"markComplete": "Mark Complete",
|
|
191
|
+
"markIncomplete": "Mark Incomplete",
|
|
192
|
+
"completedDate": "Completed: {date}",
|
|
193
|
+
"fields": {
|
|
194
|
+
"title": {
|
|
195
|
+
"label": "Milestone Title",
|
|
196
|
+
"placeholder": "Enter milestone title"
|
|
197
|
+
},
|
|
198
|
+
"description": {
|
|
199
|
+
"label": "Description (Optional)",
|
|
200
|
+
"placeholder": "Add details about this milestone"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"actions": {
|
|
204
|
+
"add": "Add Milestone",
|
|
205
|
+
"cancel": "Cancel",
|
|
206
|
+
"delete": "Delete",
|
|
207
|
+
"edit": "Edit"
|
|
208
|
+
},
|
|
209
|
+
"alerts": {
|
|
210
|
+
"error": "Error",
|
|
211
|
+
"noGoalSelected": "No goal selected",
|
|
212
|
+
"validationError": "Validation Error",
|
|
213
|
+
"titleRequired": "Please enter a milestone title",
|
|
214
|
+
"delete": {
|
|
215
|
+
"title": "Delete Milestone",
|
|
216
|
+
"message": "Are you sure you want to delete this milestone?"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"progress": {
|
|
221
|
+
"title": "Update Progress",
|
|
222
|
+
"goalNotFound": "Goal not found",
|
|
223
|
+
"selectGoal": "Please select a goal to update progress",
|
|
224
|
+
"currentProgress": "Current Progress",
|
|
225
|
+
"updateProgress": "Update Progress",
|
|
226
|
+
"currentValue": "Current Value",
|
|
227
|
+
"currentValuePlaceholder": "Enter current {{unit}}",
|
|
228
|
+
"targetValue": "Target Value",
|
|
229
|
+
"target": "Target: {value} {unit}",
|
|
230
|
+
"newProgress": "New Progress",
|
|
231
|
+
"note": "Note (Optional)",
|
|
232
|
+
"notePlaceholder": "Add a note about this progress update",
|
|
233
|
+
"saveProgress": "Save Progress",
|
|
234
|
+
"progressHistory": "Progress History",
|
|
235
|
+
"statistics": "Statistics",
|
|
236
|
+
"progressThisMonth": "Progress This Month",
|
|
237
|
+
"updatesThisMonth": "Updates This Month",
|
|
238
|
+
"averagePerWeek": "Average per Week",
|
|
239
|
+
"daysSinceStart": "Days Since Start",
|
|
240
|
+
"percentage": "Progress Percentage",
|
|
241
|
+
"save": "Update Progress",
|
|
242
|
+
"cancel": "Cancel",
|
|
243
|
+
"milestoneNote": "This goal uses milestones for progress tracking. Update milestones to change progress.",
|
|
244
|
+
"useMilestones": "This goal uses milestones for progress tracking. Go to Milestones tab to update progress.",
|
|
245
|
+
"noTargetValue": "This goal doesn't have a target value. Add milestones to track progress.",
|
|
246
|
+
"alerts": {
|
|
247
|
+
"error": "Error",
|
|
248
|
+
"noGoalSelected": "No goal selected",
|
|
249
|
+
"validationError": "Validation Error",
|
|
250
|
+
"invalidNumber": "Please enter a valid number"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"statistics": {
|
|
254
|
+
"title": "Statistics",
|
|
255
|
+
"overview": "Overview",
|
|
256
|
+
"total": "Total Goals",
|
|
257
|
+
"active": "Active",
|
|
258
|
+
"completed": "Completed",
|
|
259
|
+
"archived": "Archived",
|
|
260
|
+
"averageProgress": "Average Progress",
|
|
261
|
+
"onTrack": "On Track",
|
|
262
|
+
"overdue": "Overdue",
|
|
263
|
+
"milestones": {
|
|
264
|
+
"title": "Milestones",
|
|
265
|
+
"total": "Total",
|
|
266
|
+
"completed": "Completed"
|
|
267
|
+
},
|
|
268
|
+
"categories": {
|
|
269
|
+
"title": "Goals by Category",
|
|
270
|
+
"empty": "No goals yet"
|
|
271
|
+
},
|
|
272
|
+
"timeline": {
|
|
273
|
+
"title": "Progress Timeline",
|
|
274
|
+
"thisWeek": "This Week",
|
|
275
|
+
"thisMonth": "This Month",
|
|
276
|
+
"thisYear": "This Year"
|
|
277
|
+
},
|
|
278
|
+
"started": "Started",
|
|
279
|
+
"insights": {
|
|
280
|
+
"insight1": "You've completed {{count}} goals so far. Keep up the great work!",
|
|
281
|
+
"insight2": "Your completion rate is {{rate}}%. Set smaller milestones for better progress tracking.",
|
|
282
|
+
"insight3": "Average progress across all goals is {{progress}}%. Update your progress regularly!"
|
|
283
|
+
},
|
|
284
|
+
"categoryStats": "{{completed}} completed, {{active}} active"
|
|
285
|
+
},
|
|
286
|
+
"status": {
|
|
287
|
+
"active": "Active",
|
|
288
|
+
"completed": "Completed",
|
|
289
|
+
"archived": "Archived"
|
|
290
|
+
},
|
|
291
|
+
"empty": {
|
|
292
|
+
"title": "No Goals Yet",
|
|
293
|
+
"description": "Start your journey by creating your first goal!",
|
|
294
|
+
"action": "Create Your First Goal"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|