mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-18 05:26:39 +02:00
Use a separate method to retrieve translatable strings
This commit is contained in:
parent
b5d592425d
commit
df12fe3005
|
@ -4106,135 +4106,7 @@ function lng($txt) {
|
|||
|
||||
// English language
|
||||
$tr = [
|
||||
'en' => [
|
||||
'Access denied. IP restriction applicable' => 'Access denied. IP restriction applicable',
|
||||
'Actions' => 'Actions',
|
||||
'Advanced Search' => 'Advanced Search',
|
||||
'AdvancedEditor' => 'Advanced Editor',
|
||||
'already exists' => 'already exists',
|
||||
'AppName' => 'Tiny File Manager',
|
||||
'AppTitle' => 'File Manager',
|
||||
'Archive not created' => 'Archive not created',
|
||||
'Archive not unpacked' => 'Archive not unpacked',
|
||||
'Archive unpacked' => 'Archive unpacked',
|
||||
'Archive' => 'Archive',
|
||||
'Back' => 'Back',
|
||||
'BackUp' => 'Back Up',
|
||||
//'CalculateFolderSize' => 'Calculate folder size',
|
||||
'Cancel' => 'Cancel',
|
||||
'Cannot open file! Aborting download' => 'Cannot open file! Aborting download',
|
||||
'Change' => 'Change',
|
||||
'ChangePermissions' => 'Change Permissions',
|
||||
//'Check Latest Version' => 'Check Latest Version',
|
||||
'Copied from' => 'Copied from',
|
||||
'Copy' => 'Copy',
|
||||
'Copying' => 'Copying',
|
||||
'CopyTo' => 'Copy to',
|
||||
'Create archive?' => 'Create archive?',
|
||||
'Created' => 'Created',
|
||||
'CreateNewItem' => 'Create New Item',
|
||||
'CreateNow' => 'Create Now',
|
||||
'dark' => 'dark',
|
||||
'Delete selected files and folders?' => 'Delete selected files and folders?',
|
||||
'Delete' => 'Delete',
|
||||
'Deleted' => 'Deleted',
|
||||
'DestinationFolder' => 'Destination Folder',
|
||||
'DirectLink' => 'Direct link',
|
||||
'Download' => 'Download',
|
||||
'Edit' => 'Edit',
|
||||
'Error while copying from' => 'Error while copying from',
|
||||
'Error while deleting items' => 'Error while deleting items',
|
||||
'Error while fetching archive info' => 'Error while fetching archive info',
|
||||
'Error while moving from' => 'Error while moving from',
|
||||
'Error while renaming from' => 'Error while renaming from',
|
||||
'ErrorReporting' => 'Error Reporting',
|
||||
'Execute' => 'Execute',
|
||||
'FILE EXTENSION HAS NOT SUPPORTED' => 'FILE EXTENSION HAS NOT SUPPORTED',
|
||||
'File extension is not allowed' => 'File extension is not allowed',
|
||||
'File not found' => 'File not found',
|
||||
'File or folder with this path already exists' => 'File or folder with this path already exists',
|
||||
'File Saved Successfully' => 'File Saved Successfully',
|
||||
'File' => 'File',
|
||||
'Files' => 'Files',
|
||||
'Filter' => 'Filter',
|
||||
'Folder is empty' => 'Folder is empty',
|
||||
'Folder' => 'Folder',
|
||||
//'Free of' => 'Free of',
|
||||
//'FreeOf' => 'free of',
|
||||
'FullSize' => 'Full Size',
|
||||
'Generate new password hash' => 'Generate new password hash',
|
||||
'Generate' => 'Generate',
|
||||
'Group' => 'Group',
|
||||
'Help Documents' => 'Help Documents',
|
||||
'Help' => 'Help',
|
||||
'HideColumns' => 'Hide Perms/Owner columns',
|
||||
'Invalid characters in file name' => 'Invalid characters in file name',
|
||||
'Invalid characters in file or folder name' => 'Invalid characters in file or folder name',
|
||||
'Invalid file or folder name' => 'Invalid file or folder name',
|
||||
'Invalid Token.' => 'Invalid Token.',
|
||||
'InvertSelection' => 'Invert Selection',
|
||||
'ItemName' => 'Item Name',
|
||||
'ItemType' => 'Item Type',
|
||||
'Language' => 'Language',
|
||||
'light' => 'light',
|
||||
'Login failed. Invalid username or password' => 'Login failed. Invalid username or password',
|
||||
'Login' => 'Sign in',
|
||||
'Logout' => 'Sign Out',
|
||||
'Modified' => 'Modified',
|
||||
'Move' => 'Move',
|
||||
'Move' => 'Move',
|
||||
'Moved from' => 'Moved from',
|
||||
'Name' => 'Name',
|
||||
'NewItem' => 'New Item',
|
||||
'NormalEditor' => 'Normal Editor',
|
||||
'not created' => 'not created',
|
||||
'not deleted' => 'not deleted',
|
||||
'not found!' => 'not found!',
|
||||
'Nothing selected' => 'Nothing selected',
|
||||
'Open' => 'Open',
|
||||
'Operations with archives are not available' => 'Operations with archives are not available',
|
||||
'Other' => 'Other',
|
||||
'Owner' => 'Owner',
|
||||
//'PartitionSize' => 'Partition size',
|
||||
'Password' => 'Password',
|
||||
'password_hash not supported, Upgrade PHP version' => 'password_hash not supported, Upgrade PHP version',
|
||||
'Paths must be not equal' => 'Paths must be not equal',
|
||||
'Permissions changed' => 'Permissions changed',
|
||||
'Permissions not changed' => 'Permissions not changed',
|
||||
'Perms' => 'Perms',
|
||||
//'Preview' => 'Preview',
|
||||
'Read' => 'Read',
|
||||
//'RememberMe' => 'Remember Me',
|
||||
'Rename' => 'Rename',
|
||||
'Renamed from' => 'Renamed from',
|
||||
'Report Issue' => 'Report Issue',
|
||||
'Root path' => 'Root path',
|
||||
'Save' => 'Save',
|
||||
'Saved Successfully' => 'Saved Successfully',
|
||||
'Search file in folder and subfolders...' => 'Search file in folder and subfolders...',
|
||||
'Search' => 'Search',
|
||||
'Select folder' => 'Select folder',
|
||||
'SelectAll' => 'Select all',
|
||||
'Selected files and folder deleted' => 'Selected files and folder deleted',
|
||||
'Settings' => 'Settings',
|
||||
'ShowHiddenFiles' => 'Show Hidden Files',
|
||||
'Size' => 'Size',
|
||||
'Source path not defined' => 'Source path not defined',
|
||||
'SourceFolder' => 'Source Folder',
|
||||
'Tar' => 'Tar',
|
||||
'Theme' => 'Theme',
|
||||
'to' => 'to',
|
||||
'UnSelectAll' => 'Unselect all',
|
||||
'UnZip' => 'UnZip',
|
||||
'UnZipToFolder' => 'UnZip to folder',
|
||||
'Upload' => 'Upload',
|
||||
'UploadingFiles' => 'Upload Files',
|
||||
'Username' => 'Username',
|
||||
'Write' => 'Write',
|
||||
'You are logged in' => 'You are logged in',
|
||||
'Zero byte file! Aborting download' => 'Zero byte file! Aborting download',
|
||||
'Zip' => 'Zip',
|
||||
],
|
||||
'en' => getTranslatableStrings(),
|
||||
];
|
||||
|
||||
$i18n = fm_get_translations($tr);
|
||||
|
@ -4246,4 +4118,142 @@ function lng($txt) {
|
|||
else return "$txt";
|
||||
}
|
||||
|
||||
?>
|
||||
/**
|
||||
* Get the translatable strings.
|
||||
*
|
||||
* @return array array keys are the subject of the lng() function, values are the English strings.
|
||||
*/
|
||||
function getTranslatableStrings()
|
||||
{
|
||||
static $strings = [
|
||||
'Access denied. IP restriction applicable' => 'Access denied. IP restriction applicable',
|
||||
'Actions' => 'Actions',
|
||||
'Advanced Search' => 'Advanced Search',
|
||||
'AdvancedEditor' => 'Advanced Editor',
|
||||
'already exists' => 'already exists',
|
||||
'AppName' => 'Tiny File Manager',
|
||||
'AppTitle' => 'File Manager',
|
||||
'Archive not created' => 'Archive not created',
|
||||
'Archive not unpacked' => 'Archive not unpacked',
|
||||
'Archive unpacked' => 'Archive unpacked',
|
||||
'Archive' => 'Archive',
|
||||
'Back' => 'Back',
|
||||
'BackUp' => 'Back Up',
|
||||
//'CalculateFolderSize' => 'Calculate folder size',
|
||||
'Cancel' => 'Cancel',
|
||||
'Cannot open file! Aborting download' => 'Cannot open file! Aborting download',
|
||||
'Change' => 'Change',
|
||||
'ChangePermissions' => 'Change Permissions',
|
||||
//'Check Latest Version' => 'Check Latest Version',
|
||||
'Copied from' => 'Copied from',
|
||||
'Copy' => 'Copy',
|
||||
'Copying' => 'Copying',
|
||||
'CopyTo' => 'Copy to',
|
||||
'Create archive?' => 'Create archive?',
|
||||
'Created' => 'Created',
|
||||
'CreateNewItem' => 'Create New Item',
|
||||
'CreateNow' => 'Create Now',
|
||||
'dark' => 'dark',
|
||||
'Delete selected files and folders?' => 'Delete selected files and folders?',
|
||||
'Delete' => 'Delete',
|
||||
'Deleted' => 'Deleted',
|
||||
'DestinationFolder' => 'Destination Folder',
|
||||
'DirectLink' => 'Direct link',
|
||||
'Download' => 'Download',
|
||||
'Edit' => 'Edit',
|
||||
'Error while copying from' => 'Error while copying from',
|
||||
'Error while deleting items' => 'Error while deleting items',
|
||||
'Error while fetching archive info' => 'Error while fetching archive info',
|
||||
'Error while moving from' => 'Error while moving from',
|
||||
'Error while renaming from' => 'Error while renaming from',
|
||||
'ErrorReporting' => 'Error Reporting',
|
||||
'Execute' => 'Execute',
|
||||
'FILE EXTENSION HAS NOT SUPPORTED' => 'FILE EXTENSION HAS NOT SUPPORTED',
|
||||
'File extension is not allowed' => 'File extension is not allowed',
|
||||
'File not found' => 'File not found',
|
||||
'File or folder with this path already exists' => 'File or folder with this path already exists',
|
||||
'File Saved Successfully' => 'File Saved Successfully',
|
||||
'File' => 'File',
|
||||
'Files' => 'Files',
|
||||
'Filter' => 'Filter',
|
||||
'Folder is empty' => 'Folder is empty',
|
||||
'Folder' => 'Folder',
|
||||
//'Free of' => 'Free of',
|
||||
//'FreeOf' => 'free of',
|
||||
'FullSize' => 'Full Size',
|
||||
'Generate new password hash' => 'Generate new password hash',
|
||||
'Generate' => 'Generate',
|
||||
'Group' => 'Group',
|
||||
'Help Documents' => 'Help Documents',
|
||||
'Help' => 'Help',
|
||||
'HideColumns' => 'Hide Perms/Owner columns',
|
||||
'Invalid characters in file name' => 'Invalid characters in file name',
|
||||
'Invalid characters in file or folder name' => 'Invalid characters in file or folder name',
|
||||
'Invalid file or folder name' => 'Invalid file or folder name',
|
||||
'Invalid Token.' => 'Invalid Token.',
|
||||
'InvertSelection' => 'Invert Selection',
|
||||
'ItemName' => 'Item Name',
|
||||
'ItemType' => 'Item Type',
|
||||
'Language' => 'Language',
|
||||
'light' => 'light',
|
||||
'Login failed. Invalid username or password' => 'Login failed. Invalid username or password',
|
||||
'Login' => 'Sign in',
|
||||
'Logout' => 'Sign Out',
|
||||
'Modified' => 'Modified',
|
||||
'Move' => 'Move',
|
||||
'Move' => 'Move',
|
||||
'Moved from' => 'Moved from',
|
||||
'Name' => 'Name',
|
||||
'NewItem' => 'New Item',
|
||||
'NormalEditor' => 'Normal Editor',
|
||||
'not created' => 'not created',
|
||||
'not deleted' => 'not deleted',
|
||||
'not found!' => 'not found!',
|
||||
'Nothing selected' => 'Nothing selected',
|
||||
'Open' => 'Open',
|
||||
'Operations with archives are not available' => 'Operations with archives are not available',
|
||||
'Other' => 'Other',
|
||||
'Owner' => 'Owner',
|
||||
//'PartitionSize' => 'Partition size',
|
||||
'Password' => 'Password',
|
||||
'password_hash not supported, Upgrade PHP version' => 'password_hash not supported, Upgrade PHP version',
|
||||
'Paths must be not equal' => 'Paths must be not equal',
|
||||
'Permissions changed' => 'Permissions changed',
|
||||
'Permissions not changed' => 'Permissions not changed',
|
||||
'Perms' => 'Perms',
|
||||
//'Preview' => 'Preview',
|
||||
'Read' => 'Read',
|
||||
//'RememberMe' => 'Remember Me',
|
||||
'Rename' => 'Rename',
|
||||
'Renamed from' => 'Renamed from',
|
||||
'Report Issue' => 'Report Issue',
|
||||
'Root path' => 'Root path',
|
||||
'Save' => 'Save',
|
||||
'Saved Successfully' => 'Saved Successfully',
|
||||
'Search file in folder and subfolders...' => 'Search file in folder and subfolders...',
|
||||
'Search' => 'Search',
|
||||
'Select folder' => 'Select folder',
|
||||
'SelectAll' => 'Select all',
|
||||
'Selected files and folder deleted' => 'Selected files and folder deleted',
|
||||
'Settings' => 'Settings',
|
||||
'ShowHiddenFiles' => 'Show Hidden Files',
|
||||
'Size' => 'Size',
|
||||
'Source path not defined' => 'Source path not defined',
|
||||
'SourceFolder' => 'Source Folder',
|
||||
'Tar' => 'Tar',
|
||||
'Theme' => 'Theme',
|
||||
'to' => 'to',
|
||||
'UnSelectAll' => 'Unselect all',
|
||||
'UnZip' => 'UnZip',
|
||||
'UnZipToFolder' => 'UnZip to folder',
|
||||
'Upload' => 'Upload',
|
||||
'UploadingFiles' => 'Upload Files',
|
||||
'Username' => 'Username',
|
||||
'Write' => 'Write',
|
||||
'You are logged in' => 'You are logged in',
|
||||
'Zero byte file! Aborting download' => 'Zero byte file! Aborting download',
|
||||
'Zip' => 'Zip',
|
||||
];
|
||||
|
||||
return $strings;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue