updating spanish languge code
This commit is contained in:
@@ -21,7 +21,7 @@ import { useAppStatus } from '../../../context-store/appStatus';
|
||||
import useHandleBackPressNew from '../../hooks/useHandleBackPressNew';
|
||||
import { useToast } from '../../../context-store/toastManager';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { MAX_CONTENT_WIDTH } from '../../constants/theme';
|
||||
import { HIDDEN_OPACITY, MAX_CONTENT_WIDTH } from '../../constants/theme';
|
||||
import { useGlobalInsets } from '../../../context-store/insetsProvider';
|
||||
import { TAB_ITEM_HEIGHT } from '../../../navigation/tabs';
|
||||
|
||||
@@ -30,11 +30,14 @@ export default function AppStore({ navigation }) {
|
||||
const { isConnectedToTheInternet, screenDimensions } = useAppStatus();
|
||||
const { theme, darkModeType } = useGlobalThemeContext();
|
||||
const { textColor, backgroundOffset } = GetThemeColors();
|
||||
const { decodedGiftCards } = useGlobalAppData();
|
||||
const { decodedGiftCards, decodedChatGPT } = useGlobalAppData();
|
||||
const { bottomPadding } = useGlobalInsets();
|
||||
const navigate = useNavigation();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const chatGPTCredits = decodedChatGPT?.credits;
|
||||
const hideGenerativeAI = chatGPTCredits < 30 && Platform.OS === 'ios';
|
||||
|
||||
function handleBackPressFunction() {
|
||||
navigation.navigate('Home');
|
||||
}
|
||||
@@ -62,6 +65,12 @@ export default function AppStore({ navigation }) {
|
||||
<TouchableOpacity
|
||||
key={id}
|
||||
onPress={() => {
|
||||
if (hideGenerativeAI && app.pageName.toLowerCase() === 'ai') {
|
||||
navigate.navigate('ErrorScreen', {
|
||||
errorMessage: t('screens.inAccount.appStore.comingSoon'),
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (
|
||||
!isConnectedToTheInternet &&
|
||||
(app.pageName.toLowerCase() === 'ai' ||
|
||||
@@ -91,6 +100,10 @@ export default function AppStore({ navigation }) {
|
||||
flexGrow: 1,
|
||||
overflow: 'scroll',
|
||||
backgroundColor: backgroundOffset,
|
||||
opacity:
|
||||
hideGenerativeAI && app.pageName.toLowerCase() === 'ai'
|
||||
? HIDDEN_OPACITY
|
||||
: 1,
|
||||
}}
|
||||
>
|
||||
<View
|
||||
|
||||
@@ -3,7 +3,7 @@ import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
||||
import enTranslation from './locales/en/translation.json';
|
||||
import spTranslation from './locales/sp/translation.json';
|
||||
import esTranslation from './locales/es/translation.json';
|
||||
import itTranslation from './locales/it/translation.json';
|
||||
import ptBrTranslation from './locales/pt-BR/translation.json';
|
||||
import germanTranslation from './locales/de-DE/translation.json';
|
||||
@@ -11,7 +11,7 @@ import germanTranslation from './locales/de-DE/translation.json';
|
||||
i18n.use(initReactI18next).init({
|
||||
debug: true,
|
||||
fallbackLng: 'en',
|
||||
supportedLngs: ['en', 'sp', 'it', 'pt-BR', 'de-DE'],
|
||||
supportedLngs: ['en', 'es', 'it', 'pt-BR', 'de-DE'],
|
||||
load: 'currentOnly',
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
@@ -20,8 +20,8 @@ i18n.use(initReactI18next).init({
|
||||
en: {
|
||||
translation: enTranslation,
|
||||
},
|
||||
sp: {
|
||||
translation: spTranslation,
|
||||
es: {
|
||||
translation: esTranslation,
|
||||
},
|
||||
it: {
|
||||
translation: itTranslation,
|
||||
|
||||
@@ -1308,7 +1308,8 @@
|
||||
"shopTitle": "Compra con Bitcoin",
|
||||
"shopDescription": "Compra tarjetas de regalo de miles de comerciantes en todo el mundo",
|
||||
"callToAction": "¿Quieres algo aquí?",
|
||||
"featuredApps": "¿Quieres algo aquí?"
|
||||
"featuredApps": "¿Quieres algo aquí?",
|
||||
"comingSoon": "Esta función no está disponible temporalmente. Estamos trabajando para restaurarla lo antes posible."
|
||||
},
|
||||
"confirmTxPage": {
|
||||
"failedToSend": "Error al enviar",
|
||||
@@ -11,7 +11,7 @@ Please follow the steps below to add a new language:
|
||||
- The folder name must use the correct **language code** (ISO-style).
|
||||
- Examples:
|
||||
- English → `en`
|
||||
- Spanish → `sp`
|
||||
- Spanish → `es`
|
||||
- French → `fr`
|
||||
|
||||
---
|
||||
@@ -25,7 +25,7 @@ Please follow the steps below to add a new language:
|
||||
- Copy the file into your new language folder.
|
||||
Example for Spanish:
|
||||
```
|
||||
locals/sp/translation.json
|
||||
locals/es/translation.json
|
||||
```
|
||||
|
||||
---
|
||||
@@ -58,7 +58,7 @@ Open `localeslist.js` and add your language entry:
|
||||
languageName: 'Español',
|
||||
fullySupported: true,
|
||||
translatedName: 'languages.spanish',
|
||||
id: 'sp',
|
||||
id: 'es',
|
||||
flagCode: 'es',
|
||||
},
|
||||
```
|
||||
@@ -72,20 +72,20 @@ Open `i18n.js` and do the following:
|
||||
1. **Import your translation file** at the top:
|
||||
|
||||
```js
|
||||
import spTranslation from './locals/sp/translation.json';
|
||||
import esTranslation from './locals/es/translation.json';
|
||||
```
|
||||
|
||||
2. **Add your language code** to `supportedLngs`:
|
||||
|
||||
```js
|
||||
supportedLngs: ['en', 'sp'],
|
||||
supportedLngs: ['en', 'es'],
|
||||
```
|
||||
|
||||
3. **Add your translation to the `resources` object**:
|
||||
```js
|
||||
resources: {
|
||||
en: { translation: enTranslation },
|
||||
sp: { translation: spTranslation },
|
||||
es: { translation: esTranslation },
|
||||
},
|
||||
```
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ export const supportedLanguagesList = [
|
||||
languageName: 'Español',
|
||||
fullySupported: true,
|
||||
translatedName: 'languages.spanish',
|
||||
id: 'sp',
|
||||
id: 'es',
|
||||
flagCode: 'es',
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user