feat(i18n): add internationalization with i18next and expo-localization

This commit is contained in:
2026-08-08 10:09:30 +02:00
parent 408a2fa10c
commit 9946e78858
81 changed files with 1820 additions and 125 deletions
+3 -4
View File
@@ -5,9 +5,10 @@ import { PanGestureHandler, State } from "react-native-gesture-handler";
type SwipeableRowProps = {
children: React.ReactNode;
onDelete: () => void;
deleteLabel?: string;
};
export function SwipeableRow({ children, onDelete }: SwipeableRowProps) {
export function SwipeableRow({ children, onDelete, deleteLabel = "Delete" }: SwipeableRowProps) {
const translateX = useRef(new Animated.Value(0)).current;
const lastOffset = useRef(0);
@@ -21,14 +22,12 @@ export function SwipeableRow({ children, onDelete }: SwipeableRowProps) {
const newOffset = lastOffset.current + translationX;
if (newOffset < -80) {
// Swiped left enough — show delete
Animated.spring(translateX, {
toValue: -80,
useNativeDriver: true,
}).start();
lastOffset.current = -80;
} else {
// Snap back
Animated.spring(translateX, {
toValue: 0,
useNativeDriver: true,
@@ -52,7 +51,7 @@ export function SwipeableRow({ children, onDelete }: SwipeableRowProps) {
<View style={styles.container}>
<View style={styles.deleteBackground}>
<Pressable onPress={handleDelete} style={styles.deleteButton}>
<Text style={styles.deleteText}>Delete</Text>
<Text style={styles.deleteText}>{deleteLabel}</Text>
</Pressable>
</View>
<PanGestureHandler