updated remaining contents for localization

This commit is contained in:
tapframe 2026-01-07 00:05:02 +05:30
parent 9924d26ff6
commit bbdd4c0504
7 changed files with 215 additions and 106 deletions

View file

@ -1,4 +1,5 @@
import React, { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import {
View,
Text,
@ -70,6 +71,7 @@ export const CastDetailsModal: React.FC<CastDetailsModalProps> = ({
onClose,
castMember,
}) => {
const { t } = useTranslation();
const { currentTheme } = useTheme();
const navigation = useNavigation<NavigationProp<RootStackParamList>>();
const [personDetails, setPersonDetails] = useState<PersonDetails | null>(null);
@ -296,7 +298,7 @@ export const CastDetailsModal: React.FC<CastDetailsModalProps> = ({
fontSize: isTablet ? 14 : 13,
fontWeight: '500',
}} numberOfLines={2}>
as {castMember.character}
{t('cast.as_character', { character: castMember.character })}
</Text>
)}
</View>
@ -336,7 +338,7 @@ export const CastDetailsModal: React.FC<CastDetailsModalProps> = ({
fontSize: 14,
marginTop: 12,
}}>
Loading details...
{t('cast.loading_details')}
</Text>
</View>
) : (
@ -369,7 +371,7 @@ export const CastDetailsModal: React.FC<CastDetailsModalProps> = ({
fontSize: 13,
fontWeight: '500',
}}>
{calculateAge(personDetails.birthday)} years old
{t('cast.years_old', { age: calculateAge(personDetails.birthday) })}
</Text>
</View>
)}
@ -389,7 +391,7 @@ export const CastDetailsModal: React.FC<CastDetailsModalProps> = ({
fontWeight: '500',
flex: 1,
}}>
Born in {personDetails.place_of_birth}
{t('cast.born_in', { place: personDetails.place_of_birth })}
</Text>
</View>
)}
@ -420,7 +422,7 @@ export const CastDetailsModal: React.FC<CastDetailsModalProps> = ({
fontWeight: '600',
letterSpacing: 0.3,
}}>
View Filmography
{t('cast.view_filmography')}
</Text>
</TouchableOpacity>
@ -454,7 +456,7 @@ export const CastDetailsModal: React.FC<CastDetailsModalProps> = ({
textTransform: 'uppercase',
letterSpacing: 0.5,
}}>
Also Known As
{t('cast.also_known_as')}
</Text>
<Text style={{
color: 'rgba(255, 255, 255, 0.7)',
@ -480,7 +482,7 @@ export const CastDetailsModal: React.FC<CastDetailsModalProps> = ({
textAlign: 'center',
fontWeight: '500',
}}>
No additional information available
{t('cast.no_info_available')}
</Text>
</View>
)}

View file

@ -110,7 +110,7 @@
"try_different": "جرب تصنيفاً أو كتالوجاً مختلفاً",
"select_catalog_desc": "اختر كتالوجاً للاكتشاف",
"tap_catalog_desc": "اضغط على الكتالوج أعلاه للبدء",
"search_placeholder": "ابحث عن أفلام، مسلسلات...",
"placeholder": "ابحث عن أفلام، مسلسلات...",
"keep_typing": "استمر في الكتابة...",
"type_characters": "اكتب حرفين على الأقل للبحث",
"no_results": "لم يتم العثور على نتائج",
@ -279,7 +279,28 @@
"born_in": "وُلد في {{place}}",
"filmography": "قائمة الأفلام",
"also_known_as": "يُعرف أيضاً بـ",
"no_info_available": "لا توجد معلومات إضافية متاحة"
"no_info_available": "لا توجد معلومات إضافية متاحة",
"as_character": "as {{character}}",
"loading_details": "Loading details...",
"years_old": "{{age}} years old",
"view_filmography": "View Filmography",
"filter": "Filter",
"sort_by": "Sort By",
"sort_popular": "Popular",
"sort_latest": "Latest",
"sort_upcoming": "Upcoming",
"upcoming_badge": "UPCOMING",
"coming_soon": "Coming Soon",
"filmography_count": "Filmography • {{count}} titles",
"loading_filmography": "Loading filmography...",
"load_more_remaining": "Load More ({{count}} remaining)",
"alert_error_title": "Error",
"alert_error_message": "Unable to load \"{{title}}\". Please try again later.",
"alert_ok": "OK",
"no_upcoming": "No upcoming releases available for this actor",
"no_content": "No content available for this actor",
"no_movies": "No movies available for this actor",
"no_tv": "No TV shows available for this actor"
},
"comments": {
"title": "تعليقات Trakt",
@ -1124,7 +1145,7 @@
"clear_cache_desc": "سيؤدي هذا لإزالة رابط المستودع المحفوظ ومسح كل بيانات البلاجنز المخزنة مؤقتاً. ستحتاج لإعادة إدخال رابط المستودع.",
"add_new_repo": "إضافة مستودع جديد",
"available_plugins": "البلاجنز المتاحة ({{count}})",
"search_placeholder": "البحث في البلاجنز...",
"placeholder": "البحث في البلاجنز...",
"all": "الكل",
"filter_all": "كل الأنواع",
"filter_movies": "أفلام",

View file

@ -110,7 +110,7 @@
"try_different": "Try a different genre or catalog",
"select_catalog_desc": "Select a catalog to discover",
"tap_catalog_desc": "Tap the catalog chip above to get started",
"search_placeholder": "Search movies, shows...",
"placeholder": "Search movies, shows...",
"keep_typing": "Keep typing...",
"type_characters": "Type at least 2 characters to search",
"no_results": "No results found",
@ -279,7 +279,28 @@
"born_in": "Born in {{place}}",
"filmography": "Filmography",
"also_known_as": "Also Known As",
"no_info_available": "No additional information available"
"no_info_available": "No additional information available",
"as_character": "as {{character}}",
"loading_details": "Loading details...",
"years_old": "{{age}} years old",
"view_filmography": "View Filmography",
"filter": "Filter",
"sort_by": "Sort By",
"sort_popular": "Popular",
"sort_latest": "Latest",
"sort_upcoming": "Upcoming",
"upcoming_badge": "UPCOMING",
"coming_soon": "Coming Soon",
"filmography_count": "Filmography • {{count}} titles",
"loading_filmography": "Loading filmography...",
"load_more_remaining": "Load More ({{count}} remaining)",
"alert_error_title": "Error",
"alert_error_message": "Unable to load \"{{title}}\". Please try again later.",
"alert_ok": "OK",
"no_upcoming": "No upcoming releases available for this actor",
"no_content": "No content available for this actor",
"no_movies": "No movies available for this actor",
"no_tv": "No TV shows available for this actor"
},
"comments": {
"title": "Trakt Comments",
@ -1124,7 +1145,7 @@
"clear_cache_desc": "This will remove the saved repository URL and clear all cached plugin data. You will need to re-enter your repository URL.",
"add_new_repo": "Add New Repository",
"available_plugins": "Available Plugins ({{count}})",
"search_placeholder": "Search plugins...",
"placeholder": "Search plugins...",
"all": "All",
"filter_all": "All Types",
"filter_movies": "Movies",

View file

@ -110,7 +110,7 @@
"try_different": "Prueba con un género o catálogo diferente",
"select_catalog_desc": "Selecciona un catálogo para descubrir",
"tap_catalog_desc": "Toca el catálogo arriba para empezar",
"search_placeholder": "Buscar películas, series...",
"placeholder": "Buscar películas, series...",
"keep_typing": "Sigue escribiendo...",
"type_characters": "Escribe al menos 2 caracteres para buscar",
"no_results": "No se encontraron resultados",
@ -279,7 +279,28 @@
"born_in": "Nacido/a en {{place}}",
"filmography": "Filmografía",
"also_known_as": "También conocido/a como",
"no_info_available": "No hay información adicional disponible"
"no_info_available": "No additional information available",
"as_character": "as {{character}}",
"loading_details": "Loading details...",
"years_old": "{{age}} years old",
"view_filmography": "View Filmography",
"filter": "Filter",
"sort_by": "Sort By",
"sort_popular": "Popular",
"sort_latest": "Latest",
"sort_upcoming": "Upcoming",
"upcoming_badge": "UPCOMING",
"coming_soon": "Coming Soon",
"filmography_count": "Filmography • {{count}} titles",
"loading_filmography": "Loading filmography...",
"load_more_remaining": "Load More ({{count}} remaining)",
"alert_error_title": "Error",
"alert_error_message": "Unable to load \"{{title}}\". Please try again later.",
"alert_ok": "OK",
"no_upcoming": "No upcoming releases available for this actor",
"no_content": "No content available for this actor",
"no_movies": "No movies available for this actor",
"no_tv": "No TV shows available for this actor"
},
"comments": {
"title": "Comentarios de Trakt",
@ -1124,7 +1145,7 @@
"clear_cache_desc": "Esto eliminará la URL guardada y los datos en caché. Tendrás que introducir de nuevo la URL del repositorio.",
"add_new_repo": "Añadir nuevo repositorio",
"available_plugins": "Plugins disponibles ({{count}})",
"search_placeholder": "Buscar plugins...",
"placeholder": "Buscar plugins...",
"all": "Todo",
"filter_all": "Todos los tipos",
"filter_movies": "Películas",

View file

@ -110,7 +110,7 @@
"try_different": "Essayez un genre ou un catalogue différent",
"select_catalog_desc": "Sélectionnez un catalogue à découvrir",
"tap_catalog_desc": "Appuyez sur le jeton de catalogue ci-dessus pour commencer",
"search_placeholder": "Rechercher des films, séries...",
"placeholder": "Rechercher des films, séries...",
"keep_typing": "Continuez à taper...",
"type_characters": "Tapez au moins 2 caractères pour rechercher",
"no_results": "Aucun résultat trouvé",
@ -278,7 +278,28 @@
"personal_info": "Infos personnelles",
"born_in": "Né à {{place}}",
"filmography": "Filmographie",
"also_known_as": "Aussi connu sous le nom de",
"also_known_as": "Aussi connu(e) sous le nom de",
"as_character": "as {{character}}",
"loading_details": "Loading details...",
"years_old": "{{age}} years old",
"view_filmography": "View Filmography",
"filter": "Filter",
"sort_by": "Sort By",
"sort_popular": "Popular",
"sort_latest": "Latest",
"sort_upcoming": "Upcoming",
"upcoming_badge": "UPCOMING",
"coming_soon": "Coming Soon",
"filmography_count": "Filmography • {{count}} titles",
"loading_filmography": "Loading filmography...",
"load_more_remaining": "Load More ({{count}} remaining)",
"alert_error_title": "Error",
"alert_error_message": "Unable to load \"{{title}}\". Please try again later.",
"alert_ok": "OK",
"no_upcoming": "No upcoming releases available for this actor",
"no_content": "No content available for this actor",
"no_movies": "No movies available for this actor",
"no_tv": "No TV shows available for this actor",
"no_info_available": "Aucune information supplémentaire disponible"
},
"comments": {
@ -1124,7 +1145,7 @@
"clear_cache_desc": "Cela supprimera l'URL du dépôt enregistrée et effacera toutes les données de plugin mises en cache. Vous devrez ressaisir votre URL de dépôt.",
"add_new_repo": "Ajouter un nouveau dépôt",
"available_plugins": "Plugins disponibles ({{count}})",
"search_placeholder": "Rechercher des plugins...",
"placeholder": "Rechercher des plugins...",
"all": "Tout",
"filter_all": "Tous les types",
"filter_movies": "Films",

View file

@ -110,7 +110,7 @@
"try_different": "Tente um gênero ou catálogo diferente",
"select_catalog_desc": "Selecione um catálogo para descobrir",
"tap_catalog_desc": "Toque no botão de catálogo acima para começar",
"search_placeholder": "Buscar filmes, séries...",
"placeholder": "Buscar filmes, séries...",
"keep_typing": "Continue digitando...",
"type_characters": "Digite pelo menos 2 caracteres para buscar",
"no_results": "Nenhum resultado encontrado",
@ -278,7 +278,28 @@
"personal_info": "Informações Pessoais",
"born_in": "Nascido em {{place}}",
"filmography": "Filmografia",
"also_known_as": "Também Conhecido Como",
"also_known_as": "Também conhecido(a) como",
"as_character": "como {{character}}",
"loading_details": "Carregando detalhes...",
"years_old": "{{age}} anos",
"view_filmography": "Ver Filmografia",
"filter": "Filtrar",
"sort_by": "Ordenar Por",
"sort_popular": "Popular",
"sort_latest": "Mais Recente",
"sort_upcoming": "Próximos Lançamentos",
"upcoming_badge": "EM BREVE",
"coming_soon": "Em Breve",
"filmography_count": "Filmografia • {{count}} títulos",
"loading_filmography": "Carregando filmografia...",
"load_more_remaining": "Carregar Mais ({{count}} restantes)",
"alert_error_title": "Erro",
"alert_error_message": "Não foi possível carregar \"{{title}}\". Por favor, tente novamente mais tarde.",
"alert_ok": "OK",
"no_upcoming": "Nenhum lançamento futuro disponível para este ator",
"no_content": "Nenhum conteúdo disponível para este ator",
"no_movies": "Nenhum filme disponível para este ator",
"no_tv": "Nenhuma série disponível para este ator",
"no_info_available": "Nenhuma informação adicional disponível"
},
"comments": {
@ -1090,7 +1111,7 @@
"clear_cache_desc": "Isso removerá a URL do repositório salvo e limpará todos os dados de plugins armazenados em cache. Você precisará digitar a URL do repositório novamente.",
"add_new_repo": "Adicionar Novo Repositório",
"available_plugins": "Plugins Disponíveis ({{count}})",
"search_placeholder": "Pesquisar plugins...",
"placeholder": "Pesquisar plugins...",
"all": "Todos",
"filter_all": "Todos Tipos",
"filter_movies": "Filmes",

View file

@ -1,4 +1,5 @@
import React, { useState, useEffect, useCallback, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import {
View,
Text,
@ -59,6 +60,7 @@ type CastMoviesScreenRouteProp = RouteProp<RootStackParamList, 'CastMovies'>;
const CastMoviesScreen: React.FC = () => {
const { currentTheme } = useTheme();
const { t } = useTranslation();
const navigation = useNavigation<NavigationProp<RootStackParamList>>();
const route = useRoute<CastMoviesScreenRouteProp>();
const { castMember } = route.params;
@ -257,7 +259,7 @@ const CastMoviesScreen: React.FC = () => {
if (__DEV__) console.warn('Stremio ID is null/undefined for movie:', movie.title);
throw new Error('Could not find Stremio ID');
}
} catch (error: any) {
} catch (error: any) {
if (__DEV__) {
console.error('=== Error in handleMoviePress ===');
console.error('Movie:', movie.title);
@ -265,9 +267,9 @@ const CastMoviesScreen: React.FC = () => {
console.error('Error message:', error.message);
console.error('Error stack:', error.stack);
}
setAlertTitle('Error');
setAlertMessage(`Unable to load "${movie.title}". Please try again later.`);
setAlertActions([{ label: 'OK', onPress: () => {} }]);
setAlertTitle(t('cast.alert_error_title'));
setAlertMessage(t('cast.alert_error_message', { title: movie.title }));
setAlertActions([{ label: t('cast.alert_ok'), onPress: () => { } }]);
setAlertVisible(true);
}
};
@ -419,7 +421,7 @@ const CastMoviesScreen: React.FC = () => {
marginLeft: 4,
letterSpacing: 0.2,
}}>
UPCOMING
{t('cast.upcoming_badge')}
</Text>
</View>
)}
@ -482,7 +484,7 @@ const CastMoviesScreen: React.FC = () => {
marginTop: 3,
fontWeight: '500',
}} numberOfLines={1}>
{`as ${item.character}`}
{t('cast.as_character', { character: item.character })}
</Text>
)}
@ -516,7 +518,7 @@ const CastMoviesScreen: React.FC = () => {
marginLeft: 2,
letterSpacing: 0.2,
}}>
Coming Soon
{t('cast.coming_soon')}
</Text>
</View>
)}
@ -630,7 +632,7 @@ const CastMoviesScreen: React.FC = () => {
fontWeight: '500',
letterSpacing: 0.2,
}}>
{`Filmography • ${movies.length} titles`}
{t('cast.filmography_count', { count: movies.length })}
</Text>
</View>
</Animated.View>
@ -652,16 +654,16 @@ const CastMoviesScreen: React.FC = () => {
letterSpacing: 0.5,
textTransform: 'uppercase',
}}>
Filter
{t('cast.filter')}
</Text>
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
contentContainerStyle={{ paddingRight: 20 }}
>
{renderFilterButton('all', 'All', movies.length)}
{renderFilterButton('movies', 'Movies', movieCount)}
{renderFilterButton('tv', 'TV Shows', tvCount)}
{renderFilterButton('all', t('catalog.all'), movies.length)}
{renderFilterButton('movies', t('catalog.movies'), movieCount)}
{renderFilterButton('tv', t('catalog.tv_shows'), tvCount)}
</ScrollView>
</View>
@ -675,16 +677,16 @@ const CastMoviesScreen: React.FC = () => {
letterSpacing: 0.5,
textTransform: 'uppercase',
}}>
Sort By
{t('cast.sort_by')}
</Text>
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
contentContainerStyle={{ paddingRight: 20 }}
>
{renderSortButton('popularity', 'Popular', 'trending-up')}
{renderSortButton('latest', 'Latest', 'schedule')}
{renderSortButton('upcoming', 'Upcoming', 'event')}
{renderSortButton('popularity', t('cast.sort_popular'), 'trending-up')}
{renderSortButton('latest', t('cast.sort_latest'), 'schedule')}
{renderSortButton('upcoming', t('cast.sort_upcoming'), 'event')}
</ScrollView>
</View>
</View>
@ -703,7 +705,7 @@ const CastMoviesScreen: React.FC = () => {
marginTop: 12,
fontWeight: '500',
}}>
Loading filmography...
{t('cast.loading_filmography')}
</Text>
</View>
) : (
@ -755,7 +757,7 @@ const CastMoviesScreen: React.FC = () => {
fontSize: 14,
fontWeight: '600',
}}>
{`Load More (${filteredAndSortedMovies.length - displayLimit} remaining)`}
{t('cast.load_more_remaining', { count: filteredAndSortedMovies.length - displayLimit })}
</Text>
</TouchableOpacity>
)}
@ -790,7 +792,7 @@ const CastMoviesScreen: React.FC = () => {
marginBottom: 8,
textAlign: 'center',
}}>
No Content Found
{t('catalog.no_content_found')}
</Text>
<Text style={{
color: 'rgba(255, 255, 255, 0.5)',
@ -800,12 +802,12 @@ const CastMoviesScreen: React.FC = () => {
fontWeight: '500',
}}>
{sortBy === 'upcoming'
? 'No upcoming releases available for this actor'
? t('cast.no_upcoming')
: selectedFilter === 'all'
? 'No content available for this actor'
? t('cast.no_content')
: selectedFilter === 'movies'
? 'No movies available for this actor'
: 'No TV shows available for this actor'
? t('cast.no_movies')
: t('cast.no_tv')
}
</Text>
</Animated.View>