Skip to content

Open-source music player for YouTube Music's catalog, with genres, full albums and playlists. Windows, macOS, Linux, Android, iPhone and Docker. No account needed.

TypeScript
15.4 KB
Raw Blame
/**
 * English: Musike's own language and the source of truth for every other one.
 * Other languages are typed as `Messages`, so a missing or extra key fails the build.
 */

const count = (n: number, one: string, many: string) => `${n} ${n === 1 ? one : many}`;

export const en = {
  locale: "en-US",

  common: {
    close: "Close",
    back: "Back",
    cancel: "Cancel",
    retry: "Try again",
    loading: "Loading",
    play: "Play",
    pause: "Pause",
    playX: (title: string) => `Play ${title}`,
    playAll: "Play all",
    favorite: "Favorite",
    playlist: "Playlist",
    addToFavorites: "Add to Favorites",
    removeFromFavorites: "Remove from Favorites",
    inFavorites: "In Favorites",
    video: "Video",
    youtube: "YouTube",
    searchMusic: "Search music",
    install: "Install",
    update: "Update",
    tracks: (n: number) => count(n, "track", "tracks"),
    songs: (n: number) => count(n, "song", "songs"),
    artists: (n: number) => count(n, "artist", "artists"),
  },

  time: {
    greeting: (hour: number): string =>
      hour < 5 ? "Good night" : hour < 12 ? "Good morning" : hour < 18 ? "Good afternoon" : "Good evening",
    /** Total length of a list, e.g. "1 hr 5 min". */
    total: (seconds: number) => {
      const m = Math.round(seconds / 60);
      return m < 60 ? `${m} min` : `${Math.floor(m / 60)} hr ${m % 60} min`;
    },
  },

  nav: {
    main: "Main navigation",
    home: "Home",
    search: "Search",
    library: "Library",
    settings: "Settings",
    settingsAttention: "Settings (needs attention)",
    settingsUpdate: "Settings (yt-dlp update available)",
    updatePill: "Update",
    checkPill: "Check",
    yourCollection: "Your collection",
    newPlaylist: "New playlist",
    favorites: "Favorites",
    recentlyPlayed: "Recently played",
    history: "History",
  },

  home: {
    startTitle: "Start with search",
    startBody: "Find any song or music video on YouTube. It plays as audio or video, with no ads.",
    seeAll: "See all",
    yourFavorites: "Your favorites",
  },

  library: {
    backup: "Library backup (export or import)",
    newShort: "New",
    create: "Create",
    playlistSub: (n: number) => `Playlist · ${count(n, "track", "tracks")}`,
    noPlaylists: "You don't have any playlists yet. Create one here or use any track's menu to start one.",
  },

  collection: {
    labelPlaylist: "Playlist",
    labelFavorites: "Collection",
    labelHistory: "History",
    notFoundTitle: "Playlist not found",
    notFoundBody: "It may have been deleted.",
    goToLibrary: "Go to Library",
    shuffle: "Shuffle play",
    more: "More playlist options",
    emptyHistory: "Nothing played yet",
    empty: "Still empty",
    emptyFavoritesBody: "Tap the heart on any track to keep it here.",
    emptyHistoryBody: "Songs you listen to show up here.",
    emptyPlaylistBody: 'Search for songs and use "Add to playlist" in any track\'s menu.',
    rename: "Rename",
    renameTitle: "Rename playlist",
    save: "Save",
    deletePlaylist: "Delete playlist",
    deleteTitle: "Delete playlist?",
    deleteBody: (name: string, tracks: number) =>
      `"${name}" and its list of ${count(tracks, "track", "tracks")} will be deleted. This can't be undone.`,
    delete: "Delete",
  },

  dialogs: {
    addToPlaylist: "Add to playlist",
    addManyToPlaylist: (n: number) => `Add ${n} tracks to a playlist`,
    newPlaylistName: "New playlist name",
    name: "Name",
    namePlaceholder: "E.g. Workout, Focus, Road trip",
    createAndAdd: "Create and add",
    shortcutsTitle: "Keyboard shortcuts",
    space: "Space",
    shortcuts: {
      playPause: "Play / pause",
      seek: "Back / forward 5 s",
      skip: "Previous / next track",
      volume: "Volume",
      mute: "Mute",
      favorite: "Favorite the current track",
      shuffle: "Shuffle",
      repeat: "Repeat",
      video: "Toggle video",
      theater: "Maximize video",
      queue: "Queue",
      search: "Search",
      help: "This list",
    },
  },

  player: {
    repeatOff: "Repeat: off",
    repeatAll: "Repeat: queue",
    repeatOne: "Repeat: track",
    shuffleOn: "Shuffle: on",
    shuffleOff: "Shuffle: off",
    previous: "Previous",
    next: "Next",
    progress: "Progress",
    mute: "Mute",
    unmute: "Unmute",
    volume: "Volume",
    mode: "Playback mode",
    audio: "Audio",
    video: "Video",
    watchClip: "Watch the music video",
    toHd: "Switch to HD (720p, downloads before playing)",
    toSd: "Switch to SD (360p, starts faster when available)",
    nothingPlaying: "Nothing playing. Search for something to start.",
    showNowPlaying: "Show Now playing",
    queue: "Queue",
    nowPlayingPanel: "Now playing panel",
    shortcuts: "Keyboard shortcuts (?)",
    openNowPlaying: (title: string) => `Open Now playing: ${title}`,
    status: {
      findingClip: "Looking for the music video",
      preparingHd: "Preparing HD video",
      loadingVideo: "Loading video",
      fetchingRadio: "Finding radio",
    },
    noClip: "This song has no music video on YouTube",
    radioContinuing: (title: string) => `Continuing with radio from "${title}"`,
    playsNext: (title: string) => `"${title}" plays next`,
    addedToQueue: (title: string) => `"${title}" added to the queue`,
    startingRadio: (title: string) => `Building radio from "${title}"`,
    cantPlay: (title: string, reason: string) => `Couldn't play "${title}". ${reason}`,
    aTrack: "this track",
    browserCantPlay: "The browser couldn't play this format.",
    serverDown: "Can't reach the Musike server. Is it running?",
    streamFailed: "YouTube stopped serving this track. Try it again in a moment.",
    offline: "You're offline. Connect to the internet to play music.",
    httpError: (status: number) => `Error ${status}`,
  },

  nowPlaying: {
    title: "Now playing",
    coverOf: (title: string) => `Cover of ${title}`,
    playSomething: "Play something to see it here.",
    startRadio: "Start radio from this track",
    upNext: "Up next",
    tabPlaying: "Playing",
    tabQueue: "Queue",
    panel: "Now playing and queue",
    closePanel: "Close panel",
    backToPlayer: "Back to the player",
    showQueue: "Show queue",
  },

  queue: {
    emptyTitle: "The queue is empty",
    emptyBody: 'Play a song or use "Add to queue" in any track\'s menu.',
    removeX: (title: string) => `Remove ${title} from the queue`,
    remove: "Remove from queue",
    nowPlaying: "Now playing",
    upNext: "Up next",
    clear: "Clear",
    nothingQueued: "Nothing in the queue.",
    radioContinues: "Radio keeps going when it ends.",
    autoRadio: "Autoplay radio",
    autoRadioBody: "Keeps playing similar songs when the queue ends",
  },

  video: {
    maximize: "Maximize video",
    maximizeKey: "Maximize (F)",
    label: (title: string) => `Video: ${title}`,
    fullscreen: "Full screen",
    exitFullscreen: "Exit full screen",
    close: "Close video (Esc)",
  },

  trackMenu: {
    actionsFor: (title: string) => `Actions for ${title}`,
    playNow: "Play now",
    playNext: "Play next",
    addToQueue: "Add to queue",
    startRadio: "Start radio",
    addToPlaylist: "Add to playlist",
    removeFromPlaylist: "Remove from this playlist",
    openYoutube: "Open on YouTube",
  },

  trackList: {
    moreFor: (title: string) => `More options for ${title}`,
    more: "More options",
    title: "Title",
    album: "Album",
    duration: "Duration",
  },

  search: {
    title: "Search",
    inputLabel: "Search songs, artists, videos or paste a YouTube link",
    placeholder: "Songs, artists or a YouTube link",
    clear: "Clear search",
    searchSeparately: (n: number) => `Search ${n} songs separately`,
    resultType: "Result type",
    songs: "Songs",
    videos: "Videos",
    genres: "Genres",
    list: "Search a list",
    youtubeLink: "YouTube link",
    linkError: "Couldn't open this link. Check that the video is public.",
    failed: "Search failed",
    nothingFound: "Nothing found",
    nothingFoundBody: (query: string, otherTab: string) => `No results for "${query}". Try another term or the ${otherTab} tab.`,
    recent: "Recent searches",
    clearRecent: "Clear",
    idleTitle: "What's playing today?",
    idleBody:
      "Search for a song, artist or album. For music videos and live performances, use the Videos tab. You can also paste a YouTube link.",
    exploreGenres: "Browse by genre",
    albums: "Albums",
  },

  batch: {
    title: "Search a list",
    simple: "Simple search",
    label: 'Write the songs separated by commas (or one per line). You can add the artist: "Bohemian Rhapsody Queen".',
    placeholder: "E.g. Bohemian Rhapsody, Hotel California, Smells Like Teen Spirit",
    max: (n: number) => `Up to ${n} at a time`,
    searchN: (n: number) => `Search ${n} songs`,
    search: "Search",
    searching: (done: number, total: number) => `Searching… ${done}/${total}`,
    searched: (query: string) => ` · searched "${query}"`,
    swap: "Swap for another result",
    swapShort: "Swap",
    notFound: "Nothing found",
    failed: "Search failed",
    emptyTitle: "Many songs at once",
    emptyBody:
      "Musike searches for each one and picks the best match. Check them, swap any that came out wrong, then play, favorite or send them all to a playlist.",
  },

  selection: {
    select: (title: string) => `Select ${title}`,
    selectAll: "Select all",
    all: "All",
    countShort: (n: number, total: number) => `${n} of ${total}`,
    count: (n: number, total: number) => `${n} of ${count(total, "song", "songs")}`,
  },

  genre: {
    fallbackName: "Genre",
    viewBy: "View by",
    artistsTab: "Bands & artists",
    artistsShort: "Artists",
    songsTab: "All songs",
    songsShort: "Songs",
    openFailed: "Couldn't open this genre",
    pickArtist: "Pick a band or artist to see their greatest hits.",
    loadMore: "Load more",
    loadingMore: "Finding more artists…",
    endOfList: (n: number) => `End of the list: ${count(n, "artist", "artists")}`,
    noArtists: "No artists listed",
    noArtistsBody: "This genre only has playlists. See all its songs in the other tab.",
    noSongs: "No songs listed",
    noSongsBody: "Try another genre.",
  },

  artist: {
    fallbackName: "Artist",
    label: "Artist",
    hits: "Greatest hits",
    openFailed: "Couldn't open this artist",
    noHits: "No songs found",
    noHitsBody: "YouTube Music doesn't list hits for this artist.",
    albums: "Albums",
    singles: "Singles & EPs",
  },

  album: {
    fallbackName: "Album",
    openFailed: "Couldn't open this album",
    play: (title: string) => `Play ${title}`,
    shuffle: "Shuffle play",
    saveAsPlaylist: "Save as playlist",
    openPlaylist: "Open playlist",
    noTracks: "No playable tracks",
    noTracksBody: "YouTube Music doesn't offer this album's tracks here.",
  },

  settings: {
    title: "Settings",
    appearance: "Appearance",
    theme: "Theme",
    dark: "Dark",
    light: "Light",
    language: "Language",
    engine: "YouTube engine",
    checking: "checking",
    noVersion: "no version",
    stable: "stable",
    nightly: "nightly",
    chipMissing: "Not found",
    chipUpdate: "Update available",
    chipOk: "Up to date",
    engineBody: "It's what fetches audio and video from YouTube. YouTube changes often: if songs stop playing, update it here.",
    channel: "Update channel",
    stableOption: "Stable",
    nightlyOption: "Nightly",
    nightlyBody: "Gets fixes the same day YouTube changes.",
    stableBody: "Tested releases, out every few weeks.",
    latest: (version: string) => ` Latest: ${version}`,
    installing: "Installing",
    updating: "Updating",
    install: "Install yt-dlp",
    toNightly: "Switch to Nightly",
    toStable: "Back to Stable",
    updateTo: (version: string) => `Update to ${version}`,
    check: "Check and update",
    noWinget: "winget isn't available. Install yt-dlp manually and restart Musike.",
    starting: "Starting",
    denoRole: "Solves YouTube's challenges",
    ffmpegRole: "Merges video and audio in HD mode",
    depMissingBefore: "Not found. In a terminal:",
    depMissingAfter: "and restart Musike.",
  },

  customize: {
    accent: "Accent color",
    customColor: "Custom color",
    colors: {
      volt: "Volt",
      mint: "Mint",
      aqua: "Aqua",
      sky: "Sky",
      violet: "Violet",
      pink: "Pink",
      coral: "Coral",
      amber: "Amber",
    },
    layout: "Layout",
    panel: "Now playing panel",
    panelBody: "Docked on the right on wide screens",
    sidebarPlaylists: "Playlists in the sidebar",
    compactSidebar: "Compact sidebar",
    compactSidebarBody: "Icons only, more room for content",
    albumColumn: "Album column in track lists",
    texture: "Background texture",
    home: "Home page",
    homeShortcuts: "Shortcuts",
    reset: "Reset to defaults",
  },

  backup: {
    yourData: "Your data",
    body: "Take your playlists, favorites and history to another computer or to the desktop app: export a file here and import it into the other Musike.",
    export: "Export",
    exporting: "Exporting",
    import: "Import",
    importing: "Importing",
    pickFile: "Choose a Musike backup file",
    created: (playlists: number, favorites: number) =>
      `Backup created: ${count(playlists, "playlist", "playlists")} and ${count(favorites, "favorite", "favorites")}`,
    exportedAt: (date: string, time: string) => `Exported on ${date} at ${time}`,
    playlistsWord: (n: number): string => (n === 1 ? "playlist" : "playlists"),
    favoritesWord: (n: number): string => (n === 1 ? "favorite" : "favorites"),
    tracksIn: (n: number) => count(n, "track", "tracks"),
    inHistory: "in history",
    howToImport: "How to import",
    mergeTitle: "Merge with my library",
    mergeBody: "Adds what's missing. Nothing is deleted; playlists with the same name get the new tracks.",
    replaceTitle: "Replace everything",
    replaceBody: "Deletes the current library and makes it exactly like the backup.",
    applySettings: "Also apply appearance, language and player preferences",
    confirmReplace: 'This deletes your current playlists, favorites and history. Tap "Replace now" to confirm.',
    replace: "Replace",
    replaceNow: "Replace now",
    imported: (parts: string[]) => `Imported: ${parts.join(", ")}`,
    nothingNew: "Nothing new: your library already had everything in this backup",
    newPlaylists: (n: number) => count(n, "new playlist", "new playlists"),
    updatedPlaylists: (n: number) => count(n, "updated playlist", "updated playlists"),
    addedTracks: (n: number) => count(n, "track added", "tracks added"),
    addedFavorites: (n: number) => count(n, "favorite", "favorites"),
    unreadable: "Couldn't read the file. It needs to be a .musike.json backup.",
    notBackup: "This file isn't a Musike backup.",
    newer: "This backup was made by a newer Musike. Update the app to import it.",
  },

  toasts: {
    dismiss: (message: string) => `${message}. Close notice`,
    addedFavorite: "Added to Favorites",
    removedFavorite: "Removed from Favorites",
    allAlreadyFavorites: "They were all in Favorites already",
    addedFavorites: (n: number) => `${n} tracks added to Favorites`,
    playlistCreated: (name: string) => `Playlist "${name}" created`,
    playlistDeleted: "Playlist deleted",
    addedTo: (name: string) => `Added to "${name}"`,
    addedManyTo: (n: number, name: string) => `${n} tracks added to "${name}"`,
    allAlreadyIn: (name: string) => `They were all in "${name}" already`,
    ytdlpMissing: "yt-dlp wasn't found. No song plays without it.",
    ytdlpUpdate: (version: string) => `New yt-dlp version available (${version})`,
  },
};

export type Messages = typeof en;