@umituz/react-native-localization 3.5.8 → 3.5.9
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-localization",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.9",
|
|
4
4
|
"description": "Generic localization system for React Native apps with i18n support",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@expo/vector-icons": ">=14.0.0",
|
|
44
44
|
"@react-navigation/native": ">=6.0.0",
|
|
45
|
-
"@umituz/react-native-design-system-theme": "*",
|
|
46
45
|
"@umituz/react-native-filesystem": "latest",
|
|
47
46
|
"@umituz/react-native-storage": "latest",
|
|
48
47
|
"expo-localization": ">=15.0.0",
|
|
@@ -67,7 +66,6 @@
|
|
|
67
66
|
"@testing-library/react-native": "^13.3.3",
|
|
68
67
|
"@types/react": "^18.2.45",
|
|
69
68
|
"@types/react-native": "^0.73.0",
|
|
70
|
-
"@umituz/react-native-design-system-theme": "^1.8.0",
|
|
71
69
|
"@umituz/react-native-filesystem": "^1.4.0",
|
|
72
70
|
"@umituz/react-native-storage": "^2.4.0",
|
|
73
71
|
"expo-localization": "~15.0.0",
|
|
@@ -93,4 +91,4 @@
|
|
|
93
91
|
"README.md",
|
|
94
92
|
"LICENSE"
|
|
95
93
|
]
|
|
96
|
-
}
|
|
94
|
+
}
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
type TextStyle,
|
|
17
17
|
} from 'react-native';
|
|
18
18
|
// @ts-ignore - Optional peer dependency
|
|
19
|
-
import { useAppDesignTokens } from '@umituz/react-native-design-system
|
|
19
|
+
import { useAppDesignTokens } from '@umituz/react-native-design-system';
|
|
20
20
|
import type { Language } from '../../infrastructure/storage/types/LocalizationState';
|
|
21
21
|
|
|
22
22
|
interface LanguageItemProps {
|
|
@@ -5,7 +5,7 @@ import { Feather } from '@expo/vector-icons';
|
|
|
5
5
|
// @ts-ignore - Optional peer dependency
|
|
6
6
|
import { useNavigation } from '@react-navigation/native';
|
|
7
7
|
// @ts-ignore - Optional peer dependency
|
|
8
|
-
import { useAppDesignTokens } from '@umituz/react-native-design-system
|
|
8
|
+
import { useAppDesignTokens } from '@umituz/react-native-design-system';
|
|
9
9
|
import { useLocalization } from '../../infrastructure/hooks/useLocalization';
|
|
10
10
|
import { getLanguageByCode } from '../../infrastructure/config/languages';
|
|
11
11
|
|
|
@@ -20,11 +20,13 @@ export interface LanguageSectionConfig {
|
|
|
20
20
|
export interface LanguageSectionProps {
|
|
21
21
|
config?: LanguageSectionConfig;
|
|
22
22
|
containerStyle?: ViewStyle;
|
|
23
|
+
sectionTitle?: string;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export const LanguageSection: React.FC<LanguageSectionProps> = ({
|
|
26
27
|
config,
|
|
27
28
|
containerStyle,
|
|
29
|
+
sectionTitle,
|
|
28
30
|
}) => {
|
|
29
31
|
const navigation = useNavigation();
|
|
30
32
|
const tokens = useAppDesignTokens();
|
|
@@ -33,6 +35,7 @@ export const LanguageSection: React.FC<LanguageSectionProps> = ({
|
|
|
33
35
|
|
|
34
36
|
const route = config?.route || 'LanguageSelection';
|
|
35
37
|
const title = config?.title || t('settings.languageSelection.title') || 'Language';
|
|
38
|
+
const displaySectionTitle = sectionTitle || title;
|
|
36
39
|
const description = config?.description || '';
|
|
37
40
|
|
|
38
41
|
const currentLang = getLanguageByCode(currentLanguage);
|
|
@@ -47,7 +50,7 @@ export const LanguageSection: React.FC<LanguageSectionProps> = ({
|
|
|
47
50
|
|
|
48
51
|
return (
|
|
49
52
|
<View style={[styles.sectionContainer, { backgroundColor: colors.surface }, containerStyle]}>
|
|
50
|
-
<Text style={[styles.sectionTitle, { color: colors.textPrimary }]}>{
|
|
53
|
+
<Text style={[styles.sectionTitle, { color: colors.textPrimary }]}>{displaySectionTitle}</Text>
|
|
51
54
|
|
|
52
55
|
<Pressable
|
|
53
56
|
style={({ pressed }) => [
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
type TextStyle,
|
|
18
18
|
} from 'react-native';
|
|
19
19
|
// @ts-ignore - Optional peer dependency
|
|
20
|
-
import { useAppDesignTokens } from '@umituz/react-native-design-system
|
|
20
|
+
import { useAppDesignTokens } from '@umituz/react-native-design-system';
|
|
21
21
|
|
|
22
22
|
interface SearchInputProps {
|
|
23
23
|
value: string;
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from 'react-native';
|
|
15
15
|
// @ts-ignore - Optional peer dependency
|
|
16
16
|
import { useNavigation } from '@react-navigation/native';
|
|
17
|
-
import { useAppDesignTokens } from '@umituz/react-native-design-system
|
|
17
|
+
import { useAppDesignTokens } from '@umituz/react-native-design-system';
|
|
18
18
|
import { useLocalization, searchLanguages, Language } from '../../index';
|
|
19
19
|
import { LanguageItem } from '../components/LanguageItem';
|
|
20
20
|
import { SearchInput } from '../components/SearchInput';
|