<?php

namespace MatthiasWeb\RealMediaLibrary\view;

use MatthiasWeb\RealMediaLibrary\Assets;
use MatthiasWeb\RealMediaLibrary\base\UtilsProvider;
// @codeCoverageIgnoreStart
\defined('ABSPATH') or die('No script kiddies please!');
// Avoid direct file request
// @codeCoverageIgnoreEnd
/**
 * LEGACY Language texts for the JavaScript frontend. Later when using TypeScript
 * this class is no longer needed because the __() function is used and
 * automatically extracted.
 * @internal
 */
class Lang
{
    use UtilsProvider;
    /**
     * Get an array of language keys and translations.
     *
     * @param Assets $assets
     * @return array
     */
    public function getItems($assets)
    {
        global $wpdb;
        // Check if already subfolder exist (in Lite Version)
        $liteSubfolderAdditionalText = '';
        if (!$this->isPro()) {
            $table_name = $this->getTableName();
            // phpcs:disable WordPress.DB.PreparedSQL
            $result = $wpdb->get_var("SELECT COUNT(*) FROM {$table_name} WHERE parent > -1");
            // phpcs:enable WordPress.DB.PreparedSQL
            if ($result > 0) {
                $liteSubfolderAdditionalText = \sprintf("\n\n*%s*", \__('Subfolders are only available in the PRO version. But you can now create an unlimited number of folders on the main level (instead of the previous max. 10 folders).', 'real-media-library-lite'));
            }
        }
        return ['noneSelected' => \__('No folder selected', 'real-media-library-lite'), 'selectFolder' => \__('Select folder', 'real-media-library-lite'), 'reloadContent' => \__('Reload content', 'real-media-library-lite'), 'folder' => \__('Folder', 'real-media-library-lite'), 'subfolders' => \__('Subfolders', 'real-media-library-lite'), 'gutenBergBlockSelect' => \__('Please select a folder (media library) in the block settings.', 'real-media-library-lite'), 'warnDelete' => $assets->media_view_strings(\false), 'restrictionsInherits' => \__('New folders inherit this restriction', 'real-media-library-lite'), 'restrictionsSuffix' => \__('The current selected folder has some restrictions:', 'real-media-library-lite'), 'restrictions.par' => \__('You cannot change *parent* folder', 'real-media-library-lite'), 'restrictions.rea' => \__('You cannot *rearrange* subfolders', 'real-media-library-lite'), 'restrictions.cre' => \__('You cannot *create* subfolders', 'real-media-library-lite'), 'restrictions.ins' => \__('You cannot *insert* new files. New files will be moved to Unorganized...', 'real-media-library-lite'), 'restrictions.ren' => \__('You cannot *rename* the folder', 'real-media-library-lite'), 'restrictions.del' => \__('You cannot *delete* the folder', 'real-media-library-lite'), 'restrictions.mov' => \__('You cannot *move* files outside the folder', 'real-media-library-lite'), 'parent' => \__('Parent', 'real-media-library-lite'), 'beforeThisNode' => \__('Before this node', 'real-media-library-lite'), 'beforeThisNodeInfo' => \__('If no next node is given, the element is placed at the end.', 'real-media-library-lite'), 'uploaderUsesLeftTree' => \__('The file is uploaded to the folder where you are currently in.', 'real-media-library-lite'), 'areYouSure' => \__('Are you sure?', 'real-media-library-lite'), 'success' => \__('Success', 'real-media-library-lite'), 'failed' => \__('Failed', 'real-media-library-lite'), 'noEntries' => \__('No entries found', 'real-media-library-lite'), 'deleteConfirm' => \__('Are you sure to delete *{name}*? All files gets moved to Unorganized.', 'real-media-library-lite'), 'deleteMultipleConfirm' => \__('Are you sure to delete *{count} folders*? All files gets moved to Unorganized.', 'real-media-library-lite'), 'ok' => \__('Ok', 'real-media-library-lite'), 'cancel' => \__('Cancel', 'real-media-library-lite'), 'save' => \__('Save', 'real-media-library-lite'), 'back' => \__('Back', 'real-media-library-lite'), 'noFoldersTitle' => \__('No folders found', 'real-media-library-lite'), 'noFoldersDescription' => \__('No folders have been created yet. Just click on the button above to create your first folder.', 'real-media-library-lite'), 'folders' => \__('Folders', 'real-media-library-lite'), 'noSearchResult' => \__('No search results.', 'real-media-library-lite'), 'renameLoadingText' => \__('Renaming to *{name}*...', 'real-media-library-lite'), 'renameSuccess' => \__('Successfully renamed folder to *{name}*', 'real-media-library-lite'), 'addLoadingText' => \__('Creating *{name}*...', 'real-media-library-lite'), 'addSuccess' => \__('Successfully created *{name}*', 'real-media-library-lite'), 'deleteFailedSub' => \__('The folder you try to delete has subfolders.', 'real-media-library-lite'), 'deleteLoadingText' => \__('Deleting *{name}*...', 'real-media-library-lite'), 'deleteSuccess' => \__('Successfully deleted *{name}*', 'real-media-library-lite'), 'deleteMultipleSuccess' => \__('Successfully deleted *{count} folders*', 'real-media-library-lite'), 'sortByManual' => \__('Rearrange *{name}* placement manually', 'real-media-library-lite'), 'sortLoadingText' => \__('Reordering the tree hierarchy...', 'real-media-library-lite'), 'sortedSuccess' => \__('Successfully sorted the tree hierarchy', 'real-media-library-lite'), 'sortLoadingText' => \__('Reorder subfolders of *{name}*...', 'real-media-library-lite'), 'filesRemaining' => \__('{count} files remaining...', 'real-media-library-lite'), 'receiveData' => \__('Receiving data...', 'real-media-library-lite'), 'shortcut' => \__('Shortcut', 'real-media-library-lite'), 'shortcutInfo' => \__('This is a shortcut of a media library file. Shortcuts doesn\'t need any physical storage *(0 kB)*. If you want to change the file itself, you must do this in the original file (for example replace media file through a plugin).
Note also that the fields in the shortcuts can be different to the original file, for example "Title", "Description" or "Caption".', 'real-media-library-lite'), 'orderFilterActive' => \__('In the current view of uploads, filters are active. Please reset them and refresh the view.', 'real-media-library-lite'), 'uploadingCollection' => \__('A collection cannot contain files. Upload moved to Unorganized...', 'real-media-library-lite'), 'uploadingGallery' => \__('A gallery can only contain images. Upload moved to Unorganized...', 'real-media-library-lite'), 'orderLoadingText' => \__('Order content by *{name}*...', 'real-media-library-lite'), 'orderByDnd' => \__('Order content by drag & drop', 'real-media-library-lite'), 'resetOrder' => \__('Reset order', 'real-media-library-lite'), 'applyOrderOnce' => \__('Apply order once...', 'real-media-library-lite'), 'last' => \__('Last', 'real-media-library-lite'), 'deactivateOrderAutomatically' => \__('Deactivate automatic ordering', 'real-media-library-lite'), 'applyOrderAutomatically' => \__('Apply automatic order...', 'real-media-library-lite'), 'latest' => \__('Latest', 'real-media-library-lite'), 'reindexOrder' => \__('Reindex order', 'real-media-library-lite'), 'resetToLastOrder' => \__('Reset to last order', 'real-media-library-lite'), 'allPosts' => \__('All files', 'real-media-library-lite'), 'unorganized' => \__('Unorganized', 'real-media-library-lite'), 'move' => \__('Move {count} files', 'real-media-library-lite'), 'moveOne' => \__('Move one file', 'real-media-library-lite'), 'append' => \__('Copy {count} files', 'real-media-library-lite'), 'appendOne' => \__('Copy one file', 'real-media-library-lite'), 'moveLoadingText' => \__('Moving {count} files...', 'real-media-library-lite'), 'moveLoadingTextOne' => \__('Moving one file...', 'real-media-library-lite'), 'appendLoadingText' => \__('Copying {count} files...', 'real-media-library-lite'), 'appendLoadingTextOne' => \__('Copying one file...', 'real-media-library-lite'), 'moveSuccess' => \__('Successfully moved {count} files', 'real-media-library-lite'), 'moveSuccessOne' => \__('Successfully moved one file', 'real-media-library-lite'), 'appendSuccess' => \__('Successfully copied {count} files', 'real-media-library-lite'), 'appendSuccessOne' => \__('Successfully copied one file', 'real-media-library-lite'), 'moveTip' => \__('Hold any key to create a shortcut', 'real-media-library-lite'), 'appendTip' => \__('Release key to move file', 'real-media-library-lite'), 'creatable0ToolTipTitle' => \__('Click this to create a new folder', 'real-media-library-lite'), 'creatable0ToolTipText' => \__('A folder can contain any file type and collection, but not galleries. If you want to create a subfolder, select a folder and click this button.', 'real-media-library-lite'), 'creatable1ToolTipTitle' => \__('Click this to create a new collection', 'real-media-library-lite'), 'creatable1ToolTipText' => \__('A collection cannot contain files. However, you can create additional collections and *galleries* there. This gallery is only a *gallery data folder*, i.e. they are not automatically visible on the website.

You can create a *visual gallery* by using a shortcode in the Visual Editor on your pages/postings.', 'real-media-library-lite'), 'creatable2ToolTipTitle' => \__('Click this to create a *new gallery data folder*', 'real-media-library-lite'), 'creatable2ToolTipText' => \__('A *gallery data folder* can only contain images. It is easier for you to distinguish where your visual galleries are located.

You can also order the images into *a custom image order* per drag&drop.', 'real-media-library-lite'), 'userSettingsToolTipTitle' => \__('Settings', 'real-media-library-lite'), 'userSettingsToolTipText' => \__('General settings for the current logged in user.', 'real-media-library-lite'), 'lockedToolTipTitle' => \__('Permissions', 'real-media-library-lite'), 'orderToolTipTitle' => \__('Reorder files in this folder', 'real-media-library-lite'), 'orderToolTipText' => \__('Start to reorder the files / images by *title, filename, ID, ...*', 'real-media-library-lite'), 'refreshToolTipTitle' => \__('Refresh', 'real-media-library-lite'), 'refreshToolTipText' => \__('Refreshes the current folder view.', 'real-media-library-lite'), 'renameToolTipTitle' => \__('Rename', 'real-media-library-lite'), 'renameToolTipText' => \__('Rename the current selected folder.', 'real-media-library-lite'), 'trashToolTipTitle' => \__('Delete', 'real-media-library-lite'), 'trashToolTipText' => \__('Delete the current selected folder.', 'real-media-library-lite'), 'trashMultipleToolTipText' => \__('Delete the current selected folders.', 'real-media-library-lite'), 'sortToolTipTitle' => \__('Rearrange', 'real-media-library-lite'), 'sortToolTipText' => \__('Change the hierarchical order of the folders.', 'real-media-library-lite'), 'detailsToolTipTitle' => \__('Folder details', 'real-media-library-lite'), 'detailsToolTipText' => \__('Select a folder and view more details about it.', 'real-media-library-lite'), 'defaultFolderNoneLabel' => \__('Please select a folder to show items.', 'real-media-library-lite'), 'noProductLicense' => \__('Product license not yet activated.', 'real-media-library-lite'), 'enterLicense' => \__('Enter license', 'real-media-library-lite'), 'licenseNoticeDismiss' => \__('Dismiss notice', 'real-media-library-lite'), 'sidebarDetectedTax' => \__('It looks like you have already used another plugin for folders in the media library.', 'real-media-library-lite'), 'sidebarDetectedTaxImport' => \__('Start importing', 'real-media-library-lite'), 'sidebarDetectedTaxDismiss' => \__('Dismiss', 'real-media-library-lite'), 'settingCopyLinkInfoRpm' => \__('Real Media Library creates a virtual folder structure. The URLs of uploads do not change when you move the file. Learn more about <a href="https://devowl.io/knowledge-base/real-media-library-physical-folder-structur/" target="_blank">how to automatically move files to physical folders.</a>', 'real-media-library-lite'), 'licenseIsDev' => \__('Product license not for production use!', 'real-media-library-lite'), 'devLicenseLearnMore' => \__('Learn more', 'real-media-library-lite'), 'devLicenseLink' => \__('https://devowl.io/knowledge-base/license-installation-type/', 'real-media-library-lite'), 'licenseFreeDescription' => \__('Before we start organizing your media, you can *obtain your free license to enjoy all the benefits* of the free version of Real Media Library. Get started now!', 'real-media-library-lite'), 'licenseActivation' => \__('License activation', 'real-media-library-lite'), 'licenseGetFreeActivation' => \__('Get your free license', 'real-media-library-lite'), 'licenseActivationBtnPro' => \__('Activate license & continue', 'real-media-library-lite'), 'licenseActivationBtnFree' => \__('Activate free license & Continue', 'real-media-library-lite'), 'licenseActivationSkipPro' => \__('Continue without regular updates and without any support', 'real-media-library-lite'), 'licenseActivationSkipFree' => \__('Continue without any support and without e.g. discount announcements', 'real-media-library-lite'), 'proRedirect' => \__('You will be redirected to the external website of PRO version. Please confirm to continue!', 'real-media-library-lite'), 'proFeature' => \__('PRO Feature', 'real-media-library-lite'), 'proDismiss' => \__('Hide for 30 days', 'real-media-library-lite'), 'proFooterText' => \__('Thanks for using the free version of Real Media Library.', 'real-media-library-lite'), 'proLearnMore' => \__('Learn more about PRO', 'real-media-library-lite'), 'proBoxTitle' => \__('Get PRO!', 'real-media-library-lite'), 'proBoxOk' => \__('I want to learn more!', 'real-media-library-lite'), 'proBoxCancel' => \__('No, not interested...', 'real-media-library-lite'), 'proFeatures' => ['collections' => ['title' => \__('You like collections?', 'real-media-library-lite'), 'image' => 'collections.jpg', 'description' => \__('Get more organized with different types of folders: Collections and galleries help you to easily recognize where your image galleries are located.', 'real-media-library-lite')], 'order-content' => ['title' => \__('Custom content order?', 'real-media-library-lite'), 'image' => 'order-content.gif', 'description' => \__('Get your folder contents in order and arrange your files according to a criterion (e.g. name descending) or by drag & drop.', 'real-media-library-lite')], 'order-subfolders' => ['title' => \__('Full order control?', 'real-media-library-lite'), 'image' => 'order-subfolder.gif', 'description' => \__('Organize the nodes within your folder tree according to a criterion (e.g. name descending) or by drag & drop.', 'real-media-library-lite')], 'subfolder' => ['title' => \__('Want to create subfolders?', 'real-media-library-lite'), 'image' => 'full-control.gif', 'description' => \__('Subfolders offer you the possibility to bring more structure into your media library. They help you to keep the overview, even if you really have many files in your media library.', 'real-media-library-lite') . $liteSubfolderAdditionalText], 'insert-media-tree-view' => ['title' => \__('Want to switch between folders more comfortably?', 'real-media-library-lite'), 'image' => 'inserting-media-dialog.gif', 'description' => \__('Let the complete folder tree as in your media library also be displayed in this dialog instead of searching each time in the dropdown. It is simply more comfortable!', 'real-media-library-lite')], 'recursive-upload' => ['title' => \__('Want to upload entire folders?', 'real-media-library-lite'), 'description' => \__('With Real Media Library you can upload entire folders using drag and drop. All folders, subfolders and files will be uploaded and displayed in your media library in the same structure. Get PRO to upload folders!', 'real-media-library-lite')]]];
    }
}
