fix(mobile): English long-press action labels + clean thumb error placeholder

bug-report c25e9b55: long-press scene actions were in Polish — translate menu,
banner and confirm dialogs to English. Thumb 'error' state (e.g. expired sxyprn
thumbnail 404) now shows the same 🎬 placeholder as 'empty' instead of a ⚠ broken
glyph (bug 2026-06-10).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jtrzupek 2026-06-10 10:11:10 +02:00
parent adbdce1c75
commit 32c18a6d0f
2 changed files with 18 additions and 16 deletions

View file

@ -49,17 +49,17 @@ export function SceneActionsProvider({ children }: { children: React.ReactNode }
const hide = React.useCallback( const hide = React.useCallback(
(scene: SceneOut) => { (scene: SceneOut) => {
Alert.alert('Ukryć scenę?', scene.title, [ Alert.alert('Hide scene?', scene.title, [
{ text: 'Anuluj', style: 'cancel' }, { text: 'Cancel', style: 'cancel' },
{ {
text: 'Ukryj', text: 'Hide',
style: 'destructive', style: 'destructive',
onPress: async () => { onPress: async () => {
try { try {
await client.hideScene(scene.id); await client.hideScene(scene.id);
invalidate(); invalidate();
} catch (e: any) { } catch (e: any) {
Alert.alert('Nie udało się ukryć', e?.message || 'unknown error'); Alert.alert('Failed to hide', e?.message || 'unknown error');
} }
}, },
}, },
@ -71,10 +71,10 @@ export function SceneActionsProvider({ children }: { children: React.ReactNode }
const openActions = React.useCallback( const openActions = React.useCallback(
(scene: SceneOut) => { (scene: SceneOut) => {
if (pendingDuplicate) return; // w trakcie wyboru duplikatu — ignoruj if (pendingDuplicate) return; // w trakcie wyboru duplikatu — ignoruj
Alert.alert(scene.title, 'Akcje sceny', [ Alert.alert(scene.title, 'Scene actions', [
{ text: 'Ukryj scenę', style: 'destructive', onPress: () => hide(scene) }, { text: 'Hide scene', style: 'destructive', onPress: () => hide(scene) },
{ text: 'Oznacz jako duplikat', onPress: () => setPending(scene) }, { text: 'Mark as duplicate', onPress: () => setPending(scene) },
{ text: 'Anuluj', style: 'cancel' }, { text: 'Cancel', style: 'cancel' },
]); ]);
}, },
[pendingDuplicate, hide], [pendingDuplicate, hide],
@ -88,19 +88,19 @@ export function SceneActionsProvider({ children }: { children: React.ReactNode }
return; return;
} }
Alert.alert( Alert.alert(
'Scalić duplikat?', 'Merge duplicate?',
`${dup.title}"\n\nscalić w\n\n„${target.title}"`, `"${dup.title}"\n\nmerge into\n\n"${target.title}"`,
[ [
{ text: 'Anuluj', style: 'cancel', onPress: () => setPending(null) }, { text: 'Cancel', style: 'cancel', onPress: () => setPending(null) },
{ {
text: 'Scal', text: 'Merge',
onPress: async () => { onPress: async () => {
try { try {
// keep = wybrany oryginał (target), drop = długo-naciśnięty duplikat (dup) // keep = wybrany oryginał (target), drop = długo-naciśnięty duplikat (dup)
await client.mergeDuplicateScene(target.id, dup.id); await client.mergeDuplicateScene(target.id, dup.id);
invalidate(); invalidate();
} catch (e: any) { } catch (e: any) {
Alert.alert('Scalanie nie powiodło się', e?.message || 'unknown error'); Alert.alert('Merge failed', e?.message || 'unknown error');
} finally { } finally {
setPending(null); setPending(null);
} }
@ -132,10 +132,10 @@ export function SceneActionsProvider({ children }: { children: React.ReactNode }
<View style={styles.banner} pointerEvents="box-none"> <View style={styles.banner} pointerEvents="box-none">
<View style={styles.bannerInner}> <View style={styles.bannerInner}>
<Text style={styles.bannerText} numberOfLines={2}> <Text style={styles.bannerText} numberOfLines={2}>
Wybierz oryginał dotknij scenę, w którą scalić {pendingDuplicate.title}" Pick the original tap the scene to merge "{pendingDuplicate.title}" into
</Text> </Text>
<Pressable onPress={cancelDuplicate} style={styles.bannerCancel} hitSlop={8}> <Pressable onPress={cancelDuplicate} style={styles.bannerCancel} hitSlop={8}>
<Text style={styles.bannerCancelText}>Anuluj</Text> <Text style={styles.bannerCancelText}>Cancel</Text>
</Pressable> </Pressable>
</View> </View>
</View> </View>

View file

@ -55,7 +55,9 @@ export function Thumb({ url, style, contentFit = 'cover', emptyGlyph = '🎬' }:
{status === 'error' && ( {status === 'error' && (
<View style={[StyleSheet.absoluteFill, styles.center]}> <View style={[StyleSheet.absoluteFill, styles.center]}>
<Text style={styles.glyphError}></Text> {/* Błąd ładowania (np. wygasła sxyprn/trafficdeposit miniaturka, 404)
czysty placeholder jak 'empty', nie alarmowe (bug 2026-06-10). */}
<Text style={styles.glyph}>{emptyGlyph}</Text>
</View> </View>
)} )}
</View> </View>