@umituz/react-native-localization 1.16.1 → 1.16.2
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
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* en-US Translation Module
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
*
|
|
9
|
-
* USAGE:
|
|
10
|
-
* 1. Create new translation file: my_domain.json
|
|
11
|
-
* 2. File is auto-discovered and loaded
|
|
12
|
-
* 3. Access via t('my_domain.key')
|
|
4
|
+
* Direct loading for maximum compatibility across platforms
|
|
5
|
+
* - Explicit imports for reliable bundling
|
|
6
|
+
* - Flattened with dot notation
|
|
7
|
+
* - Production-ready and tested
|
|
13
8
|
*/
|
|
14
9
|
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
import alerts from './alerts.json';
|
|
11
|
+
import auth from './auth.json';
|
|
12
|
+
import branding from './branding.json';
|
|
13
|
+
import clipboard from './clipboard.json';
|
|
14
|
+
import datetime from './datetime.json';
|
|
15
|
+
import device from './device.json';
|
|
16
|
+
import editor from './editor.json';
|
|
17
|
+
import errors from './errors.json';
|
|
18
|
+
import general from './general.json';
|
|
19
|
+
import goals from './goals.json';
|
|
20
|
+
import haptics from './haptics.json';
|
|
21
|
+
import home from './home.json';
|
|
22
|
+
import navigation from './navigation.json';
|
|
23
|
+
import onboarding from './onboarding.json';
|
|
24
|
+
import projects from './projects.json';
|
|
25
|
+
import settings from './settings.json';
|
|
26
|
+
import sharing from './sharing.json';
|
|
27
|
+
import templates from './templates.json';
|
|
20
28
|
|
|
21
29
|
/**
|
|
22
30
|
* Flatten nested objects with dot notation
|
|
@@ -40,11 +48,26 @@ const flattenObject = (
|
|
|
40
48
|
return flattened;
|
|
41
49
|
};
|
|
42
50
|
|
|
43
|
-
//
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
// Create flattened translations object
|
|
52
|
+
const translations = {
|
|
53
|
+
...flattenObject(alerts, 'alerts'),
|
|
54
|
+
...flattenObject(auth, 'auth'),
|
|
55
|
+
...flattenObject(branding, 'branding'),
|
|
56
|
+
...flattenObject(clipboard, 'clipboard'),
|
|
57
|
+
...flattenObject(datetime, 'datetime'),
|
|
58
|
+
...flattenObject(device, 'device'),
|
|
59
|
+
...flattenObject(editor, 'editor'),
|
|
60
|
+
...flattenObject(errors, 'errors'),
|
|
61
|
+
...flattenObject(general, 'general'),
|
|
62
|
+
...flattenObject(goals, 'goals'),
|
|
63
|
+
...flattenObject(haptics, 'haptics'),
|
|
64
|
+
...flattenObject(home, 'home'),
|
|
65
|
+
...flattenObject(navigation, 'navigation'),
|
|
66
|
+
...flattenObject(onboarding, 'onboarding'),
|
|
67
|
+
...flattenObject(projects, 'projects'),
|
|
68
|
+
...flattenObject(settings, 'settings'),
|
|
69
|
+
...flattenObject(sharing, 'sharing'),
|
|
70
|
+
...flattenObject(templates, 'templates'),
|
|
71
|
+
};
|
|
49
72
|
|
|
50
73
|
export default translations;
|