react-native-boxes 1.4.78 → 1.4.79
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/README.md +28 -0
- package/package.json +1 -1
- package/src/Styles.tsx +9 -7
package/README.md
CHANGED
|
@@ -487,6 +487,9 @@ Install your favorite js library.
|
|
|
487
487
|
en: {
|
|
488
488
|
watchlist: {
|
|
489
489
|
hello: 'Hello!'
|
|
490
|
+
},
|
|
491
|
+
home:{
|
|
492
|
+
title:'Hello %{name} !'
|
|
490
493
|
}
|
|
491
494
|
},
|
|
492
495
|
hi: {
|
|
@@ -505,6 +508,7 @@ Install your favorite js library.
|
|
|
505
508
|
}
|
|
506
509
|
}
|
|
507
510
|
});
|
|
511
|
+
I18nProvider.locale = 'hi'
|
|
508
512
|
I18nProvider.missingBehavior = "guess";
|
|
509
513
|
|
|
510
514
|
|
|
@@ -546,6 +550,30 @@ Install your favorite js library.
|
|
|
546
550
|
}
|
|
547
551
|
</details>
|
|
548
552
|
|
|
553
|
+
For Skipping localization, you can add create custom middleware like below and wrap your string with `{{YOUR STRING}}`, this will directly output your string.
|
|
554
|
+
```
|
|
555
|
+
let tOriginal = I18nProvider.t.bind(I18nProvider)
|
|
556
|
+
I18nProvider.t = (scope, options) => {
|
|
557
|
+
if (scope == undefined)
|
|
558
|
+
return ''
|
|
559
|
+
if (typeof scope == 'string') {
|
|
560
|
+
if (scope.startsWith("{{") && scope.endsWith("}}")) {
|
|
561
|
+
return scope.replace("{{", "").replace("}}", "")
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
return tOriginal(scope, options)
|
|
565
|
+
}
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
```
|
|
569
|
+
<TextView text={`{{This String will not be localized. Nope}}`} />
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
For using placeholders in your locales,
|
|
573
|
+
|
|
574
|
+
```
|
|
575
|
+
<TextView text={`{{ ${theme.i18n.t('home.title',{ name: 'Shivesh Navin' })} }}` />
|
|
576
|
+
```
|
|
549
577
|
|
|
550
578
|
|
|
551
579
|
### Analytics
|
package/package.json
CHANGED
package/src/Styles.tsx
CHANGED
|
@@ -46,9 +46,10 @@ export const Colors = {
|
|
|
46
46
|
critical: '#F44336',
|
|
47
47
|
invert: {
|
|
48
48
|
text: '#fff',
|
|
49
|
-
caption: '#
|
|
50
|
-
heading: '#
|
|
51
|
-
background: '#
|
|
49
|
+
caption: '#565656',
|
|
50
|
+
heading: '#dddddd',
|
|
51
|
+
background: '#212121',
|
|
52
|
+
forground: '#191919',
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -70,10 +71,11 @@ export const DarkColors = {
|
|
|
70
71
|
warning: '#FFA726',
|
|
71
72
|
critical: '#F44336',
|
|
72
73
|
invert: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
background: '#E6E6E6'
|
|
74
|
+
heading: '#222222',
|
|
75
|
+
text: '#444444',
|
|
76
|
+
caption: '#A9A9A9',
|
|
77
|
+
background: '#E6E6E6',
|
|
78
|
+
forground: '#fff',
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
81
|
|