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:
parent
adbdce1c75
commit
32c18a6d0f
2 changed files with 18 additions and 16 deletions
|
|
@ -49,17 +49,17 @@ export function SceneActionsProvider({ children }: { children: React.ReactNode }
|
|||
|
||||
const hide = React.useCallback(
|
||||
(scene: SceneOut) => {
|
||||
Alert.alert('Ukryć scenę?', scene.title, [
|
||||
{ text: 'Anuluj', style: 'cancel' },
|
||||
Alert.alert('Hide scene?', scene.title, [
|
||||
{ text: 'Cancel', style: 'cancel' },
|
||||
{
|
||||
text: 'Ukryj',
|
||||
text: 'Hide',
|
||||
style: 'destructive',
|
||||
onPress: async () => {
|
||||
try {
|
||||
await client.hideScene(scene.id);
|
||||
invalidate();
|
||||
} 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(
|
||||
(scene: SceneOut) => {
|
||||
if (pendingDuplicate) return; // w trakcie wyboru duplikatu — ignoruj
|
||||
Alert.alert(scene.title, 'Akcje sceny', [
|
||||
{ text: 'Ukryj scenę', style: 'destructive', onPress: () => hide(scene) },
|
||||
{ text: 'Oznacz jako duplikat', onPress: () => setPending(scene) },
|
||||
{ text: 'Anuluj', style: 'cancel' },
|
||||
Alert.alert(scene.title, 'Scene actions', [
|
||||
{ text: 'Hide scene', style: 'destructive', onPress: () => hide(scene) },
|
||||
{ text: 'Mark as duplicate', onPress: () => setPending(scene) },
|
||||
{ text: 'Cancel', style: 'cancel' },
|
||||
]);
|
||||
},
|
||||
[pendingDuplicate, hide],
|
||||
|
|
@ -88,19 +88,19 @@ export function SceneActionsProvider({ children }: { children: React.ReactNode }
|
|||
return;
|
||||
}
|
||||
Alert.alert(
|
||||
'Scalić duplikat?',
|
||||
`„${dup.title}"\n\nscalić w\n\n„${target.title}"`,
|
||||
'Merge duplicate?',
|
||||
`"${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 () => {
|
||||
try {
|
||||
// keep = wybrany oryginał (target), drop = długo-naciśnięty duplikat (dup)
|
||||
await client.mergeDuplicateScene(target.id, dup.id);
|
||||
invalidate();
|
||||
} catch (e: any) {
|
||||
Alert.alert('Scalanie nie powiodło się', e?.message || 'unknown error');
|
||||
Alert.alert('Merge failed', e?.message || 'unknown error');
|
||||
} finally {
|
||||
setPending(null);
|
||||
}
|
||||
|
|
@ -132,10 +132,10 @@ export function SceneActionsProvider({ children }: { children: React.ReactNode }
|
|||
<View style={styles.banner} pointerEvents="box-none">
|
||||
<View style={styles.bannerInner}>
|
||||
<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>
|
||||
<Pressable onPress={cancelDuplicate} style={styles.bannerCancel} hitSlop={8}>
|
||||
<Text style={styles.bannerCancelText}>Anuluj</Text>
|
||||
<Text style={styles.bannerCancelText}>Cancel</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ export function Thumb({ url, style, contentFit = 'cover', emptyGlyph = '🎬' }:
|
|||
|
||||
{status === 'error' && (
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue