Implemented Language Selector # 35 #49
@ -1,11 +1,15 @@
|
|||||||
|
import i18n from "@/i18n/i18n";
|
||||||
import AppContext, { IAppContext } from "@/util/context";
|
import AppContext, { IAppContext } from "@/util/context";
|
||||||
import { MaterialIcons } from "@expo/vector-icons";
|
import { MaterialIcons } from "@expo/vector-icons";
|
||||||
import { Stack } from "expo-router";
|
import { Stack } from "expo-router";
|
||||||
import React, { useMemo, useState } from "react";
|
import React, { useMemo, useState } from "react";
|
||||||
|
import { I18nextProvider, useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const RootLayout: React.FC = () => {
|
const RootLayout: React.FC = () => {
|
||||||
const [showSettings, setShowSettings] = useState<boolean>(false);
|
const [showSettings, setShowSettings] = useState<boolean>(false);
|
||||||
|
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const ctx = useMemo<IAppContext>(
|
const ctx = useMemo<IAppContext>(
|
||||||
() => ({
|
() => ({
|
||||||
showSettings,
|
showSettings,
|
||||||
@ -15,10 +19,11 @@ const RootLayout: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<AppContext.Provider value={ctx}>
|
<AppContext.Provider value={ctx}>
|
||||||
|
<I18nextProvider i18n={i18n}>
|
||||||
<Stack
|
<Stack
|
||||||
screenOptions={{
|
screenOptions={{
|
||||||
headerShown: true,
|
headerShown: true,
|
||||||
title: "Poker Chips Helper",
|
title: t("poker_chips_helper"),
|
||||||
headerRight: () => (
|
headerRight: () => (
|
||||||
<MaterialIcons
|
<MaterialIcons
|
||||||
name="settings"
|
name="settings"
|
||||||
@ -28,6 +33,7 @@ const RootLayout: React.FC = () => {
|
|||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</I18nextProvider>
|
||||||
</AppContext.Provider>
|
</AppContext.Provider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,8 @@ import {
|
|||||||
import styles from "@/styles/styles";
|
import styles from "@/styles/styles";
|
||||||
import Section from "@/containers/Section";
|
import Section from "@/containers/Section";
|
||||||
import AppContext from "@/util/context";
|
import AppContext from "@/util/context";
|
||||||
|
import { Picker } from "@react-native-picker/picker";
|
||||||
|
import i18n from "@/i18n/i18n";
|
||||||
|
|
||||||
const IndexScreen: React.FC = () => {
|
const IndexScreen: React.FC = () => {
|
||||||
const [playerCount, setPlayerCount] = useState(2);
|
const [playerCount, setPlayerCount] = useState(2);
|
||||||
@ -22,6 +24,7 @@ const IndexScreen: React.FC = () => {
|
|||||||
const [numberOfChips, setNumberOfChips] = useState<number>(5);
|
const [numberOfChips, setNumberOfChips] = useState<number>(5);
|
||||||
const [totalChipsCount, setTotalChipsCount] = useState<number[]>([]);
|
const [totalChipsCount, setTotalChipsCount] = useState<number[]>([]);
|
||||||
const [selectedCurrency, setSelectedCurrency] = useState<string>("$");
|
const [selectedCurrency, setSelectedCurrency] = useState<string>("$");
|
||||||
|
const [selectedLanguage, setSelectedLanguage] = useState<string>("en");
|
||||||
const context = useContext(AppContext);
|
const context = useContext(AppContext);
|
||||||
const isSettingsVisible = useMemo(() => context.showSettings, [context]);
|
const isSettingsVisible = useMemo(() => context.showSettings, [context]);
|
||||||
|
|
||||||
@ -49,7 +52,7 @@ const IndexScreen: React.FC = () => {
|
|||||||
|
|
||||||
const handleSave = async (slot: "SLOT1" | "SLOT2") => {
|
const handleSave = async (slot: "SLOT1" | "SLOT2") => {
|
||||||
if (buyInAmount === null) {
|
if (buyInAmount === null) {
|
||||||
Alert.alert("Error", "Please select a valid buy-in amount");
|
Alert.alert(i18n.t("error"), i18n.t("please_select_valid_buyin"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const state = {
|
const state = {
|
||||||
@ -63,10 +66,10 @@ const IndexScreen: React.FC = () => {
|
|||||||
await saveState(slot, state);
|
await saveState(slot, state);
|
||||||
await savePersistentState(state);
|
await savePersistentState(state);
|
||||||
console.log(`Game state saved to ${slot}:`, state);
|
console.log(`Game state saved to ${slot}:`, state);
|
||||||
Alert.alert("Success", `State saved to ${slot}`);
|
Alert.alert(i18n.t("success"), i18n.t("state_saved", { slot })); // Fixed interpolation
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error saving state:", error);
|
console.error("Error saving state:", error);
|
||||||
Alert.alert("Error", "Failed to save state.");
|
Alert.alert(i18n.t("error"), i18n.t("failed_to_save_state"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -81,23 +84,49 @@ const IndexScreen: React.FC = () => {
|
|||||||
setSelectedCurrency(loadedState.selectedCurrency || "$");
|
setSelectedCurrency(loadedState.selectedCurrency || "$");
|
||||||
await savePersistentState(loadedState);
|
await savePersistentState(loadedState);
|
||||||
console.log(`Game state loaded from ${slot}:`, loadedState);
|
console.log(`Game state loaded from ${slot}:`, loadedState);
|
||||||
Alert.alert("Success", `State loaded from ${slot}`);
|
Alert.alert(i18n.t("success"), i18n.t("state_loaded_from", { slot })); // Fixed interpolation
|
||||||
} else {
|
} else {
|
||||||
Alert.alert("Info", "No saved state found.");
|
Alert.alert(i18n.t("info"), i18n.t("no_saved_state_found"));
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error loading state:", error);
|
console.error("Error loading state:", error);
|
||||||
Alert.alert("Error", "Failed to load state.");
|
Alert.alert(i18n.t("error"), i18n.t("failed_to_load_state"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleLanguageChange = (language: string) => {
|
||||||
|
setSelectedLanguage(language);
|
||||||
|
i18n.changeLanguage(language);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView
|
<ScrollView
|
||||||
style={styles.scrollView}
|
style={styles.scrollView}
|
||||||
contentContainerStyle={styles.scrollViewContent}
|
contentContainerStyle={styles.scrollViewContent}
|
||||||
>
|
>
|
||||||
{isSettingsVisible && (
|
{isSettingsVisible && (
|
||||||
<Section title={"Select Currency"} iconName={"attach-money"}>
|
<Section
|
||||||
|
title={i18n.t("select_language")}
|
||||||
|
iconName={"language"}
|
||||||
|
orientation="row"
|
||||||
|
>
|
||||||
|
<Picker
|
||||||
|
selectedValue={selectedLanguage}
|
||||||
|
onValueChange={handleLanguageChange}
|
||||||
|
style={styles.picker}
|
||||||
|
>
|
||||||
|
<Picker.Item label={i18n.t("english")} value="en" />
|
||||||
|
<Picker.Item label={i18n.t("spanish")} value="es" />
|
||||||
|
</Picker>
|
||||||
|
</Section>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{isSettingsVisible && (
|
||||||
|
<Section
|
||||||
|
title={i18n.t("select_currency")}
|
||||||
|
iconName={"attach-money"}
|
||||||
|
orientation="row"
|
||||||
|
>
|
||||||
<CurrencySelector
|
<CurrencySelector
|
||||||
selectedCurrency={selectedCurrency}
|
selectedCurrency={selectedCurrency}
|
||||||
setSelectedCurrency={setSelectedCurrency}
|
setSelectedCurrency={setSelectedCurrency}
|
||||||
@ -106,7 +135,7 @@ const IndexScreen: React.FC = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<Section
|
<Section
|
||||||
title={"Select the number of players"}
|
title={i18n.t("select_number_of_players")}
|
||||||
iconName={"people"}
|
iconName={"people"}
|
||||||
orientation="row"
|
orientation="row"
|
||||||
>
|
>
|
||||||
@ -116,14 +145,20 @@ const IndexScreen: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section title={"Select buy-in amount"} iconName={"monetization-on"}>
|
<Section
|
||||||
|
title={i18n.t("select_buyin_amount")}
|
||||||
|
iconName={"monetization-on"}
|
||||||
|
>
|
||||||
<BuyInSelector
|
<BuyInSelector
|
||||||
selectedCurrency={selectedCurrency}
|
selectedCurrency={selectedCurrency}
|
||||||
setBuyInAmount={setBuyInAmount}
|
setBuyInAmount={setBuyInAmount}
|
||||||
/>
|
/>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section title={"Automatic Chip Detection"} iconName={"camera-alt"}>
|
<Section
|
||||||
|
title={i18n.t("automatic_chip_detection")}
|
||||||
|
iconName={"camera-alt"}
|
||||||
|
>
|
||||||
<ChipDetection
|
<ChipDetection
|
||||||
updateChipCount={(chipData) => {
|
updateChipCount={(chipData) => {
|
||||||
const chipCountArray = Object.values(chipData);
|
const chipCountArray = Object.values(chipData);
|
||||||
@ -132,7 +167,10 @@ const IndexScreen: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section title={"Manual Chip Adjustment"} iconName={"account-balance"}>
|
<Section
|
||||||
|
title={i18n.t("manual_chip_adjustment")}
|
||||||
|
iconName={"account-balance"}
|
||||||
|
>
|
||||||
<ChipsSelector
|
<ChipsSelector
|
||||||
totalChipsCount={totalChipsCount}
|
totalChipsCount={totalChipsCount}
|
||||||
setTotalChipsCount={setTotalChipsCount}
|
setTotalChipsCount={setTotalChipsCount}
|
||||||
@ -142,7 +180,7 @@ const IndexScreen: React.FC = () => {
|
|||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section
|
<Section
|
||||||
title={"Distribution & Denomination"}
|
title={i18n.t("distribution_and_denomination")}
|
||||||
iconName={"currency-exchange"}
|
iconName={"currency-exchange"}
|
||||||
>
|
>
|
||||||
<ChipDistributionSummary
|
<ChipDistributionSummary
|
||||||
@ -153,20 +191,30 @@ const IndexScreen: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section title={"Save + Load"} iconName={"save"} orientation="row">
|
<Section
|
||||||
|
title={i18n.t("save_and_load")}
|
||||||
|
iconName={"save"}
|
||||||
|
orientation="row"
|
||||||
|
>
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
title={"Save\nSlot 1"}
|
title={i18n.t("save_slot_1")}
|
||||||
onPress={() => handleSave("SLOT1")}
|
onPress={() => handleSave("SLOT1")}
|
||||||
disabled={buyInAmount === null}
|
disabled={buyInAmount === null}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
title={"Save\nSlot 2"}
|
title={i18n.t("save_slot_2")}
|
||||||
onPress={() => handleSave("SLOT2")}
|
onPress={() => handleSave("SLOT2")}
|
||||||
disabled={buyInAmount === null}
|
disabled={buyInAmount === null}
|
||||||
/>
|
/>
|
||||||
<Button title={"Load\nSlot 1"} onPress={() => handleLoad("SLOT1")} />
|
<Button
|
||||||
<Button title={"Load\nSlot 2"} onPress={() => handleLoad("SLOT2")} />
|
title={i18n.t("load_slot_1")}
|
||||||
|
onPress={() => handleLoad("SLOT1")}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
title={i18n.t("load_slot_2")}
|
||||||
|
onPress={() => handleLoad("SLOT2")}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
</Section>
|
</Section>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@ -2,10 +2,11 @@ import React, { useState } from "react";
|
|||||||
import { View, Text, TextInput } from "react-native";
|
import { View, Text, TextInput } from "react-native";
|
||||||
import styles, { COLORS } from "@/styles/styles";
|
import styles, { COLORS } from "@/styles/styles";
|
||||||
import Button from "@/containers/Button";
|
import Button from "@/containers/Button";
|
||||||
|
import i18n from "@/i18n/i18n";
|
||||||
|
|
||||||
interface BuyInSelectorProps {
|
interface BuyInSelectorProps {
|
||||||
setBuyInAmount: React.Dispatch<React.SetStateAction<number>>;
|
setBuyInAmount: React.Dispatch<React.SetStateAction<number>>;
|
||||||
selectedCurrency: string; // Accept selectedCurrency as a prop
|
selectedCurrency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultBuyInOptions = [10, 25, 50];
|
const defaultBuyInOptions = [10, 25, 50];
|
||||||
@ -45,22 +46,25 @@ const BuyInSelector: React.FC<BuyInSelectorProps> = ({
|
|||||||
color={buyInAmount === amount ? COLORS.PRIMARY : COLORS.SECONDARY}
|
color={buyInAmount === amount ? COLORS.PRIMARY : COLORS.SECONDARY}
|
||||||
onPress={() => handleBuyInSelection(amount)}
|
onPress={() => handleBuyInSelection(amount)}
|
||||||
title={`${selectedCurrency} ${amount}`}
|
title={`${selectedCurrency} ${amount}`}
|
||||||
></Button>
|
/>
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Text style={styles.p}>Or enter a custom amount:</Text>
|
<Text style={styles.p}>{i18n.t("custom_buy_in")}</Text>
|
||||||
|
|
||||||
<TextInput
|
<TextInput
|
||||||
style={styles.input}
|
style={styles.input}
|
||||||
value={customAmount}
|
value={customAmount}
|
||||||
onChangeText={handleCustomAmountChange}
|
onChangeText={handleCustomAmountChange}
|
||||||
placeholder="Enter custom buy-in"
|
placeholder={i18n.t("enter_custom_buy_in")}
|
||||||
keyboardType="numeric"
|
keyboardType="numeric"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Text style={styles.h2}>
|
<Text style={styles.h2}>
|
||||||
Selected Buy-in:{" "}
|
{`${i18n.t("selected_buy_in")}: `}
|
||||||
{buyInAmount !== null ? `${selectedCurrency} ${buyInAmount}` : "None"}
|
{buyInAmount !== null
|
||||||
|
? `${selectedCurrency} ${buyInAmount}`
|
||||||
|
: i18n.t("none")}
|
||||||
</Text>
|
</Text>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Image, ActivityIndicator, Text, View } from "react-native";
|
import { Image, ActivityIndicator, Text, View } from "react-native";
|
||||||
import Button from "@/containers/Button";
|
import Button from "@/containers/Button";
|
||||||
|
|
||||||
import * as ImagePicker from "expo-image-picker";
|
import * as ImagePicker from "expo-image-picker";
|
||||||
|
import i18n from "@/i18n/i18n";
|
||||||
|
|
||||||
const ChipDetection = ({
|
const ChipDetection = ({
|
||||||
updateChipCount,
|
updateChipCount,
|
||||||
}: {
|
}: {
|
||||||
updateChipCount: () => void;
|
updateChipCount: (chipData: Record<string, number>) => void;
|
||||||
}) => {
|
}) => {
|
||||||
const [imageUri, setImageUri] = useState(null);
|
const [imageUri, setImageUri] = useState<string | null>(null);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
const [lastDetectedChips, setLastDetectedChips] = useState({});
|
const [lastDetectedChips, setLastDetectedChips] = useState<
|
||||||
|
Record<string, number>
|
||||||
|
>({});
|
||||||
|
|
||||||
const requestCameraPermissions = async () => {
|
const requestCameraPermissions = async () => {
|
||||||
const cameraPermission = await ImagePicker.requestCameraPermissionsAsync();
|
const cameraPermission = await ImagePicker.requestCameraPermissionsAsync();
|
||||||
@ -26,16 +28,16 @@ const ChipDetection = ({
|
|||||||
quality: 1,
|
quality: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result.canceled) {
|
if (!result.canceled && result.assets && result.assets.length > 0) {
|
||||||
setImageUri(result.assets[0].uri);
|
setImageUri(result.assets[0].uri);
|
||||||
await processImage(result.assets[0].base64);
|
await processImage(result.assets[0].base64 as string);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const takePhoto = async () => {
|
const takePhoto = async () => {
|
||||||
const hasPermission = await requestCameraPermissions();
|
const hasPermission = await requestCameraPermissions();
|
||||||
if (!hasPermission) {
|
if (!hasPermission) {
|
||||||
setError("Camera permission is required to take a photo.");
|
setError(i18n.t("camera_permission_required"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,25 +46,25 @@ const ChipDetection = ({
|
|||||||
quality: 1,
|
quality: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result.canceled) {
|
if (!result.canceled && result.assets && result.assets.length > 0) {
|
||||||
setImageUri(result.assets[0].uri);
|
setImageUri(result.assets[0].uri);
|
||||||
await processImage(result.assets[0].base64);
|
await processImage(result.assets[0].base64 as string);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const processImage = async (base64Image) => {
|
const processImage = async (base64Image: string) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setError(null);
|
setError(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(process.env.EXPO_PUBLIC_API_URL, {
|
const response = await fetch(process.env.EXPO_PUBLIC_API_URL as string, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${process.env.EXPO_PUBLIC_API_KEY}`, // Use environment variable for API key
|
Authorization: `Bearer ${process.env.EXPO_PUBLIC_API_KEY}`,
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
model: process.env.EXPO_PUBLIC_MODEL_NAME, // Use environment variable for model name
|
model: process.env.EXPO_PUBLIC_MODEL_NAME,
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
role: "system",
|
role: "system",
|
||||||
@ -90,13 +92,12 @@ const ChipDetection = ({
|
|||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
|
|
||||||
if (!response.ok || !result.choices || !result.choices[0].message) {
|
if (!response.ok || !result.choices || !result.choices[0].message) {
|
||||||
throw new Error("Invalid response from API.");
|
throw new Error(i18n.t("invalid_response")); // Translate invalid response error
|
||||||
}
|
}
|
||||||
|
|
||||||
const rawContent = result.choices[0].message.content.trim();
|
const rawContent = result.choices[0].message.content.trim();
|
||||||
const cleanJSON = rawContent.replace(/```json|```/g, "").trim();
|
const cleanJSON = rawContent.replace(/```json|```/g, "").trim();
|
||||||
|
const parsedData: Record<string, number> = JSON.parse(cleanJSON);
|
||||||
const parsedData = JSON.parse(cleanJSON);
|
|
||||||
|
|
||||||
const filteredData = Object.fromEntries(
|
const filteredData = Object.fromEntries(
|
||||||
Object.entries(parsedData).filter(([_, count]) => count > 0)
|
Object.entries(parsedData).filter(([_, count]) => count > 0)
|
||||||
@ -105,27 +106,36 @@ const ChipDetection = ({
|
|||||||
setLastDetectedChips(filteredData);
|
setLastDetectedChips(filteredData);
|
||||||
updateChipCount(filteredData);
|
updateChipCount(filteredData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setError("Failed to analyze the image.");
|
setError(i18n.t("failed_to_analyze_image"));
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<View>
|
||||||
<View style={{ flexDirection: "row", justifyContent: "space-evenly" }}>
|
<View
|
||||||
<Button title="Pick an Image" onPress={pickImage} />
|
style={{
|
||||||
<Button title="Take a Photo" onPress={takePhoto} />
|
flexDirection: "row",
|
||||||
|
justifyContent: "space-evenly",
|
||||||
|
marginBottom: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Button title={i18n.t("pick_an_image")} onPress={pickImage} />
|
||||||
|
<Button title={i18n.t("take_a_photo")} onPress={takePhoto} />
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{imageUri && (
|
{imageUri && (
|
||||||
<Image
|
<Image
|
||||||
source={{ uri: imageUri }}
|
source={{ uri: imageUri }}
|
||||||
style={{ width: 300, height: 300, marginTop: 10 }}
|
style={{ width: 300, height: 300, marginTop: 10 }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{loading && <ActivityIndicator size="large" color="blue" />}
|
{loading && <ActivityIndicator size="large" color="blue" />}
|
||||||
|
|
||||||
{error && <Text style={{ color: "red", marginTop: 10 }}>{error}</Text>}
|
{error && <Text style={{ color: "red", marginTop: 10 }}>{error}</Text>}
|
||||||
</>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
import { View, Text, StyleSheet } from "react-native";
|
import { View, Text, StyleSheet } from "react-native";
|
||||||
import { ColorValue } from "react-native";
|
import { ColorValue } from "react-native";
|
||||||
|
import i18n from "@/i18n/i18n";
|
||||||
import styles from "@/styles/styles";
|
import styles from "@/styles/styles";
|
||||||
|
|
||||||
interface ChipDistributionSummaryProps {
|
interface ChipDistributionSummaryProps {
|
||||||
@ -8,7 +9,7 @@ interface ChipDistributionSummaryProps {
|
|||||||
buyInAmount: number;
|
buyInAmount: number;
|
||||||
totalChipsCount: number[];
|
totalChipsCount: number[];
|
||||||
colors?: ColorValue[];
|
colors?: ColorValue[];
|
||||||
selectedCurrency: string; // Add the selectedCurrency as a prop here
|
selectedCurrency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ChipDistributionSummary = ({
|
const ChipDistributionSummary = ({
|
||||||
@ -165,17 +166,17 @@ const ChipDistributionSummary = ({
|
|||||||
...(colors[index] === "white" && styles.shadow),
|
...(colors[index] === "white" && styles.shadow),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{`${distributions[index]} chips: ${selectedCurrency}${denominations[index]} each`}
|
{`${distributions[index]} ${i18n.t("chips")}: ${selectedCurrency}${denominations[index]} ${i18n.t("each")}`}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flexDirection: "row", justifyContent: "space-between" }}>
|
<View style={{ flexDirection: "row", justifyContent: "space-between" }}>
|
||||||
<Text style={styles.p}>
|
<Text style={styles.p}>
|
||||||
Total Value: {selectedCurrency} {totalValue}
|
{i18n.t("total_value")}: {selectedCurrency} {totalValue}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.p}>
|
<Text style={styles.p}>
|
||||||
{selectedCurrency} {potValue} Pot
|
{selectedCurrency} {potValue} {i18n.t("pot")}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
|
@ -11,6 +11,7 @@ import {
|
|||||||
import Button from "@/containers/Button";
|
import Button from "@/containers/Button";
|
||||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||||
import styles from "@/styles/styles";
|
import styles from "@/styles/styles";
|
||||||
|
import i18n from "@/i18n/i18n";
|
||||||
|
|
||||||
const colors: ColorValue[] = ["white", "red", "green", "blue", "black"];
|
const colors: ColorValue[] = ["white", "red", "green", "blue", "black"];
|
||||||
|
|
||||||
@ -48,7 +49,9 @@ const ChipInputModal = ({
|
|||||||
{value !== undefined && (
|
{value !== undefined && (
|
||||||
<>
|
<>
|
||||||
<Text style={styles.h2}>
|
<Text style={styles.h2}>
|
||||||
Number of {showModal[1]?.toString()} chips
|
{i18n.t("number_of_chips", {
|
||||||
|
color: showModal[1]?.toString(),
|
||||||
|
})}{" "}
|
||||||
</Text>
|
</Text>
|
||||||
<TextInput
|
<TextInput
|
||||||
style={{
|
style={{
|
||||||
@ -67,7 +70,7 @@ const ChipInputModal = ({
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Button
|
<Button
|
||||||
title="Accept"
|
title={i18n.t("accept")}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
update(showModal[1], Number.isNaN(value) ? 0 : value);
|
update(showModal[1], Number.isNaN(value) ? 0 : value);
|
||||||
setShowModal([false, color]);
|
setShowModal([false, color]);
|
||||||
@ -128,7 +131,7 @@ const ChipsSelector = ({
|
|||||||
[numberOfChips]
|
[numberOfChips]
|
||||||
);
|
);
|
||||||
|
|
||||||
// Callback for ChipInputModal to update the chips in the parents state.
|
// Callback for ChipInputModal to update the chips in the parent's state.
|
||||||
const update = useCallback(
|
const update = useCallback(
|
||||||
(color: ColorValue, count: number) => {
|
(color: ColorValue, count: number) => {
|
||||||
const newTotalChipsCount = totalChipsCount.slice();
|
const newTotalChipsCount = totalChipsCount.slice();
|
||||||
@ -227,4 +230,5 @@ const styles1 = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
button: {},
|
button: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default ChipsSelector;
|
export default ChipsSelector;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Picker } from "@react-native-picker/picker";
|
import { Picker } from "@react-native-picker/picker";
|
||||||
import styles from "@/styles/styles";
|
import styles from "@/styles/styles";
|
||||||
|
import i18n from "@/i18n/i18n";
|
||||||
|
|
||||||
interface CurrencySelectorProps {
|
interface CurrencySelectorProps {
|
||||||
selectedCurrency: string;
|
selectedCurrency: string;
|
||||||
@ -19,10 +20,10 @@ const CurrencySelector: React.FC<CurrencySelectorProps> = ({
|
|||||||
style={styles.picker}
|
style={styles.picker}
|
||||||
testID="currency-picker" // ✅ Add testID here
|
testID="currency-picker" // ✅ Add testID here
|
||||||
>
|
>
|
||||||
<Picker.Item label="USD ($)" value="$" />
|
<Picker.Item label={i18n.t("USD")} value="$" />
|
||||||
<Picker.Item label="Euro (€)" value="€" />
|
<Picker.Item label={i18n.t("Euro")} value="€" />
|
||||||
<Picker.Item label="Pound (£)" value="£" />
|
<Picker.Item label={i18n.t("Pound")} value="£" />
|
||||||
<Picker.Item label="INR (₹)" value="₹" />
|
<Picker.Item label={i18n.t("INR")} value="₹" />
|
||||||
</Picker>
|
</Picker>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -13,6 +13,7 @@ describe("BuyInSelector Component", () => {
|
|||||||
let setBuyInAmount;
|
let setBuyInAmount;
|
||||||
let getByText;
|
let getByText;
|
||||||
let getByPlaceholderText;
|
let getByPlaceholderText;
|
||||||
|
let queryByText;
|
||||||
|
|
||||||
// Render the component with the necessary props
|
// Render the component with the necessary props
|
||||||
const renderComponent = (selectedCurrency = "$") => {
|
const renderComponent = (selectedCurrency = "$") => {
|
||||||
@ -24,11 +25,12 @@ describe("BuyInSelector Component", () => {
|
|||||||
);
|
);
|
||||||
getByText = result.getByText;
|
getByText = result.getByText;
|
||||||
getByPlaceholderText = result.getByPlaceholderText;
|
getByPlaceholderText = result.getByPlaceholderText;
|
||||||
|
queryByText = result.queryByText;
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
setBuyInAmount = jest.fn();
|
setBuyInAmount = jest.fn();
|
||||||
renderComponent(); // Render with default currency
|
renderComponent();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("renders the buy-in options and input correctly", () => {
|
it("renders the buy-in options and input correctly", () => {
|
||||||
@ -36,7 +38,9 @@ describe("BuyInSelector Component", () => {
|
|||||||
expect(getByText("$ 25")).toBeTruthy();
|
expect(getByText("$ 25")).toBeTruthy();
|
||||||
expect(getByText("$ 50")).toBeTruthy();
|
expect(getByText("$ 50")).toBeTruthy();
|
||||||
expect(getByPlaceholderText("Enter custom buy-in")).toBeTruthy();
|
expect(getByPlaceholderText("Enter custom buy-in")).toBeTruthy();
|
||||||
expect(getByText("Selected Buy-in: None")).toBeTruthy(); // Check default selection
|
|
||||||
|
// Check default selection with a more flexible approach
|
||||||
|
expect(queryByText(/Selected Buy-in.*None/)).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("sets a predefined buy-in amount correctly", () => {
|
it("sets a predefined buy-in amount correctly", () => {
|
||||||
@ -51,9 +55,9 @@ describe("BuyInSelector Component", () => {
|
|||||||
|
|
||||||
it("resets custom amount if invalid input is entered", () => {
|
it("resets custom amount if invalid input is entered", () => {
|
||||||
fireEvent.changeText(getByPlaceholderText("Enter custom buy-in"), "-10");
|
fireEvent.changeText(getByPlaceholderText("Enter custom buy-in"), "-10");
|
||||||
expect(setBuyInAmount).toHaveBeenCalledWith(25); // Assuming 25 is the default
|
expect(setBuyInAmount).toHaveBeenCalledWith(25);
|
||||||
fireEvent.changeText(getByPlaceholderText("Enter custom buy-in"), "abc");
|
fireEvent.changeText(getByPlaceholderText("Enter custom buy-in"), "abc");
|
||||||
expect(setBuyInAmount).toHaveBeenCalledWith(25); // Reset to default
|
expect(setBuyInAmount).toHaveBeenCalledWith(25);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("clears the custom amount when selecting a predefined option", () => {
|
it("clears the custom amount when selecting a predefined option", () => {
|
||||||
@ -74,9 +78,9 @@ describe("BuyInSelector Component", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("triggers state update every time a buy-in option is clicked, even if it's the same", () => {
|
it("triggers state update every time a buy-in option is clicked, even if it's the same", () => {
|
||||||
fireEvent.press(getByText("$ 25")); // First click
|
fireEvent.press(getByText("$ 25"));
|
||||||
fireEvent.press(getByText("$ 25")); // Clicking the same option again
|
fireEvent.press(getByText("$ 25"));
|
||||||
expect(setBuyInAmount).toHaveBeenCalledTimes(2); // Expect it to be called twice
|
expect(setBuyInAmount).toHaveBeenCalledTimes(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("resets to default buy-in when custom input is cleared", () => {
|
it("resets to default buy-in when custom input is cleared", () => {
|
||||||
@ -84,7 +88,7 @@ describe("BuyInSelector Component", () => {
|
|||||||
fireEvent.changeText(input, "75");
|
fireEvent.changeText(input, "75");
|
||||||
expect(setBuyInAmount).toHaveBeenCalledWith(75);
|
expect(setBuyInAmount).toHaveBeenCalledWith(75);
|
||||||
fireEvent.changeText(input, "");
|
fireEvent.changeText(input, "");
|
||||||
expect(setBuyInAmount).toHaveBeenCalledWith(25); // Assuming 25 is the default
|
expect(setBuyInAmount).toHaveBeenCalledWith(25);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("updates state correctly when selecting predefined buy-in after entering a custom amount", () => {
|
it("updates state correctly when selecting predefined buy-in after entering a custom amount", () => {
|
||||||
@ -95,10 +99,12 @@ describe("BuyInSelector Component", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("displays selected currency correctly", () => {
|
it("displays selected currency correctly", () => {
|
||||||
renderComponent("€"); // Test with a different currency
|
renderComponent("€");
|
||||||
expect(getByText("€ 10")).toBeTruthy();
|
expect(getByText("€ 10")).toBeTruthy();
|
||||||
expect(getByText("€ 25")).toBeTruthy();
|
expect(getByText("€ 25")).toBeTruthy();
|
||||||
expect(getByText("€ 50")).toBeTruthy();
|
expect(getByText("€ 50")).toBeTruthy();
|
||||||
expect(getByText("Selected Buy-in: None")).toBeTruthy();
|
|
||||||
|
// Check default selection text with a flexible regex
|
||||||
|
expect(queryByText(/Selected Buy-in.*None/)).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -42,8 +42,9 @@ describe("ChipDetection", () => {
|
|||||||
const { getByText } = render(
|
const { getByText } = render(
|
||||||
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
||||||
);
|
);
|
||||||
expect(getByText("Pick an Image")).toBeTruthy();
|
|
||||||
expect(getByText("Take a Photo")).toBeTruthy();
|
expect(getByText(/pick an image/i)).toBeTruthy();
|
||||||
|
expect(getByText(/take a photo/i)).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("picks an image from the library", async () => {
|
it("picks an image from the library", async () => {
|
||||||
@ -55,7 +56,7 @@ describe("ChipDetection", () => {
|
|||||||
const { getByText } = render(
|
const { getByText } = render(
|
||||||
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
||||||
);
|
);
|
||||||
fireEvent.press(getByText("Pick an Image"));
|
fireEvent.press(getByText(/pick an image/i));
|
||||||
|
|
||||||
await waitFor(() => expect(mockUpdateChipCount).toHaveBeenCalled());
|
await waitFor(() => expect(mockUpdateChipCount).toHaveBeenCalled());
|
||||||
});
|
});
|
||||||
@ -72,7 +73,7 @@ describe("ChipDetection", () => {
|
|||||||
const { getByText } = render(
|
const { getByText } = render(
|
||||||
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
||||||
);
|
);
|
||||||
fireEvent.press(getByText("Take a Photo"));
|
fireEvent.press(getByText(/take a photo/i));
|
||||||
|
|
||||||
await waitFor(() =>
|
await waitFor(() =>
|
||||||
expect(mockUpdateChipCount).toHaveBeenCalledWith({ red: 5, green: 3 })
|
expect(mockUpdateChipCount).toHaveBeenCalledWith({ red: 5, green: 3 })
|
||||||
@ -87,11 +88,11 @@ describe("ChipDetection", () => {
|
|||||||
const { getByText } = render(
|
const { getByText } = render(
|
||||||
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
||||||
);
|
);
|
||||||
fireEvent.press(getByText("Take a Photo"));
|
fireEvent.press(getByText(/take a photo/i));
|
||||||
|
|
||||||
await waitFor(() =>
|
await waitFor(() =>
|
||||||
expect(
|
expect(
|
||||||
getByText("Camera permission is required to take a photo.")
|
getByText(/camera permission is required to take a photo/i)
|
||||||
).toBeTruthy()
|
).toBeTruthy()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -112,10 +113,10 @@ describe("ChipDetection", () => {
|
|||||||
const { getByText } = render(
|
const { getByText } = render(
|
||||||
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
||||||
);
|
);
|
||||||
fireEvent.press(getByText("Pick an Image"));
|
fireEvent.press(getByText(/pick an image/i));
|
||||||
|
|
||||||
await waitFor(() =>
|
await waitFor(() =>
|
||||||
expect(getByText("Failed to analyze the image.")).toBeTruthy()
|
expect(getByText(/failed to analyze the image/i)).toBeTruthy()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -144,7 +145,7 @@ describe("ChipDetection", () => {
|
|||||||
const { getByText } = render(
|
const { getByText } = render(
|
||||||
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
<ChipDetection updateChipCount={mockUpdateChipCount} />
|
||||||
);
|
);
|
||||||
fireEvent.press(getByText("Pick an Image"));
|
fireEvent.press(getByText(/pick an image/i));
|
||||||
|
|
||||||
await waitFor(() =>
|
await waitFor(() =>
|
||||||
expect(mockUpdateChipCount).toHaveBeenCalledWith({
|
expect(mockUpdateChipCount).toHaveBeenCalledWith({
|
||||||
|
@ -6,9 +6,7 @@ describe("ChipDistributionSummary Component", () => {
|
|||||||
test("renders correctly with valid data", () => {
|
test("renders correctly with valid data", () => {
|
||||||
const playerCount = 4;
|
const playerCount = 4;
|
||||||
const totalChipsCount = [100, 80, 60, 40, 20];
|
const totalChipsCount = [100, 80, 60, 40, 20];
|
||||||
const colors = ["WHITE", "RED", "GREEN", "BLUE", "BLACK"];
|
|
||||||
const buyInAmount = 20;
|
const buyInAmount = 20;
|
||||||
|
|
||||||
const expectedDistribution = [2, 2, 1, 2, 2];
|
const expectedDistribution = [2, 2, 1, 2, 2];
|
||||||
const expectedDenominations = [0.5, 1, 2, 2.5, 5];
|
const expectedDenominations = [0.5, 1, 2, 2.5, 5];
|
||||||
|
|
||||||
@ -23,7 +21,8 @@ describe("ChipDistributionSummary Component", () => {
|
|||||||
|
|
||||||
expectedDistribution.forEach((count, index) => {
|
expectedDistribution.forEach((count, index) => {
|
||||||
const regex = new RegExp(
|
const regex = new RegExp(
|
||||||
`^${count}\\s+chips:\\s+\\$${expectedDenominations[index]}\\s+each$`
|
`^${count}\\s+chips:\\s+\\$${expectedDenominations[index]}\\s+Each$`,
|
||||||
|
"i"
|
||||||
);
|
);
|
||||||
expect(getByText(regex)).toBeTruthy();
|
expect(getByText(regex)).toBeTruthy();
|
||||||
});
|
});
|
||||||
@ -67,7 +66,7 @@ describe("ChipDistributionSummary Component", () => {
|
|||||||
|
|
||||||
expect(getByText("Distribution & Denomination")).toBeTruthy();
|
expect(getByText("Distribution & Denomination")).toBeTruthy();
|
||||||
|
|
||||||
expectedDistribution.forEach((count, index) => {
|
expectedDistribution.forEach((count) => {
|
||||||
expect(getByText(new RegExp(`^${count}\\s+chips:`, "i"))).toBeTruthy();
|
expect(getByText(new RegExp(`^${count}\\s+chips:`, "i"))).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -5,6 +5,7 @@ import {
|
|||||||
screen,
|
screen,
|
||||||
waitForElementToBeRemoved,
|
waitForElementToBeRemoved,
|
||||||
fireEvent,
|
fireEvent,
|
||||||
|
act,
|
||||||
} from "@testing-library/react-native";
|
} from "@testing-library/react-native";
|
||||||
import ChipsSelector from "@/components/ChipsSelector";
|
import ChipsSelector from "@/components/ChipsSelector";
|
||||||
|
|
||||||
@ -55,7 +56,8 @@ describe("tests for ChipsSelector", () => {
|
|||||||
const green = screen.getByText("60");
|
const green = screen.getByText("60");
|
||||||
expect(green).toHaveStyle({ color: "green" });
|
expect(green).toHaveStyle({ color: "green" });
|
||||||
|
|
||||||
userEvent.press(green);
|
fireEvent.press(green);
|
||||||
|
|
||||||
const modalLabel = await screen.findByText(/number of green chips/i);
|
const modalLabel = await screen.findByText(/number of green chips/i);
|
||||||
expect(modalLabel).toBeDefined();
|
expect(modalLabel).toBeDefined();
|
||||||
|
|
||||||
|
50
i18n/en.json
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"translation": {
|
||||||
|
"poker_chips_helper": "Poker Chips Helper",
|
||||||
|
"select_currency": "Select Currency",
|
||||||
|
"USD": "USD ($)",
|
||||||
|
"Euro": "Euro (€)",
|
||||||
|
"Pound": "Pound (£)",
|
||||||
|
"INR": "INR (₹)",
|
||||||
|
"select_number_of_players": "Select the Number of Players:",
|
||||||
|
"select_buyin_amount": "Select Buy-in Amount:",
|
||||||
|
"custom_buy_in": "Or enter a custom amount:",
|
||||||
|
"enter_custom_buy_in": "Enter custom buy-in",
|
||||||
|
"selected_buy_in": "Selected Buy-in:",
|
||||||
|
"none": "None",
|
||||||
|
"pick_an_image": "Pick an image",
|
||||||
|
"take_a_photo": "Take a photo",
|
||||||
|
"chips": "chips",
|
||||||
|
"number_of_chips": "Number of {{color}} chips",
|
||||||
|
"accept": "Accept",
|
||||||
|
"distribution_and_denomination": "Distribution & Denomination",
|
||||||
|
"pot": "Pot",
|
||||||
|
"total_value": "Total Value",
|
||||||
|
"each": "Each",
|
||||||
|
"select_language": "Select Language",
|
||||||
|
"english": "English",
|
||||||
|
"spanish": "Spanish",
|
||||||
|
"settings": "Settings",
|
||||||
|
"camera_permission_required": "Camera permission is required to take a photo.",
|
||||||
|
"how_many_chips_by_color": "How many poker chips are there for each color? Return structured JSON.",
|
||||||
|
"invalid_response": "Invalid response from API.",
|
||||||
|
"failed_to_analyze_image": "Failed to analyze the image.",
|
||||||
|
"state_saved_successfully": "State saved successfully",
|
||||||
|
"state_saved": "State saved to {{slot}}",
|
||||||
|
"state_save_failed": "Failed to save state",
|
||||||
|
"success": "Success",
|
||||||
|
"error": "Error",
|
||||||
|
"failed_to_save_state": "Failed to save state.",
|
||||||
|
"state_loaded_from": "State loaded from",
|
||||||
|
"info": "Info",
|
||||||
|
"no_saved_state_found": "No saved state found.",
|
||||||
|
"automatic_chip_detection": "Automatic Chip Detection",
|
||||||
|
"manual_chip_adjustment": "Manual Chip Adjustment",
|
||||||
|
"save_and_load": "Save & Load",
|
||||||
|
"save_slot_1": "Save\nSlot 1",
|
||||||
|
"save_slot_2": "Save\nSlot 2",
|
||||||
|
"load_slot_1": "Load\nSlot 1",
|
||||||
|
"load_slot_2": "Load\nSlot 2",
|
||||||
|
"please_select_valid_buyin": "Please select a valid buy-in amount"
|
||||||
|
}
|
||||||
|
}
|
51
i18n/es.json
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
|||||||
|
{
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"translation": {
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"poker_chips_helper": "Ayudante de Fichas de Póker",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"select_currency": "Seleccionar moneda",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"USD": "USD ($)",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"Euro": "Euro (€)",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"Pound": "Libra (£)",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"INR": "INR (₹)",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"select_number_of_players": "Seleccionar número de jugadores:",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"select_buyin_amount": "Seleccionar cantidad de buy-in:",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"custom_buy_in": "O ingresa una cantidad personalizada:",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"enter_custom_buy_in": "Ingresar buy-in personalizado",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"selected_buy_in": "Buy-in seleccionado:",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"none": "Ninguno",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"pick_an_image": "Elige una imagen",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"take_a_photo": "Tomar una foto",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"chips": "fichas",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"number_of_chips": "Número de {{color}} fichas",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"accept": "Aceptar",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"distribution_and_denomination": "Distribución y Denominación",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"pot": "Olla",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"total_value": "Valor total",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"each": "Cada",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"select_language": "Seleccionar idioma",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"english": "Inglés",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"spanish": "Español",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"settings": "Configuraciones",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"camera_permission_required": "Se requiere permiso de cámara para tomar una foto.",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"how_many_chips_by_color": "¿Cuántas fichas de póker hay de cada color? Devuelve JSON estructurado.",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"invalid_response": "Respuesta no válida de la API.",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"failed_to_analyze_image": "No se pudo analizar la imagen",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"state_saved_successfully": "Estado guardado con éxito",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"state_saved": "Estado guardado en {{slot}}",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"state_save_failed": "Error al guardar el estado",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"success": "Éxito",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"state_saved_to": "Estado guardado en",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"error": "Error",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"failed_to_save_state": "No se pudo guardar el estado.",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"state_loaded_from": "Estado cargado desde",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"info": "Información",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"no_saved_state_found": "No se encontró estado guardado.",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"automatic_chip_detection": "Detección automática de fichas",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"manual_chip_adjustment": "Ajuste manual de fichas",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"save_and_load": "Guardar & Cargar",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"save_slot_1": "Guardar\nSlot 1",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"save_slot_2": "Guardar\nSlot 2",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"load_slot_1": "Cargar\nSlot 1",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"load_slot_2": "Cargar\nSlot 2",
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
"please_select_valid_buyin": "Por favor seleccione una cantidad de buy-in válida"
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
}
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
|||||||
|
}
|
||||||
![]() I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in The keys specifically, not the values I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in `en.json` and the app code
The keys specifically, not the values
![]() Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies. I appreciate your insights, and I’ll definitely keep them in mind for future work. Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency. Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
|
22
i18n/i18n.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import i18n from "i18next";
|
||||||
|
import { initReactI18next } from "react-i18next";
|
||||||
|
import * as Localization from "expo-localization";
|
||||||
|
import en from "./en.json";
|
||||||
|
import es from "./es.json";
|
||||||
|
const resources = {
|
||||||
|
en,
|
||||||
|
es,
|
||||||
|
};
|
||||||
|
|
||||||
|
const detectedLanguage = Localization.locale.split("-")[0] || "en";
|
||||||
|
|
||||||
|
i18n.use(initReactI18next).init({
|
||||||
|
resources,
|
||||||
|
lng: detectedLanguage,
|
||||||
|
fallbackLng: "en",
|
||||||
|
interpolation: {
|
||||||
|
escapeValue: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default i18n;
|
I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in
en.json
and the app codeThe keys specifically, not the values
I think these should be lowercase, for the sake of consistency with the others. That will involve changing the same lines in
en.json
and the app codeThe keys specifically, not the values
Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.
Thank you for the feedback and suggestions! You're right about the missing update in package.json—I’ll make sure to add the new i18n dependencies.
I appreciate your insights, and I’ll definitely keep them in mind for future work.
Thanks for pointing that out! I’ve updated the keys to lowercase in es.json, en.json and the app code for consistency.