add translations for tips

This commit is contained in:
Pas 2025-05-03 19:39:45 -06:00
parent f5c512c011
commit 8b678078f5
2 changed files with 26 additions and 26 deletions

View file

@ -600,6 +600,29 @@
"enableExtension": "Enable extension",
"title": "Please enable the extension",
"text": "You've installed the P-Stream extension. To start using it, you need to enable the extension for this site."
},
"tips": {
"1": "Tap the gear icon to switch sources!",
"2": "Tap the title to copy the link!",
"3": "Hold SHIFT for widescreen instead of fullscreen!",
"4": "Some sources work better than others!",
"5": "Get the extension for more sources!",
"6": "Hold bookmarks to edit or delete them!",
"7": "Hold SHIFT and tap the title to copy the link with time!",
"8": "Set a custom subtitle color!",
"9": "Migrate your account to a new backend in settings!",
"10": "Join the Discord!",
"11": "Use [ and ] to adjust subtitle timing!",
"12": "Press SPACE or K to play/pause!",
"13": "Use LEFT and RIGHT arrow keys to skip 5 seconds!",
"14": "Use J and L keys to skip 10 seconds!",
"15": "Press F to toggle fullscreen!",
"16": "Press M to toggle mute!",
"17": "Use UP and DOWN arrows to change volume!",
"18": "Press < and > to change playback speed!",
"19": "Press . and , to move frame by frame when paused!",
"20": "Press C to toggle subtitles!",
"21": "Press R to do a barrel roll!"
}
},
"time": {

View file

@ -181,34 +181,11 @@ export function ScrapingPartInterruptButton() {
);
}
const TIPS_LIST = [
"Tap the gear icon to switch sources!",
"Tap the title to copy the link!",
"Hold SHIFT for widescreen instead of fullscreen!",
"Some sources work better than others!",
"Get the extension for more sources!",
"Hold bookmarks to edit or delete them!",
"Hold SHIFT and tap the title to copy the link with time!",
"Set a custom subtitle color!",
"Migrate your account to a new backend in settings!",
"Join the Discord!",
"Use [ and ] to adjust subtitle timing!",
"Press SPACE or K to play/pause!",
"Use LEFT and RIGHT arrow keys to skip 5 seconds!",
"Use J and L keys to skip 10 seconds!",
"Press F to toggle fullscreen!",
"Press M to toggle mute!",
"Use UP and DOWN arrows to change volume!",
"Press < and > to change playback speed!",
"Press . and , to move frame by frame when paused!",
"Press C to toggle subtitles!",
"Press R to do a barrel roll!",
];
export function Tips() {
const { t } = useTranslation();
const [tip] = useState(() => {
const randomIndex = Math.floor(Math.random() * TIPS_LIST.length);
return TIPS_LIST[randomIndex];
const randomIndex = Math.floor(Math.random() * 21) + 1;
return t(`player.scraping.tips.${randomIndex}`);
});
return (