From f65076b93d91fe9718cf9bef37638d64290b9f28 Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Sat, 31 Mar 2012 17:01:04 -0400 Subject: Switch from _() to T_() Even if we move away from php-gettext in the future, it's easy to write a quick T_() as a simple wrapper; it's not so easy to rewrite PHP to allow redeclaration of a function. --- admin/access.php | 8 +-- admin/catalog.php | 38 +++++----- admin/flag.php | 18 ++--- admin/mail.php | 8 +-- admin/modules.php | 20 +++--- admin/shout.php | 4 +- admin/system.php | 2 +- admin/users.php | 36 +++++----- albums.php | 12 ++-- artists.php | 18 ++--- bin/catalog_update.inc | 42 +++++------ bin/delete_disabled.inc | 6 +- bin/fix_filenames.inc | 44 ++++++------ bin/install/add_user.inc | 4 +- bin/install/install_db.inc | 10 +-- bin/install/update_db.inc | 2 +- bin/migrate_config.inc | 8 +-- bin/print_tags.inc | 16 ++--- bin/sort_files.inc | 22 +++--- bin/write_playlists.inc | 12 ++-- bin/write_tags.inc | 8 +-- browse.php | 2 +- democratic.php | 2 +- flag.php | 2 +- install.php | 4 +- lib/class/access.class.php | 36 +++++----- lib/class/album.class.php | 6 +- lib/class/ampacherss.class.php | 12 ++-- lib/class/api.class.php | 16 ++--- lib/class/art.class.php | 2 +- lib/class/artist.class.php | 6 +- lib/class/browse.class.php | 30 ++++---- lib/class/catalog.class.php | 70 +++++++++--------- lib/class/config.class.php | 2 +- lib/class/democratic.class.php | 14 ++-- lib/class/flag.class.php | 14 ++-- lib/class/localplay.class.php | 8 +-- lib/class/playlist_object.abstract.php | 2 +- lib/class/query.class.php | 2 +- lib/class/radio.class.php | 12 ++-- lib/class/random.class.php | 8 +-- lib/class/registration.class.php | 6 +- lib/class/search.class.php | 92 ++++++++++++------------ lib/class/update.class.php | 4 +- lib/class/user.class.php | 10 +-- lib/class/video.class.php | 2 +- lib/general.lib.php | 2 +- lib/install.lib.php | 40 +++++------ lib/javascript/search-data.php | 2 +- lib/preferences.php | 66 ++++++++--------- lib/rating.lib.php | 14 ++-- lib/ui.lib.php | 48 ++++++------- locale/base/TRANSLATIONS | 2 +- login.php | 8 +-- lostpassword.php | 10 +-- modules/localplay/httpq.controller.php | 12 ++-- modules/localplay/mpd.controller.php | 14 ++-- modules/localplay/shoutcast.controller.php | 8 +-- modules/localplay/vlc.controller.php | 12 ++-- playlist.php | 8 +-- preferences.php | 10 +-- radio.php | 2 +- register.php | 20 +++--- search.php | 2 +- server/song.ajax.php | 2 +- server/xml.server.php | 8 +-- shout.php | 2 +- song.php | 4 +- templates/browse_filters.inc.php | 22 +++--- templates/error_page.inc.php | 6 +- templates/footer.inc.php | 4 +- templates/header.inc.php | 10 +-- templates/install_header.inc.php | 12 ++-- templates/list_header.inc.php | 4 +- templates/rightbar.inc.php | 26 +++---- templates/show_access_list.inc.php | 38 +++++----- templates/show_account.inc.php | 12 ++-- templates/show_add_access.inc.php | 38 +++++----- templates/show_add_access_current.inc.php | 24 +++---- templates/show_add_access_local.inc.php | 36 +++++----- templates/show_add_access_rpc.inc.php | 36 +++++----- templates/show_add_catalog.inc.php | 48 ++++++------- templates/show_add_live_stream.inc.php | 16 ++--- templates/show_add_playlist.inc.php | 8 +-- templates/show_add_shout.inc.php | 8 +-- templates/show_add_user.inc.php | 26 +++---- templates/show_adds_catalog.inc.php | 8 +-- templates/show_admin_info.inc.php | 6 +- templates/show_admin_tools.inc.php | 56 +++++++-------- templates/show_album.inc.php | 30 ++++---- templates/show_album_art.inc.php | 8 +-- templates/show_album_row.inc.php | 10 +-- templates/show_albums.inc.php | 38 +++++----- templates/show_all_popular.inc.php | 12 ++-- templates/show_artist.inc.php | 28 ++++---- templates/show_artist_row.inc.php | 8 +-- templates/show_artists.inc.php | 34 ++++----- templates/show_big_art.inc.php | 4 +- templates/show_catalog_row.inc.php | 12 ++-- templates/show_catalogs.inc.php | 26 +++---- templates/show_clean_catalog.inc.php | 6 +- templates/show_confirmation.inc.php | 4 +- templates/show_create_democratic.inc.php | 26 +++---- templates/show_debug.inc.php | 40 +++++------ templates/show_democratic.inc.php | 16 ++--- templates/show_democratic_playlist.inc.php | 36 +++++----- templates/show_denied.inc.php | 12 ++-- templates/show_disabled_songs.inc.php | 28 ++++---- templates/show_duplicate.inc.php | 14 ++-- templates/show_duplicates.inc.php | 36 +++++----- templates/show_dynamic.inc.php | 22 +++--- templates/show_edit_access.inc.php | 36 +++++----- templates/show_edit_album.inc.php | 10 +-- templates/show_edit_album_row.inc.php | 4 +- templates/show_edit_artist.inc.php | 8 +-- templates/show_edit_artist_row.inc.php | 2 +- templates/show_edit_catalog.inc.php | 36 +++++----- templates/show_edit_live_stream_row.inc.php | 12 ++-- templates/show_edit_playlist_row.inc.php | 6 +- templates/show_edit_playlist_song_row.inc.php | 2 +- templates/show_edit_playlist_title.inc.php | 6 +- templates/show_edit_shout.inc.php | 10 +-- templates/show_edit_smartplaylist_row.inc.php | 6 +- templates/show_edit_smartplaylist_title.inc.php | 6 +- templates/show_edit_song.inc.php | 24 +++---- templates/show_edit_song_row.inc.php | 2 +- templates/show_edit_user.inc.php | 46 ++++++------ templates/show_export.inc.php | 10 +-- templates/show_flag_row.inc.php | 4 +- templates/show_flagged.inc.php | 26 +++---- templates/show_gather_art.inc.php | 8 +-- templates/show_get_albumart.inc.php | 12 ++-- templates/show_import_playlist.inc.php | 8 +-- templates/show_index.inc.php | 2 +- templates/show_install.inc.php | 30 ++++---- templates/show_install_account.inc.php | 18 ++--- templates/show_install_check.inc.php | 60 ++++++++-------- templates/show_install_config.inc.php | 32 ++++----- templates/show_install_lang.inc.php | 6 +- templates/show_ip_history.inc.php | 14 ++-- templates/show_live_stream.inc.php | 4 +- templates/show_live_stream_row.inc.php | 6 +- templates/show_live_streams.inc.php | 26 +++---- templates/show_localplay_add_instance.inc.php | 4 +- templates/show_localplay_control.inc.php | 10 +-- templates/show_localplay_controllers.inc.php | 22 +++--- templates/show_localplay_edit_instance.inc.php | 4 +- templates/show_localplay_instances.inc.php | 8 +-- templates/show_localplay_playlist.inc.php | 16 ++--- templates/show_localplay_status.inc.php | 18 ++--- templates/show_login_form.inc.php | 16 ++--- templates/show_lostpassword_form.inc.php | 8 +-- templates/show_lyrics.inc.php | 4 +- templates/show_lyrics_song.inc.php | 6 +- templates/show_mail_users.inc.php | 42 +++++------ templates/show_manage_catalogs.inc.php | 20 +++--- templates/show_manage_democratic.inc.php | 24 +++---- templates/show_manage_shoutbox.inc.php | 26 +++---- templates/show_newest.inc.php | 2 +- templates/show_now_playing.inc.php | 2 +- templates/show_now_playing_row.inc.php | 16 ++--- templates/show_object_rating.inc.php | 6 +- templates/show_object_rating_static.inc.php | 8 +-- templates/show_objects.inc.php | 2 +- templates/show_playlist.inc.php | 22 +++--- templates/show_playlist_row.inc.php | 10 +-- templates/show_playlist_song_row.inc.php | 8 +-- templates/show_playlist_songs.inc.php | 36 +++++----- templates/show_playlist_title.inc.php | 2 +- templates/show_playlists.inc.php | 22 +++--- templates/show_playtype_switch.inc.php | 8 +-- templates/show_plugins.inc.php | 26 +++---- templates/show_popular.inc.php | 2 +- templates/show_preference_admin.inc.php | 20 +++--- templates/show_preference_box.inc.php | 30 ++++---- templates/show_preferences.inc.php | 4 +- templates/show_random.inc.php | 22 +++--- templates/show_random_albums.inc.php | 6 +- templates/show_recently_played.inc.php | 32 ++++----- templates/show_recommended_artists.inc.php | 36 +++++----- templates/show_registration_confirmation.inc.php | 8 +-- templates/show_rename_artist.inc.php | 10 +-- templates/show_rules.inc.php | 10 +-- templates/show_run_add_catalog.inc.php | 4 +- templates/show_search.inc.php | 18 ++--- templates/show_search_bar.inc.php | 14 ++-- templates/show_search_options.inc.php | 10 +-- templates/show_shout_row.inc.php | 4 +- templates/show_shoutbox.inc.php | 4 +- templates/show_smartplaylist.inc.php | 16 ++--- templates/show_smartplaylist_row.inc.php | 8 +-- templates/show_smartplaylist_title.inc.php | 2 +- templates/show_smartplaylists.inc.php | 18 ++--- templates/show_song.inc.php | 16 ++--- templates/show_song_row.inc.php | 12 ++-- templates/show_songs.inc.php | 38 +++++----- templates/show_stats.inc.php | 38 +++++----- templates/show_stats_popular.inc.php | 4 +- templates/show_tagcloud.inc.php | 2 +- templates/show_test.inc.php | 64 ++++++++--------- templates/show_test_config.inc.php | 2 +- templates/show_update_items.inc.php | 6 +- templates/show_user.inc.php | 18 ++--- templates/show_user_activate.inc.php | 12 ++-- templates/show_user_preferences.inc.php | 10 +-- templates/show_user_recommendations.inc.php | 12 ++-- templates/show_user_registration.inc.php | 26 +++---- templates/show_user_row.inc.php | 10 +-- templates/show_user_stats.inc.php | 12 ++-- templates/show_users.inc.php | 32 ++++----- templates/show_verify_catalog.inc.php | 8 +-- templates/show_video_row.inc.php | 4 +- templates/show_videos.inc.php | 30 ++++---- templates/sidebar.inc.php | 12 ++-- templates/sidebar_admin.inc.php | 32 ++++----- templates/sidebar_home.inc.php | 56 +++++++-------- templates/sidebar_localplay.inc.php | 20 +++--- templates/sidebar_modules.inc.php | 20 +++--- templates/sidebar_preferences.inc.php | 6 +- update.php | 12 ++-- 220 files changed, 1782 insertions(+), 1782 deletions(-) diff --git a/admin/access.php b/admin/access.php index cf570524..154d277a 100644 --- a/admin/access.php +++ b/admin/access.php @@ -43,12 +43,12 @@ switch ($_REQUEST['action']) { } Access::delete($_REQUEST['access_id']); $url = Config::get('web_path') . '/admin/access.php'; - show_confirmation(_('Deleted'),_('Your Access List Entry has been removed'),$url); + show_confirmation(T_('Deleted'), T_('Your Access List Entry has been removed'),$url); break; case 'show_delete_record': if (Config::get('demo_mode')) { break; } $access = new Access($_GET['access_id']); - show_confirmation(_('Deletion Request'),_('Are you sure you want to permanently delete') . ' ' . $access->name, + show_confirmation(T_('Deletion Request'), T_('Are you sure you want to permanently delete') . ' ' . $access->name, 'admin/access.php?action=delete_record&access_id=' . $access->id,1,'delete_access'); break; case 'add_host': @@ -107,7 +107,7 @@ switch ($_REQUEST['action']) { if (!Error::occurred()) { $url = Config::get('web_path') . '/admin/access.php'; - show_confirmation(_('Added'),_('Your new Access Control List(s) have been created'),$url); + show_confirmation(T_('Added'), T_('Your new Access Control List(s) have been created'),$url); } else { switch ($_GET['method']) { @@ -127,7 +127,7 @@ switch ($_REQUEST['action']) { $access = new Access($_REQUEST['access_id']); $access->update($_POST); if (!Error::occurred()) { - show_confirmation(_('Updated'),_('Access List Entry updated'), Config::get('web_path').'/admin/access.php'); + show_confirmation(T_('Updated'), T_('Access List Entry updated'), Config::get('web_path').'/admin/access.php'); } else { $access->format(); diff --git a/admin/catalog.php b/admin/catalog.php index 1a847c8d..62c8657b 100644 --- a/admin/catalog.php +++ b/admin/catalog.php @@ -57,7 +57,7 @@ switch ($_REQUEST['action']) { } } $url = Config::get('web_path') . '/admin/catalog.php'; - $title = _('Catalog Updated'); + $title = T_('Catalog Updated'); $body = ''; show_confirmation($title,$body,$url); toggle_visible('ajax-loading'); @@ -77,7 +77,7 @@ switch ($_REQUEST['action']) { } } $url = Config::get('web_path') . '/admin/catalog.php'; - $title = _('Catalog Updated'); + $title = T_('Catalog Updated'); $body = ''; show_confirmation($title,$body,$url); toggle_visible('ajax-loading'); @@ -103,7 +103,7 @@ switch ($_REQUEST['action']) { } Catalog::optimize_tables(); $url = Config::get('web_path') . '/admin/catalog.php'; - $title = _('Catalog Updated'); + $title = T_('Catalog Updated'); $body = ''; show_confirmation($title,$body,$url); toggle_visible('ajax-loading'); @@ -120,13 +120,13 @@ switch ($_REQUEST['action']) { /* Delete the sucker, we don't need to check perms as thats done above */ Catalog::delete($_GET['catalog_id']); $next_url = Config::get('web_path') . '/admin/catalog.php'; - show_confirmation(_('Catalog Deleted'),_('The Catalog and all associated records have been deleted'),$next_url); + show_confirmation(T_('Catalog Deleted'), T_('The Catalog and all associated records have been deleted'),$next_url); break; case 'show_delete_catalog': $catalog_id = scrub_in($_GET['catalog_id']); $next_url = Config::get('web_path') . '/admin/catalog.php?action=delete_catalog&catalog_id=' . scrub_out($catalog_id); - show_confirmation(_('Catalog Delete'),_('Confirm Deletion Request'),$next_url,1,'delete_catalog'); + show_confirmation(T_('Catalog Delete'), T_('Confirm Deletion Request'),$next_url,1,'delete_catalog'); break; case 'remove_disabled': if (conf('demo_mode')) { break; } @@ -138,7 +138,7 @@ switch ($_REQUEST['action']) { $body = ngettext('Song Removed', 'Songs Removed', count($song)); } else { - $body = _('No Songs Removed'); + $body = T_('No Songs Removed'); } $url = Config::get('web_path') . '/admin/catalog.php'; $title = ngettext('Disabled Song Processed','Disabled Songs Processed',count($song)); @@ -163,7 +163,7 @@ switch ($_REQUEST['action']) { } $url = Config::get('web_path') . '/admin/catalog.php'; - $title = _('Catalog Cleaned'); + $title = T_('Catalog Cleaned'); $body = ''; show_confirmation($title,$body,$url); toggle_visible('ajax-loading'); @@ -176,7 +176,7 @@ switch ($_REQUEST['action']) { Catalog::update_settings($_POST); $url = Config::get('web_path') . '/admin/catalog.php'; - $title = _('Catalog Updated'); + $title = T_('Catalog Updated'); $body = ''; show_confirmation($title,$body,$url); break; @@ -207,14 +207,14 @@ switch ($_REQUEST['action']) { ob_end_flush(); if (!strlen($_POST['path']) || !strlen($_POST['name'])) { - Error::add('general',_('Error: Name and path not specified')); + Error::add('general', T_('Error: Name and path not specified')); } if (substr($_POST['path'],0,7) != 'http://' && $_POST['type'] == 'remote') { - Error::add('general',_('Error: Remote selected, but path is not a URL')); + Error::add('general', T_('Error: Remote selected, but path is not a URL')); } if ($POST['type'] == 'remote' AND (!strlen($POST['remote_username']) OR !strlen($POST['remote_password']))) { - Error::add('general',_('Error: Username and Password Required for Remote Catalogs')); + Error::add('general', T_('Error: Username and Password Required for Remote Catalogs')); } if (!Core::form_verify('add_catalog','post')) { @@ -224,7 +224,7 @@ switch ($_REQUEST['action']) { // Make sure that there isn't a catalog with a directory above this one if (Catalog::get_from_path($_POST['path'])) { - Error::add('general',_('Error: Defined Path is inside an existing catalog')); + Error::add('general', T_('Error: Defined Path is inside an existing catalog')); } // If an error hasn't occured @@ -242,8 +242,8 @@ switch ($_REQUEST['action']) { // Run our initial add $catalog->run_add($_POST); - show_box_top(_('Catalog Created'), 'box box_catalog_created'); - echo "

" . _('Catalog Created') . "

"; + show_box_top(T_('Catalog Created'), 'box box_catalog_created'); + echo "

" . T_('Catalog Created') . "

"; Error::display('general'); Error::display('catalog_add'); show_box_bottom(); @@ -260,7 +260,7 @@ switch ($_REQUEST['action']) { Catalog::clear_stats(); $url = Config::get('web_path') . '/admin/catalog.php'; - $title = _('Catalog statistics cleared'); + $title = T_('Catalog statistics cleared'); $body = ''; show_confirmation($title,$body,$url); break; @@ -274,7 +274,7 @@ switch ($_REQUEST['action']) { case 'clear_now_playing': if (Config::get('demo_mode')) { access_denied(); break; } Stream::clear_now_playing(); - show_confirmation(_('Now Playing Cleared'),_('All now playing data has been cleared'),Config::get('web_path') . '/admin/catalog.php'); + show_confirmation(T_('Now Playing Cleared'), T_('All now playing data has been cleared'),Config::get('web_path') . '/admin/catalog.php'); break; case 'show_disabled': /* Stop the demo hippies */ @@ -285,7 +285,7 @@ switch ($_REQUEST['action']) { require (conf('prefix') . '/templates/show_disabled_songs.inc.php'); } else { - echo "
" . _('No Disabled songs found') . "
"; + echo "
" . T_('No Disabled songs found') . "
"; } break; case 'show_delete_catalog': @@ -294,7 +294,7 @@ switch ($_REQUEST['action']) { $catalog = new Catalog($_REQUEST['catalog_id']); $nexturl = Config::get('web_path') . '/admin/catalog.php?action=delete_catalog&catalog_id=' . scrub_out($_REQUEST['catalog_id']); - show_confirmation(_('Delete Catalog'),_('Do you really want to delete this catalog?') . " -- $catalog->name ($catalog->path)",$nexturl,1); + show_confirmation(T_('Delete Catalog'), T_('Do you really want to delete this catalog?') . " -- $catalog->name ($catalog->path)",$nexturl,1); break; case 'show_customize_catalog': $catalog = new Catalog($_REQUEST['catalog_id']); @@ -314,7 +314,7 @@ switch ($_REQUEST['action']) { $catalog->get_art('',1); } $url = Config::get('web_path') . '/admin/catalog.php'; - $title = _('Album Art Search Finished'); + $title = T_('Album Art Search Finished'); $body = ''; show_confirmation($title,$body,$url); break; diff --git a/admin/flag.php b/admin/flag.php index d0201302..6bd87729 100644 --- a/admin/flag.php +++ b/admin/flag.php @@ -84,7 +84,7 @@ switch ($_REQUEST['action']) { if (isset($cleaned['artist']) || isset($cleaned['album'])) { $_SESSION['source'] = Config::get('web_path') . '/index.php'; } - show_confirmation(_('Song Updated'),_('The requested song has been updated'),$_SESSION['source']); + show_confirmation(T_('Song Updated'), T_('The requested song has been updated'),$_SESSION['source']); break; // Show the page for editing a full album case 'show_edit_album': @@ -126,7 +126,7 @@ switch ($_REQUEST['action']) { // Clean out the old album $catalog->clean_albums(); - show_confirmation(_('Album Updated'),'',Config::get('web_path') . '/admin/index.php'); + show_confirmation(T_('Album Updated'),'',Config::get('web_path') . '/admin/index.php'); break; // Show the page for editing a full artist @@ -168,7 +168,7 @@ switch ($_REQUEST['action']) { // Clean out the old artist(s) $catalog->clean_artists(); - show_confirmation(_('Artist Updated'),'',Config::get('web_path') . '/admin/index.php'); + show_confirmation(T_('Artist Updated'),'',Config::get('web_path') . '/admin/index.php'); break; /* Done by 'Select' code passes array of song ids */ @@ -229,7 +229,7 @@ switch ($_REQUEST['action']) { } // end foreach songs // Show a confirmation that this worked - show_confirmation(_('Songs Updated'),'',return_referer()); + show_confirmation(T_('Songs Updated'),'',return_referer()); break; case 'reject_flag': $flag_id = scrub_in($_REQUEST['flag_id']); @@ -237,8 +237,8 @@ switch ($_REQUEST['action']) { $flag->delete_flag(); $flag->format_name(); $url = return_referer(); - $title = _('Flag Removed'); - $body = _('Flag Removed from') . " " . $flag->name; + $title = T_('Flag Removed'); + $body = T_('Flag Removed from') . " " . $flag->name; show_confirmation($title,$body,$url); break; case 'reject_flags': @@ -253,7 +253,7 @@ switch ($_REQUEST['action']) { $flag->approve(); } } // end foreach flags - $title = _('Flags Updated'); + $title = T_('Flags Updated'); show_confirmation($title,'',return_referer()); break; case 'show_edit_song': @@ -272,7 +272,7 @@ switch ($_REQUEST['action']) { $song_obj->update_enabled(0,$song_id); } // end foreach } // end else - show_confirmation(_('Songs Disabled'),_('The requested song(s) have been disabled'),return_referer()); + show_confirmation(T_('Songs Disabled'), T_('The requested song(s) have been disabled'),return_referer()); break; case 'enabled': $song_obj = new Song(); @@ -283,7 +283,7 @@ switch ($_REQUEST['action']) { $song_obj->update_enabled(1,$song_id); } // end foreach } // end else - show_confirmation(_('Songs Enabled'),_('The requested song(s) have been enabled'),return_referer()); + show_confirmation(T_('Songs Enabled'), T_('The requested song(s) have been enabled'),return_referer()); break; case 'show_disabled': $disabled = Flag::get_disabled(); diff --git a/admin/mail.php b/admin/mail.php index 29fb800c..595abab7 100644 --- a/admin/mail.php +++ b/admin/mail.php @@ -64,12 +64,12 @@ switch ($_REQUEST['action']) { } if($mailer->send_to_group($_REQUEST['to'])) { - $title = _('E-mail Sent'); - $body = _('Your E-mail was successfully sent.'); + $title = T_('E-mail Sent'); + $body = T_('Your E-mail was successfully sent.'); } else { - $title = _('E-mail Not Sent'); - $body = _('Your E-mail was not sent.'); + $title = T_('E-mail Not Sent'); + $body = T_('Your E-mail was not sent.'); } $url = Config::get('web_path') . '/admin/mail.php'; show_confirmation($title,$body,$url); diff --git a/admin/modules.php b/admin/modules.php index 846e7b2d..5ca03eb2 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -41,7 +41,7 @@ switch ($_REQUEST['action']) { case 'install_localplay': $localplay = new Localplay($_REQUEST['type']); if (!$localplay->player_loaded()) { - Error::add('general',_('Install Failed, Controller Error')); + Error::add('general', T_('Install Failed, Controller Error')); Error::display('general'); break; } @@ -59,7 +59,7 @@ switch ($_REQUEST['action']) { case 'confirm_uninstall_localplay': $type = scrub_in($_REQUEST['type']); $url = Config::get('web_path') . '/admin/modules.php?action=uninstall_localplay&type=' . $type; - $title = _('Are you sure you want to remove this plugin?'); + $title = T_('Are you sure you want to remove this plugin?'); $body = ''; show_confirmation($title,$body,$url,1); break; @@ -71,7 +71,7 @@ switch ($_REQUEST['action']) { /* Show Confirmation */ $url = Config::get('web_path') . '/admin/modules.php?action=show_localplay'; - $title = _('Plugin Deactivated'); + $title = T_('Plugin Deactivated'); $body = ''; show_confirmation($title,$body,$url); break; @@ -86,7 +86,7 @@ switch ($_REQUEST['action']) { if (!$plugin->install()) { debug_event('plugins','Error: Plugin Install Failed, ' . $_REQUEST['plugin'],'1'); $url = Config::get('web_path') . '/admin/modules.php?action=show_plugins'; - $title = _('Unable to Install Plugin'); + $title = T_('Unable to Install Plugin'); $body = ''; show_confirmation($title,$body,$url); break; @@ -97,14 +97,14 @@ switch ($_REQUEST['action']) { /* Show Confirmation */ $url = Config::get('web_path') . '/admin/modules.php?action=show_plugins'; - $title = _('Plugin Activated'); + $title = T_('Plugin Activated'); $body = ''; show_confirmation($title,$body,$url); break; case 'confirm_uninstall_plugin': $plugin = scrub_in($_REQUEST['plugin']); $url = Config::get('web_path') . '/admin/modules.php?action=uninstall_plugin&plugin=' . $plugin; - $title = _('Are you sure you want to remove this plugin?'); + $title = T_('Are you sure you want to remove this plugin?'); $body = ''; show_confirmation($title,$body,$url,1); break; @@ -123,7 +123,7 @@ switch ($_REQUEST['action']) { /* Show Confirmation */ $url = Config::get('web_path') . '/admin/modules.php?action=show_plugins'; - $title = _('Plugin Deactivated'); + $title = T_('Plugin Deactivated'); $body = ''; show_confirmation($title,$body,$url); break; @@ -138,19 +138,19 @@ switch ($_REQUEST['action']) { $plugin->upgrade(); User::rebuild_all_preferences(); $url = Config::get('web_path') . '/admin/modules.php?action=show_plugins'; - $title = _('Plugin Upgraded'); + $title = T_('Plugin Upgraded'); $body = ''; show_confirmation($title, $body, $url); break; case 'show_plugins': $plugins = Plugin::get_plugins(); - show_box_top(_('Plugins'), 'box box_localplay_plugins'); + show_box_top(T_('Plugins'), 'box box_localplay_plugins'); require_once Config::get('prefix') . '/templates/show_plugins.inc.php'; show_box_bottom(); break; case 'show_localplay': $controllers = Localplay::get_controllers(); - show_box_top(_('Localplay Controllers'), 'box box_localplay_controllers'); + show_box_top(T_('Localplay Controllers'), 'box box_localplay_controllers'); require_once Config::get('prefix') . '/templates/show_localplay_controllers.inc.php'; show_box_bottom(); break; diff --git a/admin/shout.php b/admin/shout.php index 6140b901..53bd8338 100644 --- a/admin/shout.php +++ b/admin/shout.php @@ -40,7 +40,7 @@ switch ($_REQUEST['action']) { case 'edit_shout': $shout_id = $_POST['shout_id']; $update = shoutBox::update($_POST); - show_confirmation(_('Shoutbox Post Updated'),'',Config::get('web_path').'/admin/shout.php'); + show_confirmation(T_('Shoutbox Post Updated'),'',Config::get('web_path').'/admin/shout.php'); break; case 'show_edit': $shout = new shoutBox($_REQUEST['shout_id']); @@ -52,7 +52,7 @@ switch ($_REQUEST['action']) { break; case 'delete': $shout_id = shoutBox::delete($_REQUEST['shout_id']); - show_confirmation(_('Shoutbox Post Deleted'),'',Config::get('web_path').'/admin/shout.php'); + show_confirmation(T_('Shoutbox Post Deleted'),'',Config::get('web_path').'/admin/shout.php'); break; default: $browse = new Browse(); diff --git a/admin/system.php b/admin/system.php index eefc1d7f..d3a2f816 100644 --- a/admin/system.php +++ b/admin/system.php @@ -51,7 +51,7 @@ switch ($_REQUEST['action']) { break; case 'reset_db_charset': Dba::reset_db_charset(); - show_confirmation(_('Database Charset Updated'),_('Your Database and associated tables have been updated to match your currently configured charset'), Config::get('web_path').'/admin/system.php?action=show_debug'); + show_confirmation(T_('Database Charset Updated'), T_('Your Database and associated tables have been updated to match your currently configured charset'), Config::get('web_path').'/admin/system.php?action=show_debug'); break; case 'show_debug': $configuration = Config::get_all(); diff --git a/admin/users.php b/admin/users.php index 16e87351..7c650193 100644 --- a/admin/users.php +++ b/admin/users.php @@ -59,10 +59,10 @@ switch ($_REQUEST['action']) { /* Verify Input */ if (empty($username)) { - Error::add('username',_("Error Username Required")); + Error::add('username', T_("Error Username Required")); } if ($pass1 !== $pass2 && !empty($pass1)) { - Error::add('password',_("Error Passwords don't match")); + Error::add('password', T_("Error Passwords don't match")); } /* If we've got an error then break! */ @@ -87,7 +87,7 @@ switch ($_REQUEST['action']) { $client->update_password($pass1); } - show_confirmation(_('User Updated'), $client->fullname . "(" . $client->username . ")" . _('updated'), Config::get('web_path'). '/admin/users.php'); + show_confirmation(T_('User Updated'), $client->fullname . "(" . $client->username . ")" . T_('updated'), Config::get('web_path'). '/admin/users.php'); break; case 'add_user': if (Config::get('demo_mode')) { break; } @@ -105,23 +105,23 @@ switch ($_REQUEST['action']) { $pass2 = $_POST['password_2']; if ($pass1 !== $pass2 || !strlen($pass1)) { - Error::add('password',_("Error Passwords don't match")); + Error::add('password', T_("Error Passwords don't match")); } if (empty($username)) { - Error::add('username',_('Error Username Required')); + Error::add('username', T_('Error Username Required')); } /* make sure the username doesn't already exist */ if (!User::check_username($username)) { - Error::add('username',_('Error Username already exists')); + Error::add('username', T_('Error Username already exists')); } if (!Error::occurred()) { /* Attempt to create the user */ $user_id = User::create($username, $fullname, $email, $pass1, $access); if (!$user_id) { - Error::add('general',_("Error: Insert Failed")); + Error::add('general', T_("Error: Insert Failed")); } } // if no errors @@ -129,25 +129,25 @@ switch ($_REQUEST['action']) { $_REQUEST['action'] = 'show_add_user'; break; } - if ($access == 5){ $access = _('Guest');} - elseif ($access == 25){ $access = _('User');} - elseif ($access == 100){ $access = _('Admin');} + if ($access == 5){ $access = T_('Guest');} + elseif ($access == 25){ $access = T_('User');} + elseif ($access == 100){ $access = T_('Admin');} /* HINT: %1 Username, %2 Access num */ - show_confirmation(_('New User Added'),sprintf(_('%1$s has been created with an access level of %2$s'), $username, $access), Config::get('web_path').'/admin/users.php'); + show_confirmation(T_('New User Added'),sprintf(T_('%1$s has been created with an access level of %2$s'), $username, $access), Config::get('web_path').'/admin/users.php'); break; case 'enable': $client = new User($_REQUEST['user_id']); $client->enable(); - show_confirmation(_('User Enabled'),$client->fullname . ' (' . $client->username . ')', Config::get('web_path'). '/admin/users.php'); + show_confirmation(T_('User Enabled'),$client->fullname . ' (' . $client->username . ')', Config::get('web_path'). '/admin/users.php'); break; case 'disable': $client = new User($_REQUEST['user_id']); if ($client->disable()) { - show_confirmation(_('User Disabled'),$client->fullname . ' (' . $client->username . ')', Config::get('web_path'). '/admin/users.php'); + show_confirmation(T_('User Disabled'),$client->fullname . ' (' . $client->username . ')', Config::get('web_path'). '/admin/users.php'); } else { - show_confirmation(_('Error'),_('Unable to Disabled last Administrator'), Config::get('web_path').'/admin/users.php'); + show_confirmation(T_('Error'), T_('Unable to Disabled last Administrator'), Config::get('web_path').'/admin/users.php'); } break; case 'show_edit': @@ -163,17 +163,17 @@ switch ($_REQUEST['action']) { } $client = new User($_REQUEST['user_id']); if ($client->delete()) { - show_confirmation(_('User Deleted'), sprintf(_('%s has been Deleted'), $client->username), Config::get('web_path'). "/admin/users.php"); + show_confirmation(T_('User Deleted'), sprintf(T_('%s has been Deleted'), $client->username), Config::get('web_path'). "/admin/users.php"); } else { - show_confirmation(_('Delete Error'), _("Unable to delete last Admin User"), Config::get('web_path')."/admin/users.php"); + show_confirmation(T_('Delete Error'), T_("Unable to delete last Admin User"), Config::get('web_path')."/admin/users.php"); } break; case 'delete': if (Config::get('demo_mode')) { break; } $client = new User($_REQUEST['user_id']); - show_confirmation(_('Deletion Request'), - sprintf(_('Are you sure you want to permanently delete %s?'), $client->fullname), + show_confirmation(T_('Deletion Request'), + sprintf(T_('Are you sure you want to permanently delete %s?'), $client->fullname), Config::get('web_path')."/admin/users.php?action=confirm_delete&user_id=" . $_REQUEST['user_id'],1,'delete_user'); break; /* Show IP History for the Specified User */ diff --git a/albums.php b/albums.php index 933873e0..68f0ebd0 100644 --- a/albums.php +++ b/albums.php @@ -36,14 +36,14 @@ switch ($_REQUEST['action']) { if (!$GLOBALS['user']->has_access('75')) { access_denied(); } $art = new Art($_GET['album_id'],'album'); $art->reset(); - show_confirmation(_('Album Art Cleared'),_('Album Art information has been removed from the database'),"/albums.php?action=show&album=" . $art->uid); + show_confirmation(T_('Album Art Cleared'), T_('Album Art information has been removed from the database'),"/albums.php?action=show&album=" . $art->uid); break; // Upload album art case 'upload_art': // we didn't find anything if (empty($_FILES['file']['tmp_name'])) { - show_confirmation(_('Album Art Not Located'),_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id); + show_confirmation(T_('Album Art Not Located'), T_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id); break; } @@ -56,11 +56,11 @@ switch ($_REQUEST['action']) { if ($image_data) { $art = new Art($album->id,'album'); $art->insert($image_data,$_FILES['file']['type']); - show_confirmation(_('Album Art Inserted'),'',"/albums.php?action=show&album=" . $album->id); + show_confirmation(T_('Album Art Inserted'),'',"/albums.php?action=show&album=" . $album->id); } // Else it failed else { - show_confirmation(_('Album Art Not Located'),_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id); + show_confirmation(T_('Album Art Not Located'), T_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id); } break; @@ -84,7 +84,7 @@ switch ($_REQUEST['action']) { if ($image_data) { $art->insert($image_data,$upload['0']['mime']); - show_confirmation(_('Album Art Inserted'),'',"/albums.php?action=show&album=" . $_REQUEST['album_id']); + show_confirmation(T_('Album Art Inserted'),'',"/albums.php?action=show&album=" . $_REQUEST['album_id']); break; } // if image data @@ -133,7 +133,7 @@ switch ($_REQUEST['action']) { } // Else nothing else { - show_confirmation(_('Album Art Not Located'),_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id); + show_confirmation(T_('Album Art Not Located'), T_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id); } $albumname = $album->name; diff --git a/artists.php b/artists.php index 7f57df4c..c7a75b73 100644 --- a/artists.php +++ b/artists.php @@ -75,20 +75,20 @@ switch($_REQUEST['action']) { $that_artist->merge($artist->id); $count++; } else - $GLOBALS['error']->add_error('general', sprintf(_('Error: No such artist \'%s\''), $artist_id)); + $GLOBALS['error']->add_error('general', sprintf(T_('Error: No such artist \'%s\''), $artist_id)); } else { - $GLOBALS['error']->add_error('general', sprintf(_('Error: \'%s\' is not a valid ID'), $artist_id)); + $GLOBALS['error']->add_error('general', sprintf(T_('Error: \'%s\' is not a valid ID'), $artist_id)); } } else - $GLOBALS['error']->add_error('general', sprintf(_('Error: No such artist \'%s\''), $_REQUEST['artist'])); + $GLOBALS['error']->add_error('general', sprintf(T_('Error: No such artist \'%s\''), $_REQUEST['artist'])); } else { - $GLOBALS['error']->add_error('general',_("Error: Errenous request")); + $GLOBALS['error']->add_error('general', T_("Error: Errenous request")); } if ($count > 0) { show_confirmation ( - _('Renamed artist(s)'), - sprintf(_('%1$s artists have been merged with %2$s'), $count, $artist->name), + T_('Renamed artist(s)'), + sprintf(T_('%1$s artists have been merged with %2$s'), $count, $artist->name), conf('web_path') . "/artists.php?action=show&artist=" . $artist->id ); } else { @@ -167,8 +167,8 @@ switch($_REQUEST['action']) { // show something other than a blank screen after this if ($ret) { show_confirmation ( - _('Renamed artist'), - sprintf(_('%1$s is now known as %2$s'), $artist->name, $newname), + T_('Renamed artist'), + sprintf(T_('%1$s is now known as %2$s'), $artist->name, $newname), conf('web_path') . "/artists.php?action=show&artist=" . $newid ); } @@ -192,7 +192,7 @@ switch($_REQUEST['action']) { /* Enclose this in the purty box! */ require (conf('prefix') . '/templates/show_box_top.inc.php'); show_alphabet_list('artists','artists.php',$match); - show_alphabet_form($chr,_('Show Artists starting with'),"artists.php?action=match"); + show_alphabet_form($chr, T_('Show Artists starting with'),"artists.php?action=match"); require (conf('prefix') . '/templates/show_box_bottom.inc.php'); if ($match === "Browse") { diff --git a/bin/catalog_update.inc b/bin/catalog_update.inc index e30917ef..2a324bb6 100644 --- a/bin/catalog_update.inc +++ b/bin/catalog_update.inc @@ -42,30 +42,30 @@ $thumbadd =0; $artadd = 0; if (count($_SERVER['argv']) == 1) { - $operations_string = "\n\t". _('- All Catalog Operations'); + $operations_string = "\n\t". T_('- All Catalog Operations'); } if (count($_SERVER['argv']) > 1) { for ($x = 1; $x < count($_SERVER['argv']); $x++) { if ($_SERVER['argv'][$x] == "-c") { - $operations_string .= "\n\t"._('- Catalog Clean'); + $operations_string .= "\n\t" . T_('- Catalog Clean'); $catclean = 1; } elseif ($_SERVER['argv'][$x] == "-v") { - $operations_string .= "\n\t"._('- Catalog Verify'); + $operations_string .= "\n\t" . T_('- Catalog Verify'); $catverify = 1; } elseif ($_SERVER['argv'][$x] == "-a") { - $operations_string .= "\n\t"._('- Catalog Add'); + $operations_string .= "\n\t" . T_('- Catalog Add'); $catadd = 1; } elseif ($_SERVER['argv'][$x] == "-g") { - $operations_string .= "\n\t"._('- Catalog Art Gather'); + $operations_string .= "\n\t" . T_('- Catalog Art Gather'); $artadd = 1; } elseif ($_SERVER['argv'][$x] == '-t') { - $operations_string .= "\n\t"._('- Generate Thumbnails'); + $operations_string .= "\n\t" . T_('- Generate Thumbnails'); $thumbadd = 1; } else { @@ -88,7 +88,7 @@ if ($thumbadd == 0 && $artadd == 0 && $catclean == 0 && $catverify == 0 && $cata $thumbadd = 1; } -echo _("Starting Catalog Operations...") . $operations_string . "\n"; +echo T_("Starting Catalog Operations...") . $operations_string . "\n"; if ($where) $where = "($where) AND catalog_type='local'"; else $where = "catalog_type='local'"; @@ -101,12 +101,12 @@ ob_start("ob_html_strip",'1024',true); while ($row = Dba::fetch_row($db_results)) { $catalog = new Catalog($row['0']); - printf(_('Reading: %s'), $catalog->name); + printf(T_('Reading: %s'), $catalog->name); ob_flush(); echo "\n"; if ($catclean == 1) { // Clean out dead files - echo _("- Starting Clean - "); + echo T_("- Starting Clean - "); echo "\n"; $catalog->clean_catalog(); echo "------------------\n\n"; @@ -114,7 +114,7 @@ while ($row = Dba::fetch_row($db_results)) { if ($catverify == 1) { // Verify Existing - echo _("- Starting Verify - "); + echo T_("- Starting Verify - "); echo "\n"; $catalog->verify_catalog($row['0']); echo "-------------------\n\n"; @@ -122,7 +122,7 @@ while ($row = Dba::fetch_row($db_results)) { if ($catadd == 1) { // Look for new files - echo _("- Starting Add - "); + echo T_("- Starting Add - "); echo "\n"; $catalog->add_to_catalog(); echo "----------------\n\n"; @@ -130,7 +130,7 @@ while ($row = Dba::fetch_row($db_results)) { if ($artadd == 1) { // Look for album art - echo _('Starting Album Art Search'); + echo T_('Starting Album Art Search'); echo "\n"; $catalog->get_art('',1); echo "----------------\n\n"; @@ -138,7 +138,7 @@ while ($row = Dba::fetch_row($db_results)) { if ($thumbadd == 1) { // Generate the thumbnails - echo _('Generating Thumbnails'); + echo T_('Generating Thumbnails'); echo "\n"; $catalog->generate_thumbnails(); echo "----------------\n\n"; @@ -165,21 +165,21 @@ function ob_html_strip($string) { } // ob_html_strip function usage() { - echo _("- Catalog Update -"); + echo T_("- Catalog Update -"); echo "\n"; - echo _("Usage: catalog_update.inc [CATALOG NAME] [-c|-v|-a|-g|-t]"); + echo T_("Usage: catalog_update.inc [CATALOG NAME] [-c|-v|-a|-g|-t]"); echo "\n\t"; - echo _("Default behavior is to do all"); + echo T_("Default behavior is to do all"); echo "\n-c\t"; - echo _('Clean Catalogs'); + echo T_('Clean Catalogs'); echo "\n-v\t"; - echo _('Verify Catalogs'); + echo T_('Verify Catalogs'); echo "\n-a\t"; - echo _('Add to Catalogs'); + echo T_('Add to Catalogs'); echo "\n-g\t"; - echo _('Gather Art'); + echo T_('Gather Art'); echo "\n-t\t"; - echo _('Generate Thumbnails'); + echo T_('Generate Thumbnails'); echo "\n"; echo "----------------------------------------------------------"; echo "\n"; diff --git a/bin/delete_disabled.inc b/bin/delete_disabled.inc index 05b097e7..476ffed4 100644 --- a/bin/delete_disabled.inc +++ b/bin/delete_disabled.inc @@ -40,7 +40,7 @@ $path = dirname(__FILE__); $prefix = realpath($path . '/../'); require_once $prefix . '/lib/init.php'; -if ($debug) { echo _("DEBUG ENABLED WILL NOT DELETE FILES!"); echo "\n"; } +if ($debug) { echo T_("DEBUG ENABLED WILL NOT DELETE FILES!"); echo "\n"; } /* Get a list of filenames */ $sql = "SELECT `id`,`file` FROM song WHERE enabled='0'"; @@ -48,11 +48,11 @@ $db_results = Dba::read($sql); while ($row = Dba::fetch_assoc($db_results)) { if ($debug) { - printf (_('Would Delete: %s'), $row['file']); + printf (T_('Would Delete: %s'), $row['file']); echo "\n"; } else { - printf (_('Deleting: %s'), $row['file']); + printf (T_('Deleting: %s'), $row['file']); echo "\n"; unlink($row['file']); $sql = "DELETE FROM `song` WHERE `id`='" . Dba::escape($row['id']) . "'"; diff --git a/bin/fix_filenames.inc b/bin/fix_filenames.inc index 4333f9e4..86b95539 100644 --- a/bin/fix_filenames.inc +++ b/bin/fix_filenames.inc @@ -45,7 +45,7 @@ ob_end_clean(); //$GLOBALS['i_am_crazy'] = true; if (!function_exists('iconv')) { - echo _("ERROR: Iconv required for this functionality, quiting"); + echo T_("ERROR: Iconv required for this functionality, quiting"); echo "\n"; exit; } @@ -54,19 +54,19 @@ if (!function_exists('iconv')) { $source_encoding = iconv_get_encoding('output_encoding'); // Attempt a simple translation -$string = sprintf(_('%s For the Love of Music'), iconv(Config::get('site_charset'),Config::get('site_charset'))); -echo _('Testing Basic Translation, the two strings below should look the same'); +$string = sprintf(T_('%s For the Love of Music'), iconv(Config::get('site_charset'),Config::get('site_charset'))); +echo T_('Testing Basic Translation, the two strings below should look the same'); echo "\n"; -echo _('Original: For the Love of Music'); +echo T_('Original: For the Love of Music'); echo "\n"; -printf (_('Translated: %s'), $string); +printf (T_('Translated: %s'), $string); echo "\n"; echo "---------------------------------------------------------------------\n"; -printf (_('Input Charset (%s):'), $source_encoding); +printf (T_('Input Charset (%s):'), $source_encoding); $input = trim(fgets(STDIN)); if (strlen($input) > 0) { $source_encoding = trim($input); } -printf (_('Using %s as source character set'), $source_encoding); +printf (T_('Using %s as source character set'), $source_encoding); echo "\n"; $sql = "SELECT * FROM `catalog` WHERE `catalog_type`='local'"; @@ -74,13 +74,13 @@ $db_results = Dba::read($sql); while ($row = Dba::fetch_assoc($db_results)) { - printf(_('Checking %s (%s)'), $row['name'], $row['path']); + printf(T_('Checking %s (%s)'), $row['name'], $row['path']); echo "\n"; charset_directory_correct($row['path']); } // end of the catalogs -echo _('Finished checking filenames for valid chacters'); +echo T_('Finished checking filenames for valid chacters'); echo "\n"; /************************************************** @@ -106,13 +106,13 @@ function charset_directory_correct($path) { $handle = opendir($path); if (!is_resource($handle)) { - printf (_('ERROR: Unable to open %s'), $path); + printf (T_('ERROR: Unable to open %s'), $path); echo "\n"; return false; } if (!chdir($path)) { - printf (_('ERROR: Unable to chdir to %s'), $path); + printf (T_('ERROR: Unable to chdir to %s'), $path); echo "\n"; return false; } @@ -135,24 +135,24 @@ function charset_directory_correct($path) { // Make sure the extension stayed the same if (substr($translated_filename,strlen($translated_filename)-3,3) != substr($full_file,strlen($full_file)-3,3)) { - echo _("Translation failure, stripping non-valid characters"); + echo T_("Translation failure, stripping non-valid characters"); echo "\n"; $translated_filename = iconv($source_encoding,Config::get('site_charset') . '//IGNORE',$full_file); } - printf (_('Attempting to Transcode to %s'), Config::get('site_charset')); + printf (T_('Attempting to Transcode to %s'), Config::get('site_charset')); echo "\n"; echo "--------------------------------------------------------------------------------------------\n"; - printf (_('OLD: %s has invalid chars'), $full_file); + printf (T_('OLD: %s has invalid chars'), $full_file); echo "\n"; - printf (_('NEW: %s'), $translated_filename); + printf (T_('NEW: %s'), $translated_filename); echo "\n"; echo "--------------------------------------------------------------------------------------------\n"; if (!$GLOBALS['i_am_crazy']) { - echo _("Rename File (Y/N):"); + echo T_("Rename File (Y/N):"); $input = trim(fgets(STDIN)); if (strcasecmp($input,'Y') == 0) { charset_rename_file($full_file,$translated_filename); } - else { echo "\n\t"; echo _('Not Renaming...'); echo "\n\n"; } + else { echo "\n\t"; echo T_('Not Renaming...'); echo "\n\n"; } } else { charset_rename_file($full_file,$translated_filename); @@ -184,7 +184,7 @@ function charset_rename_file($full_file,$translated_filename) { echo "\tMaking $path directory\n"; $results = mkdir($path); if (!$results) { - printf (_('Error: Unable to create %s move failed, stopping'), $path); + printf (T_('Error: Unable to create %s move failed, stopping'), $path); echo "\n"; return false; } @@ -196,7 +196,7 @@ function charset_rename_file($full_file,$translated_filename) { $results = copy($full_file,$translated_filename); if (!$results) { - echo _('Error: Copy Failed, not deleteing old file'); + echo T_('Error: Copy Failed, not deleteing old file'); echo "\n"; return false; } @@ -205,16 +205,16 @@ function charset_rename_file($full_file,$translated_filename) { $new_sum = filesize($translated_filename); if ($old_sum != $new_sum OR !$new_sum) { - printf (_('Error: Size Inconsistency, not deleting %s'), $full_file); + printf (T_('Error: Size Inconsistency, not deleting %s'), $full_file); echo "\n"; return false; } $results = unlink($full_file); - if (!$results) { printf (_('Error: Unable to delete %s'), $full_file); echo "\n"; return false; } + if (!$results) { printf (T_('Error: Unable to delete %s'), $full_file); echo "\n"; return false; } - echo _("File Moved..."); + echo T_("File Moved..."); echo "\n\n"; return true; diff --git a/bin/install/add_user.inc b/bin/install/add_user.inc index 7ce2a25b..d7655fc8 100644 --- a/bin/install/add_user.inc +++ b/bin/install/add_user.inc @@ -50,11 +50,11 @@ $email = isset($options['e']) ? $options['e'] : ''; $name = isset($options['n']) ? $options['n'] : ''; if (User::create($username, $name, $email, $password, $access)) { - printf(_('Created %s user %s with password %s'), _($access), $username, $password); + printf(T_('Created %s user %s with password %s'), T_($access), $username, $password); echo "\n"; } else { - echo _('User creation failed'), "\n"; + echo T_('User creation failed'), "\n"; exit(1); } diff --git a/bin/install/install_db.inc b/bin/install/install_db.inc index 5bc7c2d8..328b7d92 100644 --- a/bin/install/install_db.inc +++ b/bin/install/install_db.inc @@ -67,26 +67,26 @@ if (!$db_user || !$db_pass || !$db_host || !$db_name || !$new_db_user || !$new_d // Now let's make sure its not already installed if (!install_check_status($configfile)) { - echo "\n", _('Existing Ampache installation found.'), "\n"; + echo "\n", T_('Existing Ampache installation found.'), "\n"; if ($force) { - echo _('Force specified, proceeding anyway.'), "\n"; + echo T_('Force specified, proceeding anyway.'), "\n"; } else { - echo _('Exiting.'), "\n"; + echo T_('Exiting.'), "\n"; exit(1); } } // Install the database if (!install_insert_db($db_user, $db_pass, $db_host, $db_name, $new_db_user, $new_db_pass)) { - echo _('Database creation failed'), "\n"; + echo T_('Database creation failed'), "\n"; echo Error::get('general'), "\n\n"; exit(1); } // Write the config file if (!install_create_config($webpath, $new_db_user, $new_db_pass, $db_host, $db_name)) { - echo _('Config file creation failed'), "\n"; + echo T_('Config file creation failed'), "\n"; echo Error::get('general') . "\n\n"; exit(1); } diff --git a/bin/install/update_db.inc b/bin/install/update_db.inc index 425c1e0a..d9ea8bc7 100644 --- a/bin/install/update_db.inc +++ b/bin/install/update_db.inc @@ -45,7 +45,7 @@ if (Update::need_update() && $run_update) { } if (Update::need_update()) { - echo _('The following updates need to be performed:'), "\n"; + echo T_('The following updates need to be performed:'), "\n"; } Update::display_update(); diff --git a/bin/migrate_config.inc b/bin/migrate_config.inc index 5f0ea5fe..fef439da 100644 --- a/bin/migrate_config.inc +++ b/bin/migrate_config.inc @@ -53,7 +53,7 @@ $old_config = file_get_contents($prefix . '/config/ampache.cfg.php'); $data = explode("\n",$old_config); -echo _("Parsing old config file..."); +echo T_("Parsing old config file..."); echo "\n"; foreach ($data as $line) { @@ -83,7 +83,7 @@ foreach ($data as $line) { } // end foreach lines -echo _("Parse complete, writing"); +echo T_("Parse complete, writing"); echo "\n"; $handle = fopen($prefix . '/config/ampache.cfg.php','w'); @@ -91,11 +91,11 @@ $handle = fopen($prefix . '/config/ampache.cfg.php','w'); $worked = fwrite($handle,$new_config); if ($worked) { - echo _("Write success, config migrated"); + echo T_("Write success, config migrated"); echo "\n"; } else { - echo _("Access Denied, config migration failed"); + echo T_("Access Denied, config migration failed"); echo "\n"; } diff --git a/bin/print_tags.inc b/bin/print_tags.inc index 5ff0d300..765d12f7 100644 --- a/bin/print_tags.inc +++ b/bin/print_tags.inc @@ -41,13 +41,13 @@ if (count($GLOBALS['argv']) == '1') { } if(!file_exists($filename)) { - print _("File not found."); + print T_("File not found."); print "\n"; usage(); exit; } -printf(_('Reading: %s'), $filename); +printf(T_('Reading: %s'), $filename); print "\n"; /* Attempt to figure out what catalog it comes from */ @@ -62,7 +62,7 @@ $file_pattern = $catalog->rename_pattern; $info = new vainfo($filename, '', '', '', $dir_pattern, $file_pattern); if(isset($dir_pattern) || isset($file_pattern)) { - printf(_('Using: %s AND %s for file pattern matching'), $dir_pattern, $file_pattern); + printf(T_('Using: %s AND %s for file pattern matching'), $dir_pattern, $file_pattern); print "\n"; } $info->get_info(); @@ -79,22 +79,22 @@ if ($send_mail) { } echo "\n"; -echo _('Raw results:'); +echo T_('Raw results:'); echo "\n\n"; print_r($info); echo "\n------------------------------------------------------------------\n"; -printf(_('Final results seen by Ampache using %s:'), implode(' + ', $keys)); +printf(T_('Final results seen by Ampache using %s:'), implode(' + ', $keys)); echo "\n\n"; print_r($ampache_results); function usage() { global $version; - $text = sprintf(_('%s Version %s'), 'print_tags.inc', $version); + $text = sprintf(T_('%s Version %s'), 'print_tags.inc', $version); $text .= "\n\n"; - $text .= _('Usage:'); + $text .= T_('Usage:'); $text .= "\n"; - $text .= _('php print_tags.inc '); + $text .= T_('php print_tags.inc '); $text .= "\n\n"; return print $text; diff --git a/bin/sort_files.inc b/bin/sort_files.inc index 9acf4cb9..8ac8850b 100644 --- a/bin/sort_files.inc +++ b/bin/sort_files.inc @@ -64,7 +64,7 @@ while ($r = Dba::fetch_row($db_results)) { $catalog = new Catalog($r['0']); $songs = $catalog->get_catalog_files(); - printf (_('Starting Catalog: %s'), stripslashes($catalog->name)); + printf (T_('Starting Catalog: %s'), stripslashes($catalog->name)); echo "\n"; /* Foreach through each file and find it a home! */ @@ -79,11 +79,11 @@ while ($r = Dba::fetch_row($db_results)) { /* Check for Demo Mode */ if ($test_mode) { /* We're just talking here... no work */ - echo _("Moving File..."); + echo T_("Moving File..."); echo "\n\t"; - printf (_('Source: %s'), $song->file); + printf (T_('Source: %s'), $song->file); echo "\n\t"; - printf (_('Dest: %s'), $fullpath); + printf (T_('Dest: %s'), $fullpath); echo "\n"; flush(); } @@ -233,14 +233,14 @@ function sort_move_file($song,$fullname) { if (!is_dir($path)) { if ($GLOBALS['test_mode']) { echo "\t"; - printf (_('Making %s Directory'), $path); + printf (T_('Making %s Directory'), $path); echo "\n"; } else { debug_event('mkdir',"Creating $path directory",'5'); $results = mkdir($path); if (!$results) { - printf (_('Error: Unable to create %s move failed'), $path); + printf (T_('Error: Unable to create %s move failed'), $path); echo "\n"; return false; } @@ -253,7 +253,7 @@ function sort_move_file($song,$fullname) { if ($GLOBALS['test_mode']) { echo "\t"; // HINT: %1$s: file, %2$s: directory - printf (_('Copying %1$s to %2$s'), $file, $directory); + printf (T_('Copying %1$s to %2$s'), $file, $directory); echo "\n"; $sql = "UPDATE song SET file='" . Dba::escape($fullname) . "' WHERE id='" . Dba::escape($song->id) . "'"; echo "\tSQL: $sql\n"; @@ -264,7 +264,7 @@ function sort_move_file($song,$fullname) { /* Check for file existance */ if (file_exists($fullname)) { debug_event('file exists','Error: $fullname already exists','1'); - printf (_('Error: %s already exists'), $filename); + printf (T_('Error: %s already exists'), $filename); echo "\n"; return false; } @@ -285,21 +285,21 @@ function sort_move_file($song,$fullname) { debug_event('copy_art','Copied ' . $old_art . ' to ' . $folder_art,'5'); @copy($old_art,$folder_art); - if (!$results) { printf (_('Error: Unable to copy file to %s'), $fullname); echo "\n"; return false; } + if (!$results) { printf (T_('Error: Unable to copy file to %s'), $fullname); echo "\n"; return false; } /* Check the filesize */ $new_sum = filesize($fullname); $old_sum = filesize($song->file); if ($new_sum != $old_sum OR !$new_sum) { - printf (_('Error: Size Inconsistency, not deleting %s'), $song->file); + printf (T_('Error: Size Inconsistency, not deleting %s'), $song->file); echo "\n"; return false; } // end if sum's don't match /* If we've made it this far it should be safe */ $results = unlink($song->file); - if (!$results) { printf (_('Error: Unable to delete %s'), $song->file); echo "\n"; } + if (!$results) { printf (T_('Error: Unable to delete %s'), $song->file); echo "\n"; } /* Update the catalog */ $sql = "UPDATE song SET file='" . Dba::escape($fullname) . "' WHERE id='" . Dba::escape($song->id) . "'"; diff --git a/bin/write_playlists.inc b/bin/write_playlists.inc index 8ee857fb..b62a217c 100644 --- a/bin/write_playlists.inc +++ b/bin/write_playlists.inc @@ -45,7 +45,7 @@ else { // Make sure the output dir is valid and writeable if (!is_writeable($dirname)) { - printf (_('Error: Directory %s not writeable'), $dirname); + printf (T_('Error: Directory %s not writeable'), $dirname); echo "\n"; } @@ -66,11 +66,11 @@ switch ($type) { /* FUNCTIONS */ function usage() { -$desc1 = _("This will dump a collection of m3u playlists based on type"); -$desc2 = _("Types:"); -$desc3 = _("Dumps all Albums as individual playlists"); -$desc4 = _("Dumps all of your Playlists as m3u's"); -$desc5 = _("Dumps all Artists as individual playlists"); +$desc1 = T_("This will dump a collection of m3u playlists based on type"); +$desc2 = T_("Types:"); +$desc3 = T_("Dumps all Albums as individual playlists"); +$desc4 = T_("Dumps all of your Playlists as m3u's"); +$desc5 = T_("Dumps all Artists as individual playlists"); $string = "write_playlists.php.inc [-h] diff --git a/bin/write_tags.inc b/bin/write_tags.inc index 518b49e9..2fe1154d 100644 --- a/bin/write_tags.inc +++ b/bin/write_tags.inc @@ -39,7 +39,7 @@ $prefix = realpath($path . '/../'); require_once $prefix . '/lib/init.php'; // This is all broken currently so just jump ship -echo _("Writting of Tags to files is not currently supported by Getid3() use at your own risk."); +echo T_("Writting of Tags to files is not currently supported by Getid3() use at your own risk."); echo "\n"; flush(); @@ -51,7 +51,7 @@ $flag = new Flag(); $flagged_ids = Flag::get_approved(); if (!count($flagged_ids)) { - echo _("No Flagged Songs Found, exiting..."); + echo T_("No Flagged Songs Found, exiting..."); echo "\n"; exit; } @@ -79,7 +79,7 @@ foreach($flagged_ids as $flagged) { Flag::fill_tags( &$tagWriter, &$song, 'comment' ); break; default: - echo _('No Tag'); + echo T_('No Tag'); } // end switch if ( isset($tagWriter) ) { @@ -88,7 +88,7 @@ foreach($flagged_ids as $flagged) { try { $tagWriter->write(); // HINT: %1$s: title, %2$s: artist_name - printf (_('Updated song %1$s by %2$s'), $song->title, $song->get_artist_name()); + printf (T_('Updated song %1$s by %2$s'), $song->title, $song->get_artist_name()); echo "\n"; flush(); $flag->delete(); diff --git a/browse.php b/browse.php index b9e24515..aae1ebf9 100644 --- a/browse.php +++ b/browse.php @@ -76,7 +76,7 @@ switch($_REQUEST['action']) { $object_ids = $browse->get_saved(); $keys = array_keys($object_ids); Tag::build_cache($keys); - show_box_top(_('Tag Cloud'), 'box box_tag_cloud'); + show_box_top(T_('Tag Cloud'), 'box box_tag_cloud'); $browse2 = new Browse(); $browse2->set_type('song'); $browse2->store(); diff --git a/democratic.php b/democratic.php index 8f85f2f5..f8644dbe 100644 --- a/democratic.php +++ b/democratic.php @@ -60,7 +60,7 @@ switch ($_REQUEST['action']) { Democratic::delete($_REQUEST['democratic_id']); $title = ''; - $text = _('The Requested Playlist has been deleted.'); + $text = T_('The Requested Playlist has been deleted.'); $url = Config::get('web_path') . '/democratic.php?action=manage_playlists'; show_confirmation($title,$text,$url); break; diff --git a/flag.php b/flag.php index f56b033a..febdfe31 100644 --- a/flag.php +++ b/flag.php @@ -48,7 +48,7 @@ switch ($action) { $flag_type = scrub_in($_REQUEST['flag_type']); $comment = scrub_in($_REQUEST['comment']); $flag->add($id,$type,$flag_type,$comment); - show_confirmation(_('Item Flagged'),_('The specified item has been flagged'),$_SESSION['source_page']); + show_confirmation(T_('Item Flagged'), T_('The specified item has been flagged'),$_SESSION['source_page']); break; case 'show_flag': /* Store where they came from */ diff --git a/install.php b/install.php index 9c52aad3..4ed840b5 100644 --- a/install.php +++ b/install.php @@ -87,7 +87,7 @@ switch ($_REQUEST['action']) { $charset = $_REQUEST['charset']; // Test and make sure that the values they give us actually work if (!check_database($hostname,$username,$password)) { - Error::add('config',_('Error: Unable to make Database Connection') . mysql_error()); + Error::add('config', T_('Error: Unable to make Database Connection') . mysql_error()); } // Was download pressed? @@ -175,7 +175,7 @@ switch ($_REQUEST['action']) { /* Make sure we've got a valid config file */ if (!check_config_values($results)) { - Error::add('general',_('Error: Config file not found or Unreadable')); + Error::add('general', T_('Error: Config file not found or Unreadable')); require_once Config::get('prefix') . '/templates/show_install_config.inc.php'; break; } diff --git a/lib/class/access.class.php b/lib/class/access.class.php index d2227701..578ba32b 100644 --- a/lib/class/access.class.php +++ b/lib/class/access.class.php @@ -160,17 +160,17 @@ class Access { $end = @inet_pton($data['end']); if (!$start AND $data['start'] != '0.0.0.0' AND $data['start'] != '::') { - Error::add('start',_('Invalid IPv4 / IPv6 Address Entered')); + Error::add('start', T_('Invalid IPv4 / IPv6 Address Entered')); return false; } if (!$end) { - Error::add('end',_('Invalid IPv4 / IPv6 Address Entered')); + Error::add('end', T_('Invalid IPv4 / IPv6 Address Entered')); return false; } if (strlen(bin2hex($start)) != strlen(bin2hex($end))) { - Error::add('start',_('IP Address Version Mismatch')); - Error::add('end',_('IP Address Version Mismatch')); + Error::add('start', T_('IP Address Version Mismatch')); + Error::add('end', T_('IP Address Version Mismatch')); return false; } @@ -207,24 +207,24 @@ class Access { $end = @inet_pton($data['end']); if (!$start AND $data['start'] != '0.0.0.0' AND $data['start'] != '::') { - Error::add('start',_('Invalid IPv4 / IPv6 Address Entered')); + Error::add('start', T_('Invalid IPv4 / IPv6 Address Entered')); return false; } if (!$end) { - Error::add('end',_('Invalid IPv4 / IPv6 Address Entered')); + Error::add('end', T_('Invalid IPv4 / IPv6 Address Entered')); return false; } if (strlen(bin2hex($start)) != strlen(bin2hex($end))) { - Error::add('start',_('IP Address Version Mismatch')); - Error::add('end',_('IP Address Version Mismatch')); + Error::add('start', T_('IP Address Version Mismatch')); + Error::add('end', T_('IP Address Version Mismatch')); return false; } // Check existing ACL's to make sure we're not duplicating values here if (self::exists($data)) { debug_event('ACL Create','Error: An ACL equal to the created one does already exist. Not adding another one: ' . $data['start'] . ' - ' . $data['end'],'1'); - Error::add('general',_('Duplicate ACL defined')); + Error::add('general', T_('Duplicate ACL defined')); return false; } @@ -482,16 +482,16 @@ class Access { public function get_level_name() { if ($this->level >= '75') { - return _('All'); + return T_('All'); } if ($this->level == '5') { - return _('View'); + return T_('View'); } if ($this->level == '25') { - return _('Read'); + return T_('Read'); } if ($this->level == '50') { - return _('Read/Write'); + return T_('Read/Write'); } } // get_level_name @@ -502,7 +502,7 @@ class Access { */ public function get_user_name() { - if ($this->user == '-1') { return _('All'); } + if ($this->user == '-1') { return T_('All'); } $user = new User($this->user); return $user->fullname . " (" . $user->username . ")"; @@ -518,17 +518,17 @@ class Access { switch ($this->type) { case 'xml-rpc': case 'rpc': - return _('API/RPC'); + return T_('API/RPC'); break; case 'network': - return _('Local Network Definition'); + return T_('Local Network Definition'); break; case 'interface': - return _('Web Interface'); + return T_('Web Interface'); break; case 'stream': default: - return _('Stream Access'); + return T_('Stream Access'); break; } // end switch diff --git a/lib/class/album.class.php b/lib/class/album.class.php index dbf0b18e..1c4aa301 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -246,7 +246,7 @@ class Album extends database_object { $this->f_name_link = "id) . "\" title=\"" . scrub_out($this->full_name) . "\">" . scrub_out($this->f_name); // If we've got a disk append it if ($this->disk) { - $this->f_name_link .= " disk. "\">[" . _('Disk') . " " . $this->disk . "]"; + $this->f_name_link .= " disk. "\">[" . T_('Disk') . " " . $this->disk . "]"; } $this->f_name_link .=""; @@ -260,8 +260,8 @@ class Album extends database_object { $this->f_artist = $artist; } else { - $this->f_artist_link = "artist_count " . _('Artists') . "\">" . _('Various') . ""; - $this->f_artist = _('Various'); + $this->f_artist_link = "artist_count " . T_('Artists') . "\">" . T_('Various') . ""; + $this->f_artist = T_('Various'); $this->f_artist_name = $this->f_artist; } diff --git a/lib/class/ampacherss.class.php b/lib/class/ampacherss.class.php index 681ae98f..b971b1fb 100644 --- a/lib/class/ampacherss.class.php +++ b/lib/class/ampacherss.class.php @@ -80,10 +80,10 @@ class AmpacheRSS { */ public function get_title() { - $titles = array('now_playing'=>_('Now Playing'), - 'recently_played'=>_('Recently Played'), - 'latest_album'=>_('Newest Albums'), - 'latest_artist'=>_('Newest Artists')); + $titles = array('now_playing' => T_('Now Playing'), + 'recently_played' => T_('Recently Played'), + 'latest_album' => T_('Newest Albums'), + 'latest_artist' => T_('Newest Artists')); return scrub_out(Config::get('site_title')) . ' - ' . $titles[$this->type]; @@ -126,7 +126,7 @@ class AmpacheRSS { // Default to now playing $type = self::validate_type($type); - $string = '' . get_user_icon('feed',_('RSS Feed')) . ''; + $string = '' . get_user_icon('feed', T_('RSS Feed')) . ''; return $string; @@ -185,7 +185,7 @@ class AmpacheRSS { //FIXME: The time stuff should be centralized, it's currently in two places, lame - $time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days ago'),_('weeks ago'),_('months ago'),_('years ago')); + $time_unit = array('', T_('seconds ago'), T_('minutes ago'), T_('hours ago'), T_('days ago'), T_('weeks ago'), T_('months ago'), T_('years ago')); $data = Song::get_recently_played(); $results = array(); diff --git a/lib/class/api.class.php b/lib/class/api.class.php index 61b071f6..ff7e2cb3 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -132,7 +132,7 @@ class Api { if (intval($version) < self::$version) { debug_event('API', 'Login Failed: version too old', 1); - Error::add('api', _('Login Failed: version too old')); + Error::add('api', T_('Login Failed: version too old')); return false; } @@ -140,7 +140,7 @@ class Api { if (($timestamp < (time() - 1800)) || ($timestamp > (time() + 1800))) { debug_event('API', 'Login Failed: timestamp out of range', 1); - Error::add('api', _('Login Failed: timestamp out of range')); + Error::add('api', T_('Login Failed: timestamp out of range')); return false; } @@ -169,7 +169,7 @@ class Api { if (!$row['password']) { debug_event('API', 'Unable to find user with userid of ' . $user_id, 1); - Error::add('api', _('Invalid Username/Password')); + Error::add('api', T_('Invalid Username/Password')); return false; } @@ -232,7 +232,7 @@ class Api { } // end while debug_event('API','Login Failed, unable to match passphrase','1'); - xmlData::error('401',_('Error Invalid Handshake - ') . _('Invalid Username/Password')); + xmlData::error('401', T_('Error Invalid Handshake - ') . T_('Invalid Username/Password')); } // handshake @@ -659,7 +659,7 @@ class Api { break; default: // They are doing it wrong - echo xmlData::error('405',_('Invalid Request')); + echo xmlData::error('405', T_('Invalid Request')); break; } // end switch on command @@ -680,7 +680,7 @@ class Api { $type = 'song'; $media = new $type($input['oid']); if (!$media->id) { - echo xmlData::error('400',_('Media Object Invalid or Not Specified')); + echo xmlData::error('400', T_('Media Object Invalid or Not Specified')); break; } $democratic->vote(array(array('song',$media->id))); @@ -693,7 +693,7 @@ class Api { $type = 'song'; $media = new $type($input['oid']); if (!$media->id) { - echo xmlData::error('400',_('Media Object Invalid or Not Specified')); + echo xmlData::error('400', T_('Media Object Invalid or Not Specified')); } $uid = $democratic->get_uid_from_object_id($media->id,$type); @@ -715,7 +715,7 @@ class Api { echo xmlData::keyed_array($xml_array); break; default: - echo xmlData::error('405',_('Invalid Request')); + echo xmlData::error('405', T_('Invalid Request')); break; } // switch on method diff --git a/lib/class/art.class.php b/lib/class/art.class.php index 647e5163..ad8023ca 100644 --- a/lib/class/art.class.php +++ b/lib/class/art.class.php @@ -1000,7 +1000,7 @@ class Art extends database_object { $handle = opendir($dir); if (!$handle) { - Error::add('general',_('Error: Unable to open') . ' ' . $dir); + Error::add('general', T_('Error: Unable to open') . ' ' . $dir); debug_event('folder_art', "Error: Unable to open $dir for album art read", 2); continue; } diff --git a/lib/class/artist.class.php b/lib/class/artist.class.php index 583cab8c..78459e24 100644 --- a/lib/class/artist.class.php +++ b/lib/class/artist.class.php @@ -376,7 +376,7 @@ class Artist extends database_object { // check for fault if ($client->fault) { debug_event("lyrics", "Can't get lyrics", "1"); - return $results = "

" . _('Fault') . "

" . print_r($result); + return $results = "

" . T_('Fault') . "

" . print_r($result); } else { // check for errors @@ -384,12 +384,12 @@ class Artist extends database_object { if ($err) { debug_event("lyrics", "Getting error: $err", "1"); - return $results = "

" . _('Error') . "

" . $err; + return $results = "

" . T_('Error') . "

" . $err; } else { // if returned "Not found" do not add if($result['lyrics'] == "Not found") { - $sorry = _('Sorry Lyrics Not Found.'); + $sorry = T_('Sorry Lyrics Not Found.'); return $sorry; } else { diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php index 83eb2d27..89cf5933 100644 --- a/lib/class/browse.class.php +++ b/lib/class/browse.class.php @@ -137,84 +137,84 @@ class Browse extends Query { // Switch on the type of browsing we're doing switch ($type) { case 'song': - show_box_top(_('Songs') . $match, $class); + show_box_top(T_('Songs') . $match, $class); Song::build_cache($object_ids); require_once Config::get('prefix') . '/templates/show_songs.inc.php'; show_box_bottom(); break; case 'album': - show_box_top(_('Albums') . $match, $class); + show_box_top(T_('Albums') . $match, $class); Album::build_cache($object_ids,'extra'); require_once Config::get('prefix') . '/templates/show_albums.inc.php'; show_box_bottom(); break; case 'user': - show_box_top(_('Manage Users') . $match, $class); + show_box_top(T_('Manage Users') . $match, $class); require_once Config::get('prefix') . '/templates/show_users.inc.php'; show_box_bottom(); break; case 'artist': - show_box_top(_('Artists') . $match, $class); + show_box_top(T_('Artists') . $match, $class); Artist::build_cache($object_ids,'extra'); require_once Config::get('prefix') . '/templates/show_artists.inc.php'; show_box_bottom(); break; case 'live_stream': require_once Config::get('prefix') . '/templates/show_live_stream.inc.php'; - show_box_top(_('Radio Stations') . $match, $class); + show_box_top(T_('Radio Stations') . $match, $class); require_once Config::get('prefix') . '/templates/show_live_streams.inc.php'; show_box_bottom(); break; case 'playlist': Playlist::build_cache($object_ids); - show_box_top(_('Playlists') . $match, $class); + show_box_top(T_('Playlists') . $match, $class); require_once Config::get('prefix') . '/templates/show_playlists.inc.php'; show_box_bottom(); break; case 'playlist_song': - show_box_top(_('Playlist Songs') . $match,$class); + show_box_top(T_('Playlist Songs') . $match,$class); require_once Config::get('prefix') . '/templates/show_playlist_songs.inc.php'; show_box_bottom(); break; case 'playlist_localplay': - show_box_top(_('Current Playlist')); + show_box_top(T_('Current Playlist')); require_once Config::get('prefix') . '/templates/show_localplay_playlist.inc.php'; show_box_bottom(); break; case 'smartplaylist': - show_box_top(_('Smart Playlists') . $match, $class); + show_box_top(T_('Smart Playlists') . $match, $class); require_once Config::get('prefix') . '/templates/show_smartplaylists.inc.php'; show_box_bottom(); break; case 'catalog': - show_box_top(_('Catalogs'), $class); + show_box_top(T_('Catalogs'), $class); require_once Config::get('prefix') . '/templates/show_catalogs.inc.php'; show_box_bottom(); break; case 'shoutbox': - show_box_top(_('Shoutbox Records'),$class); + show_box_top(T_('Shoutbox Records'),$class); require_once Config::get('prefix') . '/templates/show_manage_shoutbox.inc.php'; show_box_bottom(); break; case 'flagged': - show_box_top(_('Flagged Records'),$class); + show_box_top(T_('Flagged Records'),$class); require_once Config::get('prefix') . '/templates/show_flagged.inc.php'; show_box_bottom(); break; case 'tag': Tag::build_cache($tags); - show_box_top(_('Tag Cloud'),$class); + show_box_top(T_('Tag Cloud'),$class); require_once Config::get('prefix') . '/templates/show_tagcloud.inc.php'; show_box_bottom(); break; case 'video': Video::build_cache($object_ids); - show_box_top(_('Videos'),$class); + show_box_top(T_('Videos'),$class); require_once Config::get('prefix') . '/templates/show_videos.inc.php'; show_box_bottom(); break; case 'democratic': - show_box_top(_('Democratic Playlist'),$class); + show_box_top(T_('Democratic Playlist'),$class); require_once Config::get('prefix') . '/templates/show_democratic_playlist.inc.php'; show_box_bottom(); default: diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 52073202..0de562d2 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -170,9 +170,9 @@ class Catalog extends database_object { $this->f_name = truncate_with_ellipsis($this->name,Config::get('ellipse_threshold_title')); $this->f_name_link = '' . scrub_out($this->f_name) . ''; $this->f_path = truncate_with_ellipsis($this->path,Config::get('ellipse_threshold_title')); - $this->f_update = $this->last_update ? date('d/m/Y h:i',$this->last_update) : _('Never'); - $this->f_add = $this->last_add ? date('d/m/Y h:i',$this->last_add) : _('Never'); - $this->f_clean = $this->last_clean ? date('d/m/Y h:i',$this->last_clean) : _('Never'); + $this->f_update = $this->last_update ? date('d/m/Y h:i',$this->last_update) : T_('Never'); + $this->f_add = $this->last_add ? date('d/m/Y h:i',$this->last_add) : T_('Never'); + $this->f_clean = $this->last_clean ? date('d/m/Y h:i',$this->last_clean) : T_('Never'); } // format @@ -276,7 +276,7 @@ class Catalog extends database_object { // Make sure the path is readable/exists if (!is_readable($data['path']) AND $data['type'] == 'local') { - Error::add('general', sprintf(_('Error: %s is not readable or does not exist'), scrub_out($data['path']))); + Error::add('general', sprintf(T_('Error: %s is not readable or does not exist'), scrub_out($data['path']))); return false; } @@ -285,7 +285,7 @@ class Catalog extends database_object { $db_results = Dba::read($sql); if (Dba::num_rows($db_results)) { - Error::add('general', sprintf(_('Error: Catalog with %s already exists'), $path)); + Error::add('general', sprintf(T_('Error: Catalog with %s already exists'), $path)); return false; } @@ -312,7 +312,7 @@ class Catalog extends database_object { $insert_id = Dba::insert_id(); if (!$insert_id) { - Error::add('general', _('Catalog Insert Failed check debug logs')); + Error::add('general', T_('Catalog Insert Failed check debug logs')); debug_event('catalog','SQL Failed:' . $sql,'3'); return false; } @@ -330,7 +330,7 @@ class Catalog extends database_object { public function run_add($options) { if ($this->catalog_type == 'remote') { - show_box_top(_('Running Remote Sync') . '. . .'); + show_box_top(T_('Running Remote Sync') . '. . .'); $this->get_remote_catalog($type=0); show_box_bottom(); return true; @@ -496,14 +496,14 @@ class Catalog extends database_object { if (!is_resource($handle)) { debug_event('read', "Unable to open $path", 5,'ampache-catalog'); - Error::add('catalog_add', sprintf(_('Error: Unable to open %s'), $path)); + Error::add('catalog_add', sprintf(T_('Error: Unable to open %s'), $path)); return false; } /* Change the dir so is_dir works correctly */ if (!chdir($path)) { debug_event('read', "Unable to chdir $path", 2,'ampache-catalog'); - Error::add('catalog_add', sprintf(_('Error: Unable to change to directory %s'), $path)); + Error::add('catalog_add', sprintf(T_('Error: Unable to change to directory %s'), $path)); return false; } @@ -549,7 +549,7 @@ class Catalog extends database_object { /* Change the dir so is_dir works correctly */ if (!chdir($path)) { debug_event('read',"Unable to chdir $path",'2','ampache-catalog'); - Error::add('catalog_add', sprintf(_('Error: Unable to change to directory %s'), $path)); + Error::add('catalog_add', sprintf(T_('Error: Unable to change to directory %s'), $path)); } /* Skip to the next file */ @@ -586,14 +586,14 @@ class Catalog extends database_object { if (!$file_size) { debug_event('read',"Unable to get filesize for $full_file",'2','ampache-catalog'); /* HINT: FullFile */ - Error::add('catalog_add', sprintf(_('Error: Unable to get filesize for %s'), $full_file)); + Error::add('catalog_add', sprintf(T_('Error: Unable to get filesize for %s'), $full_file)); } // file_size check if (!is_readable($full_file)) { // not readable, warn user debug_event('read',"$full_file is not readable by ampache",'2','ampache-catalog'); /* HINT: FullFile */ - Error::add('catalog_add', sprintf(_('%s is not readable by ampache'), $full_file)); + Error::add('catalog_add', sprintf(T_('%s is not readable by ampache'), $full_file)); continue; } @@ -602,7 +602,7 @@ class Catalog extends database_object { if (strcmp($full_file,iconv(Config::get('site_charset'),Config::get('site_charset'),$full_file)) != '0') { debug_event('read',$full_file . ' has non-' . Config::get('site_charset') . ' characters and can not be indexed, converted filename:' . iconv(Config::get('site_charset'),Config::get('site_charset'),$full_file),'1'); /* HINT: FullFile */ - Error::add('catalog_add', sprintf(_('%s does not match site charset'), $full_file)); + Error::add('catalog_add', sprintf(T_('%s does not match site charset'), $full_file)); continue; } } // end if iconv @@ -1079,14 +1079,14 @@ class Catalog extends database_object { if ($info['change']) { $file = scrub_out($song->file); echo "
\n\t
"; - echo "$file " . _('Updated') . "\n"; + echo "$file " . T_('Updated') . "\n"; echo $info['text']; echo "\t
\n

"; flush(); } // if change else { echo"
\n\t
"; - echo "" . scrub_out($song->file) . "
" . _('No Update Needed') . "\n"; + echo "" . scrub_out($song->file) . "
" . T_('No Update Needed') . "\n"; echo "\t
\n

"; flush(); } @@ -1221,7 +1221,7 @@ class Catalog extends database_object { public function add_to_catalog() { if ($this->catalog_type == 'remote') { - show_box_top(_('Running Remote Update') . '. . .'); + show_box_top(T_('Running Remote Update') . '. . .'); $this->get_remote_catalog($type=0); show_box_bottom(); return true; @@ -1248,7 +1248,7 @@ class Catalog extends database_object { if ($this->import_m3u($full_file)) { $file = basename($full_file); if ($verbose) { - echo "   " . _('Added Playlist From') . " $file . . . .
\n"; + echo "   " . T_('Added Playlist From') . " $file . . . .
\n"; flush(); } } // end if import worked @@ -1277,8 +1277,8 @@ class Catalog extends database_object { } show_box_top(); - echo "\n
" . _('Catalog Update Finished') . "... " . _('Total Time') . " [" . date("i:s",$time_diff) . "] " . - _('Total Songs') . " [" . $this->count . "] " . _('Songs Per Seconds') . " [" . $song_per_sec . "]

"; + echo "\n
" . T_('Catalog Update Finished') . "... " . T_('Total Time') . " [" . date("i:s",$time_diff) . "] " . + T_('Total Songs') . " [" . $this->count . "] " . T_('Songs Per Seconds') . " [" . $song_per_sec . "]

"; show_box_bottom(); } // add_to_catalog @@ -1301,7 +1301,7 @@ class Catalog extends database_object { if ($remote_handle->state() != 'CONNECTED') { debug_event('APICLIENT','Error Unable to make API client ready','1'); - Error::add('general',_('Error Connecting to Remote Server')); + Error::add('general', T_('Error Connecting to Remote Server')); Error::display('general'); return false; } @@ -1310,7 +1310,7 @@ class Catalog extends database_object { $remote_catalog_info = $remote_handle->info(); // Tell em what we've found johnny! - printf(_('%u remote catalog(s) found (%u songs)'),$remote_catalog_info['catalogs'],$remote_catalog_info['songs']); + printf(T_('%u remote catalog(s) found (%u songs)'),$remote_catalog_info['catalogs'],$remote_catalog_info['songs']); flush(); // Hardcoded for now @@ -1334,14 +1334,14 @@ class Catalog extends database_object { foreach ($songs as $data) { if (!$this->insert_remote_song($data['song'])) { debug_event('REMOTE_INSERT','Remote Insert failed, see previous log messages -' . $data['song']['self']['id'],'1'); - Error::add('general',_('Unable to Insert Song - %s'),$data['song']['title']); + Error::add('general', T_('Unable to Insert Song - %s'),$data['song']['title']); Error::display('general'); flush(); } } // end foreach } // end while - echo "

" . _('Completed updating remote catalog(s)') . ".


\n"; + echo "

" . T_('Completed updating remote catalog(s)') . ".


\n"; flush(); // Update the last update value @@ -1384,7 +1384,7 @@ class Catalog extends database_object { // mount points fail if ($this->catalog_type == 'local' && !is_readable($this->path)) { debug_event('catalog', 'Catalog path:' . $this->path . ' unreadable, clean failed', 1); - Error::add('general',_('Catalog Root unreadable, stopping clean')); + Error::add('general', T_('Catalog Root unreadable, stopping clean')); Error::display('general'); return false; } @@ -1408,7 +1408,7 @@ class Catalog extends database_object { // Never remove everything; it might be a dead mount if ($dead_count >= $total) { debug_event('catalog', 'All files would be removed. Doing nothing.', 1); - Error::add('general', _('All files would be removed. Doing nothing')); + Error::add('general', T_('All files would be removed. Doing nothing')); continue; } if ($dead_count) { @@ -1462,7 +1462,7 @@ class Catalog extends database_object { $file_info = filesize($results['file']); if (!file_exists($results['file']) || $file_info < 1) { debug_event('clean', 'File not found or empty: ' . $results['file'], 5, 'ampache-catalog'); - Error::add('general', sprintf(_('Error File Not Found or 0 Bytes: %s'), $results['file'])); + Error::add('general', sprintf(T_('Error File Not Found or 0 Bytes: %s'), $results['file'])); // Store it in an array we'll delete it later... @@ -1479,7 +1479,7 @@ class Catalog extends database_object { if ($file_info == false) { /* Add Error */ - Error::add('general', sprintf(_('Error Remote File Not Found or 0 Bytes: %s'), $results['file'])); + Error::add('general', sprintf(T_('Error Remote File Not Found or 0 Bytes: %s'), $results['file'])); // Store it in an array we'll delete it later... @@ -1696,7 +1696,7 @@ class Catalog extends database_object { show_box_top(); echo ''; - printf(_('Catalog Verify Done. %d of %d files updated.'), $total_updated, $number); + printf(T_('Catalog Verify Done. %d of %d files updated.'), $total_updated, $number); echo "
\n"; show_box_bottom(); ob_flush(); @@ -1737,7 +1737,7 @@ class Catalog extends database_object { } if (!is_readable($row['file'])) { - Error::add('general', sprintf(_('%s does not exist or is not readable'), $row['file'])); + Error::add('general', sprintf(T_('%s does not exist or is not readable'), $row['file'])); debug_event('read', $row['file'] . ' does not exist or is not readable', 5,'ampache-catalog'); continue; } @@ -1835,7 +1835,7 @@ class Catalog extends database_object { /* Ohh no the artist has lost it's mojo! */ if (!$artist) { - $artist = _('Unknown (Orphaned)'); + $artist = T_('Unknown (Orphaned)'); } // Remove the prefix so we can sort it correctly @@ -1890,7 +1890,7 @@ class Catalog extends database_object { $sql = "UPDATE `artist` SET `mbid`='$mbid' WHERE `id`='$artist_id'"; $db_results = Dba::write($sql); if (!$db_results) { - Error::add('general', sprintf(_('Updating Artist: %s'), $artist)); + Error::add('general', sprintf(T_('Updating Artist: %s'), $artist)); } } } @@ -1911,7 +1911,7 @@ class Catalog extends database_object { $artist_id = Dba::insert_id(); if (!$db_results) { - Error::add('general', sprintf(_('Inserting Artist: %s'), $artist)); + Error::add('general', sprintf(T_('Inserting Artist: %s'), $artist)); } } // not found @@ -1943,7 +1943,7 @@ class Catalog extends database_object { /* Ohh no the album has lost its mojo */ if (!$album) { - $album = _('Unknown (Orphaned)'); + $album = T_('Unknown (Orphaned)'); unset($album_year, $album_disk); } @@ -2091,7 +2091,7 @@ class Catalog extends database_object { if (!$db_results) { debug_event('insert',"Unable to insert $file -- $sql" . Dba::error(),'5','ampache-catalog'); - Error::add('catalog_add', sprintf(_('SQL Error Adding %s'), $file)); + Error::add('catalog_add', sprintf(T_('SQL Error Adding %s'), $file)); } $song_id = Dba::insert_id(); @@ -2314,7 +2314,7 @@ class Catalog extends database_object { $playlist_id = Playlist::create($name,'public'); if (!$playlist_id) { - $reason = _('Playlist creation error.'); + $reason = T_('Playlist creation error.'); return false; } diff --git a/lib/class/config.class.php b/lib/class/config.class.php index 78745be8..8ad7189e 100644 --- a/lib/class/config.class.php +++ b/lib/class/config.class.php @@ -110,7 +110,7 @@ class Config { if (isset(self::$_global[$name]) && !$clobber) { debug_event('Config', "Tried to overwrite existing key $name without setting clobber", 5); - Error::add('Config Global', sprintf(_('Trying to clobber \'%s\' without setting clobber'), $name)); + Error::add('Config Global', sprintf(T_('Trying to clobber \'%s\' without setting clobber'), $name)); return false; } diff --git a/lib/class/democratic.class.php b/lib/class/democratic.class.php index a0ea01a5..71699960 100644 --- a/lib/class/democratic.class.php +++ b/lib/class/democratic.class.php @@ -150,24 +150,24 @@ class Democratic extends tmpPlaylist { */ public function format() { - $this->f_cooldown = $this->cooldown . ' ' . _('minutes'); - $this->f_primary = $this->primary ? _('Primary') : ''; + $this->f_cooldown = $this->cooldown . ' ' . T_('minutes'); + $this->f_primary = $this->primary ? T_('Primary') : ''; switch ($this->level) { case '5': - $this->f_level = _('Guest'); + $this->f_level = T_('Guest'); break; case '25': - $this->f_level = _('User'); + $this->f_level = T_('User'); break; case '50': - $this->f_level = _('Content Manager'); + $this->f_level = T_('Content Manager'); break; case '75': - $this->f_level = _('Catalog Manager'); + $this->f_level = T_('Catalog Manager'); break; case '100': - $this->f_level = _('Admin'); + $this->f_level = T_('Admin'); break; } diff --git a/lib/class/flag.class.php b/lib/class/flag.class.php index b3791dbd..bbb3f4a0 100644 --- a/lib/class/flag.class.php +++ b/lib/class/flag.class.php @@ -322,8 +322,8 @@ class Flag extends database_object { */ public function print_status() { - if ($this->approved) { echo _('Approved'); } - else { echo _('Pending'); } + if ($this->approved) { echo T_('Approved'); } + else { echo T_('Pending'); } } // print_status @@ -335,19 +335,19 @@ class Flag extends database_object { switch ($this->flag) { case 'delete': - $name = _('Delete'); + $name = T_('Delete'); break; case 'retag': - $name = _('Re-Tag'); + $name = T_('Re-Tag'); break; case 'reencode': - $name = _('Re-encode'); + $name = T_('Re-encode'); break; case 'other': - $name = _('Other'); + $name = T_('Other'); break; default: - $name = _('Unknown'); + $name = T_('Unknown'); break; } // end switch diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index ef03b1c3..cebc5bff 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -653,16 +653,16 @@ class Localplay { switch ($state) { case 'play': - return _('Now Playing'); + return T_('Now Playing'); break; case 'stop': - return _('Stopped'); + return T_('Stopped'); break; case 'pause': - return _('Paused'); + return T_('Paused'); break; default: - return _('Unknown'); + return T_('Unknown'); break; } // switch on state diff --git a/lib/class/playlist_object.abstract.php b/lib/class/playlist_object.abstract.php index def7b3f2..fd9b0147 100644 --- a/lib/class/playlist_object.abstract.php +++ b/lib/class/playlist_object.abstract.php @@ -39,7 +39,7 @@ abstract class playlist_object extends database_object { public function format() { $this->f_name = truncate_with_ellipsis($this->name,Config::get('ellipse_threshold_title')); - $this->f_type = ($this->type == 'private') ? get_user_icon('lock',_('Private')) : ''; + $this->f_type = ($this->type == 'private') ? get_user_icon('lock', T_('Private')) : ''; $client = new User($this->user); diff --git a/lib/class/query.class.php b/lib/class/query.class.php index 49a978af..1dffd35b 100644 --- a/lib/class/query.class.php +++ b/lib/class/query.class.php @@ -79,7 +79,7 @@ class Query { return true; } - Error::add('browse', _('Browse not found or expired, try reloading the page')); + Error::add('browse', T_('Browse not found or expired, try reloading the page')); return false; } diff --git a/lib/class/radio.class.php b/lib/class/radio.class.php index 46743614..d4be4f76 100644 --- a/lib/class/radio.class.php +++ b/lib/class/radio.class.php @@ -92,11 +92,11 @@ class Radio extends database_object implements media { // Verify the incoming data if (!$data['id']) { - Error::add('general', _('Missing ID')); + Error::add('general', T_('Missing ID')); } if (!$data['name']) { - Error::add('general', _('Name Required')); + Error::add('general', T_('Name Required')); } $allowed_array = array('https','http','mms','mmsh','mmsu','mmst','rtsp'); @@ -104,7 +104,7 @@ class Radio extends database_object implements media { $elements = explode(":",$data['url']); if (!in_array($elements['0'],$allowed_array)) { - Error::add('general', _('Invalid URL must be mms:// , https:// or http://')); + Error::add('general', T_('Invalid URL must be mms:// , https:// or http://')); } if (Error::occurred()) { @@ -136,7 +136,7 @@ class Radio extends database_object implements media { // Make sure we've got a name if (!strlen($data['name'])) { - Error::add('name', _('Name Required')); + Error::add('name', T_('Name Required')); } $allowed_array = array('https','http','mms','mmsh','mmsu','mmst','rtsp'); @@ -144,13 +144,13 @@ class Radio extends database_object implements media { $elements = explode(":",$data['url']); if (!in_array($elements['0'],$allowed_array)) { - Error::add('url', _('Invalid URL must be http:// or https://')); + Error::add('url', T_('Invalid URL must be http:// or https://')); } // Make sure it's a real catalog $catalog = new Catalog($data['catalog']); if (!$catalog->name) { - Error::add('catalog', _('Invalid Catalog')); + Error::add('catalog', T_('Invalid Catalog')); } if (Error::occurred()) { return false; } diff --git a/lib/class/random.class.php b/lib/class/random.class.php index ef6c3037..5dc8b47b 100644 --- a/lib/class/random.class.php +++ b/lib/class/random.class.php @@ -368,16 +368,16 @@ class Random implements media { switch ($type) { case 'album': - return _('Related Album'); + return T_('Related Album'); break; case 'genre': - return _('Related Genre'); + return T_('Related Genre'); break; case 'artist': - return _('Related Artist'); + return T_('Related Artist'); break; default: - return _('Pure Random'); + return T_('Pure Random'); break; } // end switch diff --git a/lib/class/registration.class.php b/lib/class/registration.class.php index 6175b016..bfc49d4b 100644 --- a/lib/class/registration.class.php +++ b/lib/class/registration.class.php @@ -59,9 +59,9 @@ class Registration { // We are the system $mailer->set_default_sender(); - $mailer->subject = sprintf(_("New User Registration at %s"), Config::get('site_title')); + $mailer->subject = sprintf(T_("New User Registration at %s"), Config::get('site_title')); - $mailer->message = sprintf(_("Thank you for registering\n\n + $mailer->message = sprintf(T_("Thank you for registering\n\n Please keep this e-mail for your records. Your account information is as follows: ---------------------- Username: %s @@ -82,7 +82,7 @@ Thank you for registering // Check to see if the admin should be notified if (Config::get('admin_notify_reg')) { - $mailer->message = sprintf(_("A new user has registered + $mailer->message = sprintf(T_("A new user has registered The following values were entered. Username: %s diff --git a/lib/class/search.class.php b/lib/class/search.class.php index fc860ed9..eaa45a97 100644 --- a/lib/class/search.class.php +++ b/lib/class/search.class.php @@ -53,55 +53,55 @@ class Search extends playlist_object { $this->basetypes['numeric'][] = array( 'name' => 'gte', - 'description' => _('is greater than or equal to'), + 'description' => T_('is greater than or equal to'), 'sql' => '>=' ); $this->basetypes['numeric'][] = array( 'name' => 'lte', - 'description' => _('is less than or equal to'), + 'description' => T_('is less than or equal to'), 'sql' => '<=' ); $this->basetypes['numeric'][] = array( 'name' => 'equal', - 'description' => _('is'), + 'description' => T_('is'), 'sql' => '<=>' ); $this->basetypes['numeric'][] = array( 'name' => 'ne', - 'description' => _('is not'), + 'description' => T_('is not'), 'sql' => '<>' ); $this->basetypes['numeric'][] = array( 'name' => 'gt', - 'description' => _('is greater than'), + 'description' => T_('is greater than'), 'sql' => '>' ); $this->basetypes['numeric'][] = array( 'name' => 'lt', - 'description' => _('is less than'), + 'description' => T_('is less than'), 'sql' => '<' ); $this->basetypes['boolean'][] = array( 'name' => 'true', - 'description' => _('is true') + 'description' => T_('is true') ); $this->basetypes['boolean'][] = array( 'name' => 'false', - 'description' => _('is false') + 'description' => T_('is false') ); $this->basetypes['text'][] = array( 'name' => 'contain', - 'description' => _('contains'), + 'description' => T_('contains'), 'sql' => 'LIKE', 'preg_match' => array('/^/','/$/'), 'preg_replace' => array('%', '%') @@ -109,7 +109,7 @@ class Search extends playlist_object { $this->basetypes['text'][] = array( 'name' => 'notcontain', - 'description' => _('does not contain'), + 'description' => T_('does not contain'), 'sql' => 'NOT LIKE', 'preg_match' => array('/^/','/$/'), 'preg_replace' => array('%', '%') @@ -117,7 +117,7 @@ class Search extends playlist_object { $this->basetypes['text'][] = array( 'name' => 'start', - 'description' => _('starts with'), + 'description' => T_('starts with'), 'sql' => 'LIKE', 'preg_match' => '/$/', 'preg_replace' => '%' @@ -125,7 +125,7 @@ class Search extends playlist_object { $this->basetypes['text'][] = array( 'name' => 'end', - 'description' => _('ends with'), + 'description' => T_('ends with'), 'sql' => 'LIKE', 'preg_match' => '/^/', 'preg_replace' => '%' @@ -133,58 +133,58 @@ class Search extends playlist_object { $this->basetypes['text'][] = array( 'name' => 'equal', - 'description' => _('is'), + 'description' => T_('is'), 'sql' => '=' ); $this->basetypes['text'][] = array( 'name' => 'sounds', - 'description' => _('sounds like'), + 'description' => T_('sounds like'), 'sql' => 'SOUNDS LIKE' ); $this->basetypes['text'][] = array( 'name' => 'notsounds', - 'description' => _('does not sound like'), + 'description' => T_('does not sound like'), 'sql' => 'NOT SOUNDS LIKE' ); $this->basetypes['boolean_numeric'][] = array( 'name' => 'equal', - 'description' => _('is'), + 'description' => T_('is'), 'sql' => '<=>' ); $this->basetypes['boolean_numeric'][] = array( 'name' => 'ne', - 'description' => _('is not'), + 'description' => T_('is not'), 'sql' => '<>' ); $this->basetypes['boolean_subsearch'][] = array( 'name' => 'equal', - 'description' => _('is'), + 'description' => T_('is'), 'sql' => '' ); $this->basetypes['boolean_subsearch'][] = array( 'name' => 'ne', - 'description' => _('is not'), + 'description' => T_('is not'), 'sql' => 'NOT' ); $this->basetypes['date'][] = array( 'name' => 'lt', - 'description' => _('before'), + 'description' => T_('before'), 'sql' => '>' ); $this->basetypes['date'][] = array( 'name' => 'gt', - 'description' => _('after'), + 'description' => T_('after'), 'sql' => '>' ); @@ -192,35 +192,35 @@ class Search extends playlist_object { case 'song': $this->types[] = array( 'name' => 'anywhere', - 'label' => _('Any searchable text'), + 'label' => T_('Any searchable text'), 'type' => 'text', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'title', - 'label' => _('Title'), + 'label' => T_('Title'), 'type' => 'text', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'album', - 'label' => _('Album'), + 'label' => T_('Album'), 'type' => 'text', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'artist', - 'label' => _('Artist'), + 'label' => T_('Artist'), 'type' => 'text', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'comment', - 'label' => _('Comment'), + 'label' => T_('Comment'), 'type' => 'text', 'widget' => array('input', 'text') ); @@ -228,28 +228,28 @@ class Search extends playlist_object { $this->types[] = array( 'name' => 'tag', - 'label' => _('Tag'), + 'label' => T_('Tag'), 'type' => 'text', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'file', - 'label' => _('Filename'), + 'label' => T_('Filename'), 'type' => 'text', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'year', - 'label' => _('Year'), + 'label' => T_('Year'), 'type' => 'numeric', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'time', - 'label' => _('Length (in minutes)'), + 'label' => T_('Length (in minutes)'), 'type' => 'numeric', 'widget' => array('input', 'text') ); @@ -257,7 +257,7 @@ class Search extends playlist_object { if (Config::get('ratings')) { $this->types[] = array( 'name' => 'rating', - 'label' => _('Rating'), + 'label' => T_('Rating'), 'type' => 'numeric', 'widget' => array( 'select', @@ -274,7 +274,7 @@ class Search extends playlist_object { $this->types[] = array( 'name' => 'bitrate', - 'label' => _('Bitrate'), + 'label' => T_('Bitrate'), 'type' => 'numeric', 'widget' => array( 'select', @@ -299,21 +299,21 @@ class Search extends playlist_object { $this->types[] = array( 'name' => 'played', - 'label' => _('Played'), + 'label' => T_('Played'), 'type' => 'boolean', 'widget' => array('input', 'hidden') ); $this->types[] = array( 'name' => 'added', - 'label' => _('Added'), + 'label' => T_('Added'), 'type' => 'date', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'updated', - 'label' => _('Updated'), + 'label' => T_('Updated'), 'type' => 'date', 'widget' => array('input', 'text') ); @@ -326,7 +326,7 @@ class Search extends playlist_object { } $this->types[] = array( 'name' => 'catalog', - 'label' => _('Catalog'), + 'label' => T_('Catalog'), 'type' => 'boolean_numeric', 'widget' => array('select', $catalogs) ); @@ -339,7 +339,7 @@ class Search extends playlist_object { } $this->types[] = array( 'name' => 'playlist', - 'label' => _('Playlist'), + 'label' => T_('Playlist'), 'type' => 'boolean_numeric', 'widget' => array('select', $playlists) ); @@ -352,7 +352,7 @@ class Search extends playlist_object { } $this->types[] = array( 'name' => 'smartplaylist', - 'label' => _('Smart Playlist'), + 'label' => T_('Smart Playlist'), 'type' => 'boolean_subsearch', 'widget' => array('select', $playlists) ); @@ -360,14 +360,14 @@ class Search extends playlist_object { case 'album': $this->types[] = array( 'name' => 'title', - 'label' => _('Title'), + 'label' => T_('Title'), 'type' => 'text', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'year', - 'label' => _('Year'), + 'label' => T_('Year'), 'type' => 'numeric', 'widget' => array('input', 'text') ); @@ -375,7 +375,7 @@ class Search extends playlist_object { if (Config::get('ratings')) { $this->types[] = array( 'name' => 'rating', - 'label' => _('Rating'), + 'label' => T_('Rating'), 'type' => 'numeric', 'widget' => array( 'select', @@ -398,7 +398,7 @@ class Search extends playlist_object { } $this->types[] = array( 'name' => 'catalog', - 'label' => _('Catalog'), + 'label' => T_('Catalog'), 'type' => 'boolean_numeric', 'widget' => array('select', $catalogs) ); @@ -406,7 +406,7 @@ class Search extends playlist_object { $this->types[] = array( 'name' => 'tag', - 'label' => _('Tag'), + 'label' => T_('Tag'), 'type' => 'text', 'widget' => array('input', 'text') ); @@ -414,7 +414,7 @@ class Search extends playlist_object { case 'video': $this->types[] = array( 'name' => 'filename', - 'label' => _('Filename'), + 'label' => T_('Filename'), 'type' => 'text', 'widget' => array('input', 'text') ); @@ -422,13 +422,13 @@ class Search extends playlist_object { case 'artist': $this->types[] = array( 'name' => 'name', - 'label' => _('Name'), + 'label' => T_('Name'), 'type' => 'text', 'widget' => array('input', 'text') ); $this->types[] = array( 'name' => 'tag', - 'label' => _('Tag'), + 'label' => T_('Tag'), 'type' => 'text', 'widget' => array('input', 'text') ); diff --git a/lib/class/update.class.php b/lib/class/update.class.php index c1a6c3fb..3401436b 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -417,7 +417,7 @@ class Update { if (!$update_needed) { if (!defined('CLI')) { echo '

'; } - echo _('No updates needed.'); + echo T_('No updates needed.'); if (!defined('CLI')) { echo '[Return]

'; } @@ -446,7 +446,7 @@ class Update { /* Verify that there are no plugins installed //FIXME: provide a link to remove all plugins, otherwise this could turn into a catch 22 if (!$self::plugins_installed()) { - $GLOBALS['error']->add_error('general',_('Plugins detected, please remove all Plugins and try again')); + $GLOBALS['error']->add_error('general', T_('Plugins detected, please remove all Plugins and try again')); return false; } */ diff --git a/lib/class/user.class.php b/lib/class/user.class.php index 4b283d62..09000600 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -408,11 +408,11 @@ class User extends database_object { public function update($data) { if (empty($data['username'])) { - Error::add('username',_('Error Username Required')); + Error::add('username', T_('Error Username Required')); } if ($data['password1'] != $data['password2'] AND !empty($data['password1'])) { - Error::add('password',_("Error Passwords don't match")); + Error::add('password', T_("Error Passwords don't match")); } if (Error::occurred()) { @@ -696,11 +696,11 @@ class User extends database_object { public function format() { /* If they have a last seen date */ - if (!$this->last_seen) { $this->f_last_seen = _('Never'); } + if (!$this->last_seen) { $this->f_last_seen = T_('Never'); } else { $this->f_last_seen = date("m\/d\/Y - H:i",$this->last_seen); } /* If they have a create date */ - if (!$this->create_date) { $this->f_create_date = _('Unknown'); } + if (!$this->create_date) { $this->f_create_date = T_('Unknown'); } else { $this->f_create_date = date("m\/d\/Y - H:i",$this->create_date); } // Base link @@ -722,7 +722,7 @@ class User extends database_object { $this->ip_history = inet_ntop($data['0']['ip']); } else { - $this->ip_history = _('Not Enough Data'); + $this->ip_history = T_('Not Enough Data'); } } // format_user diff --git a/lib/class/video.class.php b/lib/class/video.class.php index 5051fa97..22bafa19 100644 --- a/lib/class/video.class.php +++ b/lib/class/video.class.php @@ -91,7 +91,7 @@ class Video extends database_object implements media { $this->f_codec = $this->video_codec . ' / ' . $this->audio_codec; $this->f_resolution = $this->resolution_x . 'x' . $this->resolution_y; $this->f_tags = ''; - $this->f_length = floor($this->time/60) . ' ' . _('minutes'); + $this->f_length = floor($this->time/60) . ' ' . T_('minutes'); } // format diff --git a/lib/general.lib.php b/lib/general.lib.php index a739c081..2e8d66df 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -238,7 +238,7 @@ function get_languages() { case 'ar_SA'; $name = 'العربية'; break; /* Arabic */ case 'he_IL'; $name = 'עברית'; break; /* Hebrew */ case 'fa_IR'; $name = 'فارسي'; break; /* Farsi */ - default: $name = _('Unknown'); break; + default: $name = T_('Unknown'); break; } // end switch diff --git a/lib/install.lib.php b/lib/install.lib.php index bb26cd47..e99d2438 100644 --- a/lib/install.lib.php +++ b/lib/install.lib.php @@ -75,7 +75,7 @@ function install_check_status($configfile) { if (!file_exists($configfile)) { return true; } else { - Error::add('general',_('Config file already exists, install is probably completed')); + Error::add('general', T_('Config file already exists, install is probably completed')); } /* @@ -86,14 +86,14 @@ function install_check_status($configfile) { $dbh = check_database($results['database_hostname'],$results['database_username'],$results['database_password']); if (!is_resource($dbh)) { - Error::add('general',_('Unable to connect to database, check your ampache config')); + Error::add('general', T_('Unable to connect to database, check your ampache config')); return false; } $select_db = mysql_select_db($results['database_name'],$dbh); if (!$select_db) { - Error::add('general',_('Unable to select database, check your ampache config')); + Error::add('general', T_('Unable to select database, check your ampache config')); return false; } @@ -103,7 +103,7 @@ function install_check_status($configfile) { return true; } else { - Error::add('general',_('Existing Database detected, unable to continue installation')); + Error::add('general', T_('Existing Database detected, unable to continue installation')); return false; } @@ -123,7 +123,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false $is_valid = preg_match("/([^\d\w\_\-])/",$database,$matches); if (count($matches)) { - Error::add('general',_('Error: Database name invalid must not be a reserved word, and must be Alphanumeric')); + Error::add('general', T_('Error: Database name invalid must not be a reserved word, and must be Alphanumeric')); return false; } @@ -140,7 +140,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false $dbh = Dba::dbh(); if (!is_resource($dbh)) { - Error::add('general', sprintf(_('Error: Unable to make Database Connection %s'), mysql_error())); + Error::add('general', sprintf(T_('Error: Unable to make Database Connection %s'), mysql_error())); return false; } @@ -151,13 +151,13 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false // Rien a faire, we've got the db just blow through } elseif ($db_selected && !$_POST['overwrite_db']) { - Error::add('general',_('Error: Database Already exists and Overwrite not checked')); + Error::add('general', T_('Error: Database Already exists and Overwrite not checked')); return false; } elseif (!$db_selected) { $sql = "CREATE DATABASE `" . Dba::escape($database) . "`"; if (!$db_results = @mysql_query($sql, $dbh)) { - Error::add('general',sprintf(_('Error: Unable to Create Database %s'), mysql_error())); + Error::add('general',sprintf(T_('Error: Unable to Create Database %s'), mysql_error())); return false; } @mysql_select_db($database, $dbh); @@ -167,7 +167,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false $db_results = @mysql_query($sql,$dbh); $sql = "CREATE DATABASE `" . Dba::escape($database) . "`"; if (!$db_results = @mysql_query($sql, $dbh)) { - Error::add('general', sprintf(_('Error: Unable to Create Database %s'), mysql_error())); + Error::add('general', sprintf(T_('Error: Unable to Create Database %s'), mysql_error())); return false; } @mysql_select_db($database, $dbh); @@ -180,7 +180,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false $db_pass = $_POST['db_password'] ? $_POST['db_password'] : $dbpass; if (!strlen($db_user) || !strlen($db_pass)) { - Error::add('general',_('Error: Ampache SQL Username or Password missing')); + Error::add('general', T_('Error: Ampache SQL Username or Password missing')); return false; } @@ -189,7 +189,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false if (!$db_results = @mysql_query($sql, $dbh)) { // HINT: 1: db_user, 2: database, 3: hostname, 4: mysql_error() - Error::add('general', sprintf(_('Error: Unable to Insert %1$s with permissions to %2$s on %3$s %4$s'), $db_user, $database, $hostname, mysql_error())); + Error::add('general', sprintf(T_('Error: Unable to Insert %1$s with permissions to %2$s on %3$s %4$s'), $db_user, $database, $hostname, mysql_error())); return false; } } // end if we are creating a user @@ -258,11 +258,11 @@ function install_create_config($web_path,$username,$password,$hostname,$database */ // Connect to the DB if(!is_resource($dbh)) { - Error::add('general', _("Database Connection Failed Check Hostname, Username and Password")); + Error::add('general', T_("Database Connection Failed Check Hostname, Username and Password")); return false; } if (!@mysql_select_db($database, $dbh)) { - Error::add('general', sprintf(_('Database Selection Failure Check Existance of %s'), $database)); + Error::add('general', sprintf(T_('Database Selection Failure Check Existance of %s'), $database)); return false; } @@ -271,13 +271,13 @@ function install_create_config($web_path,$username,$password,$hostname,$database // Make sure the directory is writable OR the empty config file is if (!$download) { if (!check_config_writable()) { - Error::add('general', _("Config file is not writable")); + Error::add('general', T_("Config file is not writable")); return false; } else { // Given that $final is > 0, we can ignore lazy comparison problems if (!file_put_contents($config_file,$final)) { - Error::add('general', _("Error Writing config file")); + Error::add('general', T_("Error Writing config file")); return false; } } @@ -300,26 +300,26 @@ function install_create_config($web_path,$username,$password,$hostname,$database function install_create_account($username,$password,$password2) { if (!strlen($username) OR !strlen($password)) { - Error::add('general',_('No Username/Password specified')); + Error::add('general', T_('No Username/Password specified')); return false; } if ($password !== $password2) { - Error::add('general',_('Passwords do not match')); + Error::add('general', T_('Passwords do not match')); return false; } $dbh = Dba::dbh(); if (!is_resource($dbh)) { - Error::add('general', sprintf(_('Database Connection Failed: %s'), mysql_error())); + Error::add('general', sprintf(T_('Database Connection Failed: %s'), mysql_error())); return false; } $db_select = @mysql_select_db(Config::get('database_name'),$dbh); if (!$db_select) { - Error::add('general', sprintf(_('Database Select Failed: %s'), mysql_error())); + Error::add('general', sprintf(T_('Database Select Failed: %s'), mysql_error())); return false; } @@ -329,7 +329,7 @@ function install_create_account($username,$password,$password2) { $insert_id = User::create($username,'Administrator','',$password,'100'); if (!$insert_id) { - Error::add('general', sprintf(_('Insert of Base User Failed %s'), mysql_error())); + Error::add('general', sprintf(T_('Insert of Base User Failed %s'), mysql_error())); return false; } diff --git a/lib/javascript/search-data.php b/lib/javascript/search-data.php index 18432454..333d6acc 100644 --- a/lib/javascript/search-data.php +++ b/lib/javascript/search-data.php @@ -47,5 +47,5 @@ echo 'var types = $H(\''; echo arrayToJSON($search->types) . "'.evalJSON());\n"; echo 'var basetypes = $H(\''; echo arrayToJSON($search->basetypes) . "'.evalJSON());\n"; -echo 'removeIcon = \'' . get_user_icon('disable', _('Remove')) . '\';'; +echo 'removeIcon = \'' . get_user_icon('disable', T_('Remove')) . '\';'; ?> diff --git a/lib/preferences.php b/lib/preferences.php index a0e21edb..4f9a26b9 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -171,8 +171,8 @@ function create_preference_input($name,$value) { if ($value == '1') { $is_true = "selected=\"selected\""; } else { $is_false = "selected=\"selected\""; } echo "\n"; break; case 'play_type': @@ -181,29 +181,29 @@ function create_preference_input($name,$value) { elseif ($value == 'xspf_player') { $is_xspf_player = 'selected="selected"'; } else { $is_stream = "selected=\"selected\""; } echo "\n"; break; case 'playlist_type': $var_name = $value . "_type"; ${$var_name} = "selected=\"selected\""; echo "\n"; break; case 'lang': @@ -219,7 +219,7 @@ function create_preference_input($name,$value) { case 'localplay_controller': $controllers = Localplay::get_controllers(); echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; break; case 'theme_name': @@ -252,42 +252,42 @@ function create_preference_input($name,$value) { case 'playlist_method': ${$value} = ' selected="selected"'; echo "\n"; break; case 'bandwidth': ${"bandwidth_$value"} = ' selected="selected"'; echo "\n"; break; case 'features': ${"features_$value"} = ' selected="selected"'; echo "\n"; break; case 'transcode': ${$value} = ' selected="selected"'; echo "\n"; break; case 'show_lyrics': if ($value == '1') { $is_true = "selected=\"selected\""; } else { $is_false = "selected=\"selected\""; } echo "\n"; break; default: diff --git a/lib/rating.lib.php b/lib/rating.lib.php index 42bd8d59..3323f6e5 100644 --- a/lib/rating.lib.php +++ b/lib/rating.lib.php @@ -55,26 +55,26 @@ function get_rating_name($score) { switch ($score) { case '0': - return _("Don't Play"); + return T_("Don't Play"); break; case '1': - return _("It's Pretty Bad"); + return T_("It's Pretty Bad"); break; case '2': - return _("It's Ok"); + return T_("It's Ok"); break; case '3': - return _("It's Pretty Good"); + return T_("It's Pretty Good"); break; case '4': - return _("I Love It!"); + return T_("I Love It!"); break; case '5': - return _("It's Insane"); + return T_("It's Insane"); break; // I'm fired default: - return _("Off the Charts!"); + return T_("Off the Charts!"); break; } // end switch diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 756db2fb..ce0a12ed 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -202,68 +202,68 @@ function get_location() { switch ($location['page']) { case 'index.php': - $location['title'] = _('Home'); + $location['title'] = T_('Home'); break; case 'upload.php': - $location['title'] = _('Upload'); + $location['title'] = T_('Upload'); break; case 'localplay.php': - $location['title'] = _('Local Play'); + $location['title'] = T_('Local Play'); break; case 'randomplay.php': - $location['title'] = _('Random Play'); + $location['title'] = T_('Random Play'); break; case 'playlist.php': - $location['title'] = _('Playlist'); + $location['title'] = T_('Playlist'); break; case 'search.php': - $location['title'] = _('Search'); + $location['title'] = T_('Search'); break; case 'preferences.php': - $location['title'] = _('Preferences'); + $location['title'] = T_('Preferences'); break; case 'admin/index.php': - $location['title'] = _('Admin-Catalog'); + $location['title'] = T_('Admin-Catalog'); $location['section'] = 'admin'; break; case 'admin/catalog.php': - $location['title'] = _('Admin-Catalog'); + $location['title'] = T_('Admin-Catalog'); $location['section'] = 'admin'; break; case 'admin/users.php': - $location['title'] = _('Admin-User Management'); + $location['title'] = T_('Admin-User Management'); $location['section'] = 'admin'; break; case 'admin/mail.php': - $location['title'] = _('Admin-Mail Users'); + $location['title'] = T_('Admin-Mail Users'); $location['section'] = 'admin'; break; case 'admin/access.php': - $location['title'] = _('Admin-Manage Access Lists'); + $location['title'] = T_('Admin-Manage Access Lists'); $location['section'] = 'admin'; break; case 'admin/preferences.php': - $location['title'] = _('Admin-Site Preferences'); + $location['title'] = T_('Admin-Site Preferences'); $location['section'] = 'admin'; break; case 'admin/modules.php': - $location['title'] = _('Admin-Manage Modules'); + $location['title'] = T_('Admin-Manage Modules'); $location['section'] = 'admin'; break; case 'browse.php': - $location['title'] = _('Browse Music'); + $location['title'] = T_('Browse Music'); $location['section'] = 'browse'; break; case 'albums.php': - $location['title'] = _('Albums'); + $location['title'] = T_('Albums'); $location['section'] = 'browse'; break; case 'artists.php': - $location['title'] = _('Artists'); + $location['title'] = T_('Artists'); $location['section'] = 'browse'; break; case 'stats.php': - $location['title'] = _('Statistics'); + $location['title'] = T_('Statistics'); break; default: $location['title'] = ''; @@ -317,7 +317,7 @@ function show_album_select($name='album',$album_id=0,$allow_add=0,$song_id=0) { if ($allow_add) { // Append additional option to the end with value=-1 - echo "\t\n"; + echo "\t\n"; } echo "\n"; @@ -397,7 +397,7 @@ function show_catalog_select($name='catalog',$catalog_id=0,$style='') { function show_user_select($name,$selected='',$style='') { echo "\n"; - echo "\t\n"; + echo "\t\n"; $sql = "SELECT `id`,`name` FROM `playlist` ORDER BY `name`"; $db_results = Dba::read($sql); @@ -480,7 +480,7 @@ function get_user_icon($name,$title='',$id='') { $name = $name['0']; } - if (!$title) { $title = _(ucfirst($name)); } + if (!$title) { $title = T_(ucfirst($name)); } if ($id) { $id = ' id="' . $id . '" '; @@ -747,10 +747,10 @@ function update_text($field, $value) { function print_bool($value) { if ($value) { - $string = '' . _('On') . ''; + $string = '' . T_('On') . ''; } else { - $string = '' . _('Off') . ''; + $string = '' . T_('Off') . ''; } return $string; diff --git a/locale/base/TRANSLATIONS b/locale/base/TRANSLATIONS index 43e14519..eb97391d 100644 --- a/locale/base/TRANSLATIONS +++ b/locale/base/TRANSLATIONS @@ -89,7 +89,7 @@ Creating a New Translation: the "create_preference_input" function and add a line for your own language. For example to add en_US support add the following line - echo "\t\n"; + echo "\t\n"; Make sure that it comes after the -
+
id . '&key=min_count&value=1', '')); ?> -
+
id . '&key=rated&value=1', '')); ?> get_filter('unplayed') ? 'checked="checked"' : ''; ?>/> -
+
get_filter('playlist_type') ? 'checked="checked"' : ''; ?>/> -
+
id . '&key=playlist_type&value=1','')); ?> get_filter('object_type'); ${$string} = 'selected="selected"'; ?> /> -
+
id . '&type=song','')); ?> -
+
id . '&type=album','')); ?> -
+
id . '&type=artist','')); ?>
-
+
/> +  /> id, '')); ?> diff --git a/templates/error_page.inc.php b/templates/error_page.inc.php index 91c73be5..0ea85359 100644 --- a/templates/error_page.inc.php +++ b/templates/error_page.inc.php @@ -34,7 +34,7 @@ -<?php echo( _("Ampache error page"));?> +<?php echo( T_("Ampache error page"));?> @@ -51,9 +51,9 @@
 
- +

- :
+ :
diff --git a/templates/footer.inc.php b/templates/footer.inc.php index 21e8fe59..f40c2a75 100644 --- a/templates/footer.inc.php +++ b/templates/footer.inc.php @@ -28,14 +28,14 @@ ?>
- + diff --git a/templates/header.inc.php b/templates/header.inc.php index 8a7fe98f..86c62046 100644 --- a/templates/header.inc.php +++ b/templates/header.inc.php @@ -47,8 +47,8 @@ if(!is_file($cssdir.'default-rtl.css')) { - - + + <?php echo scrub_out(Config::get('site_title')); ?> - <?php echo $location['title']; ?> @@ -73,7 +73,7 @@ if (Config::get('use_rss')) { ?> - fullname; ?> [] + fullname; ?> [] @@ -89,7 +89,7 @@ if (Config::get('use_rss')) { ?>
has_access(100)) { ?>
- - + +
diff --git a/templates/install_header.inc.php b/templates/install_header.inc.php index 9f91b952..57ee13db 100644 --- a/templates/install_header.inc.php +++ b/templates/install_header.inc.php @@ -41,20 +41,20 @@ $prefix = realpath(dirname(__FILE__). "/../");
-

+

- +

    -
  • -
  • +
  • +

- +

diff --git a/templates/list_header.inc.php b/templates/list_header.inc.php index 26366a18..ed66bb92 100644 --- a/templates/list_header.inc.php +++ b/templates/list_header.inc.php @@ -106,8 +106,8 @@ if ($pages > 1) { ?>
- id . '&start=' . $prev_offset,_('Prev'),'browse_' . $uid . 'prev','','prev'); ?> - id . '&start=' . $next_offset,_('Next'),'browse_' . $uid . 'next','','next'); ?> + id . '&start=' . $prev_offset, T_('Prev'),'browse_' . $uid . 'prev','','prev'); ?> + id . '&start=' . $next_offset, T_('Next'),'browse_' . $uid . 'next','','next'); ?> $offset) { diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php index c860b77f..3085a405 100644 --- a/templates/rightbar.inc.php +++ b/templates/rightbar.inc.php @@ -29,13 +29,13 @@ ?>
  • - +
  • - + diff --git a/templates/show_access_list.inc.php b/templates/show_access_list.inc.php index 0e1e687d..1840bd99 100644 --- a/templates/show_access_list.inc.php +++ b/templates/show_access_list.inc.php @@ -32,40 +32,40 @@ */ ?> - +
    • - - + +
    • - - + +
    • - - + +
    • - - + +
    - + - - - - - - - + + + + + + + f_user; ?> diff --git a/templates/show_account.inc.php b/templates/show_account.inc.php index 1b4035f3..781860c5 100644 --- a/templates/show_account.inc.php +++ b/templates/show_account.inc.php @@ -32,32 +32,32 @@
    f_type; ?> - - + +
    - + - + - + - + - + @@ -67,5 +67,5 @@ - + diff --git a/templates/show_add_access.inc.php b/templates/show_add_access.inc.php index 89f01f9a..b458407d 100644 --- a/templates/show_add_access.inc.php +++ b/templates/show_add_access.inc.php @@ -27,65 +27,65 @@ */ ?> - +
    ::
    ::
    ::
    ::
    ::
    - + - + - + - + - + - + - - + - +
    ::
    :: - - - - + + + +
    ::
    ::

    ::

    +

    (255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)
    :: :: @@ -94,7 +94,7 @@
    - +
  • diff --git a/templates/show_add_access_current.inc.php b/templates/show_add_access_current.inc.php index ab86ec84..1f1f18db 100644 --- a/templates/show_add_access_current.inc.php +++ b/templates/show_add_access_current.inc.php @@ -27,39 +27,39 @@ */ ?> - +
    - + - + - + - + - + - + @@ -67,7 +67,7 @@
    ::
    ::
    :: - - - - + + + +
    ::

    ::
    - +
    diff --git a/templates/show_add_access_local.inc.php b/templates/show_add_access_local.inc.php index 81587b1a..ef204483 100644 --- a/templates/show_add_access_local.inc.php +++ b/templates/show_add_access_local.inc.php @@ -27,62 +27,62 @@ */ ?> - +
    - + - + - + - + - + - + - - + - +
    ::
    :: - - - - + + + +
    ::
    :: -
    - + +
    - +
    +
    + + +
    + +

    ::

    +

    (255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)
    :: :: @@ -91,7 +91,7 @@
    - +
    diff --git a/templates/show_add_access_rpc.inc.php b/templates/show_add_access_rpc.inc.php index e7c2ecd8..ed9d8a8d 100644 --- a/templates/show_add_access_rpc.inc.php +++ b/templates/show_add_access_rpc.inc.php @@ -27,62 +27,62 @@ */ ?> - +
    - + - + - + - + - + - + - - + - +
    ::
    :: - - - - + + + +
    ::
    :: -
    - +
    - + +
    + +
    + +

    ::

    +

    (255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)
    :: :: @@ -91,7 +91,7 @@
    - +
    diff --git a/templates/show_add_catalog.inc.php b/templates/show_add_catalog.inc.php index 2b352d4b..2bd217b6 100644 --- a/templates/show_add_catalog.inc.php +++ b/templates/show_add_catalog.inc.php @@ -29,70 +29,70 @@ $default_rename = "%a - %T - %t"; $default_sort = "%a/%A"; ?> - -

    + +

    - + - + - + - - + + - - + + - + - + - + - +
    : : - :
    - %A =
    - %a =
    - %c =
    - %T =
    - %t =
    - %y =
    - %o =
    + :
    + %A =
    + %a =
    + %c =
    + %T =
    + %t =
    + %y =
    + %o =
    : :
    : :
    : *: *
    : *: *
    : :
    :
    :
    ::
    ::
    - +
    diff --git a/templates/show_add_live_stream.inc.php b/templates/show_add_live_stream.inc.php index 60e0fc4c..ec790ca3 100644 --- a/templates/show_add_live_stream.inc.php +++ b/templates/show_add_live_stream.inc.php @@ -27,44 +27,44 @@ */ ?> - +
    - + - + - + - + - + - + @@ -72,7 +72,7 @@
    - +
    diff --git a/templates/show_add_playlist.inc.php b/templates/show_add_playlist.inc.php index a2fc25fa..c510b38e 100644 --- a/templates/show_add_playlist.inc.php +++ b/templates/show_add_playlist.inc.php @@ -27,15 +27,15 @@ */ ?> - +
    - + - +
    ::
    ::
    - +
    diff --git a/templates/show_add_shout.inc.php b/templates/show_add_shout.inc.php index 99d43390..e0eda1a0 100644 --- a/templates/show_add_shout.inc.php +++ b/templates/show_add_shout.inc.php @@ -27,18 +27,18 @@ */ ?> - +
    - - + @@ -46,7 +46,7 @@ - +
    +
    diff --git a/templates/show_add_user.inc.php b/templates/show_add_user.inc.php index e672876e..5e2daa51 100644 --- a/templates/show_add_user.inc.php +++ b/templates/show_add_user.inc.php @@ -27,13 +27,13 @@ */ ?> - + "> - +
    - : + : @@ -41,14 +41,14 @@
    ::
    - : + : @@ -56,7 +56,7 @@
    - : + : @@ -65,7 +65,7 @@
    - : + : @@ -73,23 +73,23 @@
    - : + : access; ${$var_name} = 'selected="selected"'; ?>
    - +
    diff --git a/templates/show_adds_catalog.inc.php b/templates/show_adds_catalog.inc.php index 1da117a2..3cf50cd2 100644 --- a/templates/show_adds_catalog.inc.php +++ b/templates/show_adds_catalog.inc.php @@ -26,11 +26,11 @@ * @link http://www.ampache.org/ */ -show_box_top(_('Starting New Song Search'), 'box box_adds_catalog'); +show_box_top(T_('Starting New Song Search'), 'box box_adds_catalog'); /* HINT: Catalog Name */ -printf(_('Starting New Song Search on %s catalog'), "[ $this->name ]"); +printf(T_('Starting New Song Search on %s catalog'), "[ $this->name ]"); echo "
    \n"; -echo _('Found') . ': ' . _('None') . '
    '; -echo _('Reading') . ':
    '; +echo T_('Found') . ': ' . T_('None') . '
    '; +echo T_('Reading') . ':
    '; show_box_bottom(); ?> diff --git a/templates/show_admin_info.inc.php b/templates/show_admin_info.inc.php index 09e7e505..71d2bd02 100644 --- a/templates/show_admin_info.inc.php +++ b/templates/show_admin_info.inc.php @@ -35,14 +35,14 @@ $flagged = Flag::get_recent(10); $songs = Catalog::get_disabled(10); ?> - + - +  
    - ... + ...
    diff --git a/templates/show_admin_tools.inc.php b/templates/show_admin_tools.inc.php index 1bff7747..568220b9 100644 --- a/templates/show_admin_tools.inc.php +++ b/templates/show_admin_tools.inc.php @@ -30,15 +30,15 @@ $web_path = Config::get('web_path'); $catalogs = Catalog::get_catalogs(); ?> - + - - + + @@ -49,22 +49,22 @@ $catalogs = Catalog::get_catalogs(); @@ -72,34 +72,34 @@ $catalogs = Catalog::get_catalogs(); - - + +
    -  |  +  |  -  |  +  |  -  |  +  |  -  |  +  |  - +
    - +
    - - - -
    - - - + + + +
    + + +
    - +
    - - - - - - - + + + + + + +
    diff --git a/templates/show_album.inc.php b/templates/show_album.inc.php index c91cbf09..82f5a32e 100644 --- a/templates/show_album.inc.php +++ b/templates/show_album.inc.php @@ -32,14 +32,14 @@ $ajax_url = Config::get('ajax_url'); // Title for this album $title = scrub_out($album->name) . ' (' . $album->year . ')'; if ($album->disk) { - $title .= "disk . "\">, " . _('Disk') . " " . $album->disk . ""; + $title .= "disk . "\">, " . T_('Disk') . " " . $album->disk . ""; } $title .= ' - ' . $album->f_artist_link; ?>
    name != _('Unknown (Orphaned)')) { + if ($album->name != T_('Unknown (Orphaned)')) { $name = '[' . $album->f_artist . '] ' . scrub_out($album->full_name); $aa_url = $web_path . "/image.php?id=" . $album->id . "&type=popup&sid=" . session_id(); @@ -53,36 +53,36 @@ $title .= ' - ' . $album->f_artist_link;
    id,'album'); ?>
    -

    :

    +

    :

    • - id,'add',_('Add'),'play_full_' . $album->id); ?> - id,_('Add Album'), 'play_full_text_' . $album->id); ?> + id,'add', T_('Add'),'play_full_' . $album->id); ?> + id, T_('Add Album'), 'play_full_text_' . $album->id); ?>
    • - id,'random',_('Random'),'play_random_' . $album->id); ?> - id,_('Add Random from Album'), 'play_random_text_' . $album->id); ?> + id,'random', T_('Random'),'play_random_' . $album->id); ?> + id, T_('Add Random from Album'), 'play_random_text_' . $album->id); ?>
    • - - + +
    • - - + +
    • - - + +
    • - - + +
    diff --git a/templates/show_album_art.inc.php b/templates/show_album_art.inc.php index f6e05283..5d968961 100644 --- a/templates/show_album_art.inc.php +++ b/templates/show_album_art.inc.php @@ -31,7 +31,7 @@ $total_images = count($images); $rows = floor($total_images/4); $i = 0; ?> - + - + - + - id,'edit',_('Edit'),'edit_album_' . $album->id); ?> + id,'edit', T_('Edit'),'edit_album_' . $album->id); ?> diff --git a/templates/show_albums.inc.php b/templates/show_albums.inc.php index cafa4c4e..d0d4d0f2 100644 --- a/templates/show_albums.inc.php +++ b/templates/show_albums.inc.php @@ -45,17 +45,17 @@ $ajax_url = Config::get('ajax_url'); - + - + - - - - - - - + + + + + + + - + - + - + - - - - - - - + + + + + + +
    - <?php echo _('Album Art'); ?> + <?php echo T_('Album Art'); ?>

    [x] - + - [] + []

    - id,'add',_('Add'),'add_album_' . $album->id); ?> - id,'random',_('Random'),'random_album_' . $album->id); ?> + id,'add', T_('Add'),'add_album_' . $album->id); ?> + id,'random', T_('Random'),'random_album_' . $album->id); ?>
    id . '&sort=name',_('Album'),'album_sort_name'); ?>id . '&sort=artist',_('Artist'),'album_sort_artist'); ?>id . '&sort=year',_('Year'),'album_sort_year'); ?>id . '&sort=name', T_('Album'),'album_sort_name'); ?>id . '&sort=artist', T_('Artist'),'album_sort_artist'); ?>id . '&sort=year', T_('Year'),'album_sort_year'); ?>
    id . '&sort=name',_('Album'),'album_sort_name_bottom'); ?>id . '&sort=year',_('Year'),'album_sort_year_bottom'); ?>id . '&sort=name', T_('Album'),'album_sort_name_bottom'); ?>id . '&sort=year', T_('Year'),'album_sort_year_bottom'); ?>
    diff --git a/templates/show_all_popular.inc.php b/templates/show_all_popular.inc.php index 447d31c2..fd139c93 100644 --- a/templates/show_all_popular.inc.php +++ b/templates/show_all_popular.inc.php @@ -30,25 +30,25 @@ diff --git a/templates/show_artist.inc.php b/templates/show_artist.inc.php index 2c1d9fab..60090c29 100644 --- a/templates/show_artist.inc.php +++ b/templates/show_artist.inc.php @@ -39,43 +39,43 @@ if (Config::get('ratings')) {
    -

    :

    +

    :

    • - - f_name); ?> + + f_name); ?> - - f_name); ?> + + f_name); ?>
    • - id,'add',_('Add'),'add_' . $artist->id); ?> - id,sprintf(_('Add All Songs By %s'), $artist->f_name),'add_text_' . $artist->id); ?> + id,'add', T_('Add'),'add_' . $artist->id); ?> + id,sprintf(T_('Add All Songs By %s'), $artist->f_name),'add_text_' . $artist->id); ?>
    • - id,'random',_('Random'),'random_' . $artist->id); ?> - id, sprintf(_('Add Random Songs By %s'), $artist->f_name),'random_text_' . $artist->id); ?> + id,'random', T_('Random'),'random_' . $artist->id); ?> + id, sprintf(T_('Add Random Songs By %s'), $artist->f_name),'random_text_' . $artist->id); ?>
    • - - + +
    • - - + +
    • - /> + /> id,'')); ?>
    diff --git a/templates/show_artist_row.inc.php b/templates/show_artist_row.inc.php index f5902168..91bf28b2 100644 --- a/templates/show_artist_row.inc.php +++ b/templates/show_artist_row.inc.php @@ -28,8 +28,8 @@ ?> @@ -40,10 +40,10 @@ diff --git a/templates/show_artists.inc.php b/templates/show_artists.inc.php index 2d7b2d02..eba96932 100644 --- a/templates/show_artists.inc.php +++ b/templates/show_artists.inc.php @@ -43,14 +43,14 @@ $web_path = Config::get('web_path'); - - - - - - - - + + + + + + + + - + - - - - - - - - + + + + + + + +
    - + - + - +
     
    - + - + - +
     
    - id,'add',_('Add'),'add_artist_' . $artist->id); ?> - id,'random',_('Random'),'random_artist_' . $artist->id); ?> + id,'add', T_('Add'),'add_artist_' . $artist->id); ?> + id,'random', T_('Random'),'random_artist_' . $artist->id); ?> f_name_link; ?> songs; ?> - + - id,'edit',_('Edit'),'edit_artist_' . $artist->id); ?> + id,'edit', T_('Edit'),'edit_artist_' . $artist->id); ?>
    diff --git a/templates/show_big_art.inc.php b/templates/show_big_art.inc.php index d537f072..1efdb14b 100644 --- a/templates/show_big_art.inc.php +++ b/templates/show_big_art.inc.php @@ -33,11 +33,11 @@ $htmllang = str_replace("_","-",Config::get('lang')); -<?php echo Config::get('site_title'); ?> - <?php echo _("Album Art"); ?> +<?php echo Config::get('site_title'); ?> - <?php echo T_("Album Art"); ?> "; +echo ""; echo "\"\""; echo ""; ?> diff --git a/templates/show_catalog_row.inc.php b/templates/show_catalog_row.inc.php index 0f0ee5cf..b4e70e85 100644 --- a/templates/show_catalog_row.inc.php +++ b/templates/show_catalog_row.inc.php @@ -34,10 +34,10 @@ $web_path = Config::get('web_path'); f_add); ?> f_clean); ?> - - | - | - | - | - | + + | + | + | + | + | diff --git a/templates/show_catalogs.inc.php b/templates/show_catalogs.inc.php index 5c274da4..4939c488 100644 --- a/templates/show_catalogs.inc.php +++ b/templates/show_catalogs.inc.php @@ -38,12 +38,12 @@ - - - - - - + + + + + + "> - + - - - - - - + + + + + + diff --git a/templates/show_clean_catalog.inc.php b/templates/show_clean_catalog.inc.php index 23eab269..ad73cd8b 100644 --- a/templates/show_clean_catalog.inc.php +++ b/templates/show_clean_catalog.inc.php @@ -28,9 +28,9 @@ show_box_top(); /* HINT: Catalog Name */ -printf(_('Cleaning the %s Catalog'), "[ $this->name ]"); +printf(T_('Cleaning the %s Catalog'), "[ $this->name ]"); echo "...
    "; -echo _('Checking') . ':
    '; -echo _('Reading') . ':
    '; +echo T_('Checking') . ':
    '; +echo T_('Reading') . ':
    '; show_box_bottom(); ?> diff --git a/templates/show_confirmation.inc.php b/templates/show_confirmation.inc.php index 0f46556e..74b4044d 100644 --- a/templates/show_confirmation.inc.php +++ b/templates/show_confirmation.inc.php @@ -32,12 +32,12 @@ $confirmation = Core::form_register($form_name);
    - +
    - +
    diff --git a/templates/show_create_democratic.inc.php b/templates/show_create_democratic.inc.php index 757954f5..f84f6ba0 100644 --- a/templates/show_create_democratic.inc.php +++ b/templates/show_create_democratic.inc.php @@ -26,45 +26,45 @@ * @link http://www.ampache.org/ */ -show_box_top(_('Configure Democratic Playlist')); ?> +show_box_top(T_('Configure Democratic Playlist')); ?>
    - + - + - - + + - +
    base_playlist); ?>
    - +
    diff --git a/templates/show_debug.inc.php b/templates/show_debug.inc.php index 3722f2d4..8a3dbfa1 100644 --- a/templates/show_debug.inc.php +++ b/templates/show_debug.inc.php @@ -27,44 +27,44 @@ */ ?> - +
    • - - + +
    • - - + +
    - + - - + + - + - + - - + + - + @@ -72,33 +72,33 @@ - + - + - + - +
    - + - - + + $value) { if ($key == 'database_password' || $key == 'mysql_password') { $value = '*********'; } diff --git a/templates/show_democratic.inc.php b/templates/show_democratic.inc.php index 0bac3584..3430c042 100644 --- a/templates/show_democratic.inc.php +++ b/templates/show_democratic.inc.php @@ -27,29 +27,29 @@ */ /* HINT: Democratic Name */ -$string = $democratic->is_enabled() ? sprintf(_('%s Playlist') ,$democratic->name) : _('Democratic Playlist'); +$string = $democratic->is_enabled() ? sprintf(T_('%s Playlist') ,$democratic->name) : T_('Democratic Playlist'); show_box_top($string , 'info-box'); ?>
      is_enabled()) { ?>
    • - :f_cooldown; ?> + :f_cooldown; ?>
    • - - + +
    • is_enabled()) { ?>
    • - id),'all',_('Play'),'play_democratic'); ?> - + id),'all', T_('Play'),'play_democratic'); ?> +
    • - id),'delete',_('Clear Playlist'),'clear_democratic'); ?> - + id),'delete', T_('Clear Playlist'),'clear_democratic'); ?> +
    • diff --git a/templates/show_democratic_playlist.inc.php b/templates/show_democratic_playlist.inc.php index 10f21f91..b1b01cf9 100644 --- a/templates/show_democratic_playlist.inc.php +++ b/templates/show_democratic_playlist.inc.php @@ -47,7 +47,7 @@ if (!count($object_ids)) { ?>
    - - - - - - + + + + + + - + $data) { @@ -91,7 +91,7 @@ foreach($object_ids as $row_id=>$data) { @@ -99,14 +99,14 @@ foreach($object_ids as $row_id=>$data) { } // end foreach ?> - - - - - - + + + + + + - +

    -

    -

    - +

    +

    + - +

    diff --git a/templates/show_disabled_songs.inc.php b/templates/show_disabled_songs.inc.php index e914d657..ff60333b 100644 --- a/templates/show_disabled_songs.inc.php +++ b/templates/show_disabled_songs.inc.php @@ -39,12 +39,12 @@
    - - - - - - + + + + + + @@ -58,20 +58,20 @@ - + - - - - - - + + + + + +
    - : + : name); ?> @@ -59,14 +59,14 @@ if (!count($object_ids)) { else { ?>
    has_vote($media->id)) { ?> - + - id . '&type=' . scrub_out($data['object_type']),'tick',_('Add Vote'),'remove_vote_' . $row_id); ?> + id . '&type=' . scrub_out($data['object_type']),'tick', T_('Add Vote'),'remove_vote_' . $row_id); ?> get_vote($row_id)); ?>f_time; ?> - +
    -    +   
    diff --git a/templates/show_duplicate.inc.php b/templates/show_duplicate.inc.php index 6e35cff1..5999e9e2 100644 --- a/templates/show_duplicate.inc.php +++ b/templates/show_duplicate.inc.php @@ -27,26 +27,26 @@ */ ?> - +
    - +
    :: - />
    - />
    - />
    + />
    + />
    + />
    - />
    + />
    - +
    diff --git a/templates/show_duplicates.inc.php b/templates/show_duplicates.inc.php index 0eccaa85..d5305c97 100644 --- a/templates/show_duplicates.inc.php +++ b/templates/show_duplicates.inc.php @@ -27,7 +27,7 @@ */ ?> - +
    @@ -41,14 +41,14 @@ - - - - - - - - + + + + + + + + @@ -80,14 +80,14 @@ } // end foreach ($flags as $flag) ?> - - - - - - - - + + + + + + + +
    - + f_link; ?> f_artist_link; ?>
    diff --git a/templates/show_dynamic.inc.php b/templates/show_dynamic.inc.php index ead83af9..89f52ac9 100644 --- a/templates/show_dynamic.inc.php +++ b/templates/show_dynamic.inc.php @@ -27,7 +27,7 @@ */ ?> - + @@ -36,10 +36,10 @@ - - - - + + + + diff --git a/templates/show_edit_access.inc.php b/templates/show_edit_access.inc.php index 767eede5..28bd0f73 100644 --- a/templates/show_edit_access.inc.php +++ b/templates/show_edit_access.inc.php @@ -27,69 +27,69 @@ */ ?> - +
    @@ -61,7 +61,7 @@ - + @@ -69,20 +69,20 @@
    - + - + - +
    - + - + - - + - + - + - + - +
    : :
    : :

    +

    (255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)
    :: ::
    :: user); ?>
    :: level; ${$name} = 'checked="checked"'; ?> - > - > - > - > + > + > + > + >
    - +
    diff --git a/templates/show_edit_album.inc.php b/templates/show_edit_album.inc.php index 4b082efd..2830eaf7 100644 --- a/templates/show_edit_album.inc.php +++ b/templates/show_edit_album.inc.php @@ -28,17 +28,17 @@ ?> - +
    - + - + @@ -46,13 +46,13 @@
      - +
    - +
    diff --git a/templates/show_edit_album_row.inc.php b/templates/show_edit_album_row.inc.php index 95030ebe..5b04a9a6 100644 --- a/templates/show_edit_album_row.inc.php +++ b/templates/show_edit_album_row.inc.php @@ -40,7 +40,7 @@ show_artist_select('artist',$album->artist_id); } else { - echo _('Various'); + echo T_('Various'); } ?> @@ -53,7 +53,7 @@ - id . '&type=album_row','download',_('Save Changes'),'save_album_' . $album->id,'edit_album_' . $album->id); ?> + id . '&type=album_row','download', T_('Save Changes'),'save_album_' . $album->id,'edit_album_' . $album->id); ?> diff --git a/templates/show_edit_artist.inc.php b/templates/show_edit_artist.inc.php index 93801e5e..d5d265e4 100644 --- a/templates/show_edit_artist.inc.php +++ b/templates/show_edit_artist.inc.php @@ -28,11 +28,11 @@ ?> - +
    - + @@ -40,13 +40,13 @@
      - +
    - +
    diff --git a/templates/show_edit_artist_row.inc.php b/templates/show_edit_artist_row.inc.php index 2b837949..8779e10d 100644 --- a/templates/show_edit_artist_row.inc.php +++ b/templates/show_edit_artist_row.inc.php @@ -37,7 +37,7 @@ - id . '&type=artist_row','download',_('Save Changes'),'save_artist_' . $artist->id,'edit_artist_' . $artist->id); ?> + id . '&type=artist_row','download', T_('Save Changes'),'save_artist_' . $artist->id,'edit_artist_' . $artist->id); ?> diff --git a/templates/show_edit_catalog.inc.php b/templates/show_edit_catalog.inc.php index a23ebb2c..02041978 100644 --- a/templates/show_edit_catalog.inc.php +++ b/templates/show_edit_catalog.inc.php @@ -27,44 +27,44 @@ */ ?> -name . ' (' . $catalog->path . ')'), 'box box_edit_catalog'); ?> +name . ' (' . $catalog->path . ')'), 'box box_edit_catalog'); ?>
    - + - + - - + + - - + + - +
    :: - :
    - %A =
    - %a =
    - %c =
    - %T =
    - %t =
    - %y =
    - %o =
    + :
    + %A =
    + %a =
    + %c =
    + %T =
    + %t =
    + %y =
    + %o =
    catalog_type)); ?>
    : *: *
    : *: *
    ::
    - :
    + :
    @@ -74,7 +74,7 @@
    - +
    diff --git a/templates/show_edit_live_stream_row.inc.php b/templates/show_edit_live_stream_row.inc.php index 64fe252f..dd1a06b8 100644 --- a/templates/show_edit_live_stream_row.inc.php +++ b/templates/show_edit_live_stream_row.inc.php @@ -31,11 +31,11 @@
    - - - - - + + + + + @@ -57,7 +57,7 @@
     
    - id . '&type=live_stream_row','download',_('Save Changes'),'save_live_stream_' . $radio->id,'edit_live_stream_' . $radio->id); ?> + id . '&type=live_stream_row','download', T_('Save Changes'),'save_live_stream_' . $radio->id,'edit_live_stream_' . $radio->id); ?>
    diff --git a/templates/show_edit_playlist_row.inc.php b/templates/show_edit_playlist_row.inc.php index 5b853a75..19abb1f5 100644 --- a/templates/show_edit_playlist_row.inc.php +++ b/templates/show_edit_playlist_row.inc.php @@ -37,13 +37,13 @@
    type; ${$name} = ' selected="selected"'; ?> - id . '&type=playlist_row','download',_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> + id . '&type=playlist_row','download', T_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?>
    diff --git a/templates/show_edit_playlist_song_row.inc.php b/templates/show_edit_playlist_song_row.inc.php index 7efc8086..84bab2aa 100644 --- a/templates/show_edit_playlist_song_row.inc.php +++ b/templates/show_edit_playlist_song_row.inc.php @@ -43,7 +43,7 @@ - id . '&track_id=' . $track['id'],'download',_('Save Changes'),'save_track_' . $track['id'],'edit_track_' . $track['id']); ?> + id . '&track_id=' . $track['id'],'download', T_('Save Changes'),'save_track_' . $track['id'],'edit_track_' . $track['id']); ?> diff --git a/templates/show_edit_playlist_title.inc.php b/templates/show_edit_playlist_title.inc.php index dac65ed9..20743262 100644 --- a/templates/show_edit_playlist_title.inc.php +++ b/templates/show_edit_playlist_title.inc.php @@ -36,13 +36,13 @@ type; ${$name} = ' selected="selected"'; ?> - id . '&type=playlist_title','download',_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> + id . '&type=playlist_title','download', T_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> diff --git a/templates/show_edit_shout.inc.php b/templates/show_edit_shout.inc.php index 6e407623..13ff1cfb 100644 --- a/templates/show_edit_shout.inc.php +++ b/templates/show_edit_shout.inc.php @@ -27,25 +27,25 @@ */ ?> - + - - - +
    f_link, $object->f_link); ?> + f_link, $object->f_link); ?>
    +
    sticky == "1") { echo "checked"; } ?>/> sticky == "1") { echo "checked"; } ?>/>
    - +
    diff --git a/templates/show_edit_smartplaylist_row.inc.php b/templates/show_edit_smartplaylist_row.inc.php index fadd1bc7..f02fc62a 100644 --- a/templates/show_edit_smartplaylist_row.inc.php +++ b/templates/show_edit_smartplaylist_row.inc.php @@ -30,13 +30,13 @@ type; ${$name} = ' selected="selected"'; ?> - id . '&type=smartplaylist_row','download',_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> + id . '&type=smartplaylist_row','download', T_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> diff --git a/templates/show_edit_smartplaylist_title.inc.php b/templates/show_edit_smartplaylist_title.inc.php index e6451e66..25730ef9 100644 --- a/templates/show_edit_smartplaylist_title.inc.php +++ b/templates/show_edit_smartplaylist_title.inc.php @@ -29,13 +29,13 @@ type; ${$name} = ' selected="selected"'; ?> - id . '&type=smartplaylist_title','download',_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> + id . '&type=smartplaylist_title','download', T_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> diff --git a/templates/show_edit_song.inc.php b/templates/show_edit_song.inc.php index 09627569..40f3758f 100644 --- a/templates/show_edit_song.inc.php +++ b/templates/show_edit_song.inc.php @@ -28,49 +28,49 @@ ?> - + - + - + - + - + - + - + - + @@ -78,14 +78,14 @@
    :: file); ?>
    album); ?> -

    +

    artist); ?> -

    +

      - +
    - +
    diff --git a/templates/show_edit_song_row.inc.php b/templates/show_edit_song_row.inc.php index 9ddc78a7..9224dfd4 100644 --- a/templates/show_edit_song_row.inc.php +++ b/templates/show_edit_song_row.inc.php @@ -50,7 +50,7 @@ - id . '&type=song_row','download',_('Save Changes'),'save_song_' . $song->id,'edit_song_' . $song->id); ?> + id . '&type=song_row','download', T_('Save Changes'),'save_song_' . $song->id,'edit_song_' . $song->id); ?> diff --git a/templates/show_edit_user.inc.php b/templates/show_edit_user.inc.php index 1ff58f06..844ed2b1 100644 --- a/templates/show_edit_user.inc.php +++ b/templates/show_edit_user.inc.php @@ -27,16 +27,16 @@ */ ?> - +
    "> - + - + - + - + - + - + @@ -119,7 +119,7 @@
    - : + : @@ -44,14 +44,14 @@
    ::
    - : + : @@ -59,7 +59,7 @@
    - : + : @@ -68,7 +68,7 @@
    - : + : @@ -76,42 +76,42 @@
    - : + : access; ${$var_name} = 'selected="selected"'; ?>
    - +
    - +
    diff --git a/templates/show_export.inc.php b/templates/show_export.inc.php index 2ba58b4f..8595253c 100644 --- a/templates/show_export.inc.php +++ b/templates/show_export.inc.php @@ -31,14 +31,14 @@ ${$name} = ' selected="selected"'; $name = 'catalog_' . $_REQUEST['export_catalog']; ${$name} = ' selected="selected"'; -show_box_top(_('Export Catalog'), 'box box_export'); ?> +show_box_top(T_('Export Catalog'), 'box box_export'); ?> - + - +
    ::
    ::
    - +
    diff --git a/templates/show_flag_row.inc.php b/templates/show_flag_row.inc.php index 3c599d64..a94b2717 100644 --- a/templates/show_flag_row.inc.php +++ b/templates/show_flag_row.inc.php @@ -35,9 +35,9 @@ print_status(); ?> approved) { ?> - id,'disable',_('Reject'),'reject_flag_' . $flag->id); ?> + id,'disable', T_('Reject'),'reject_flag_' . $flag->id); ?> - id,'enable',_('Enable'),'enable_flag_' . $flag->id); ?> + id,'enable', T_('Enable'),'enable_flag_' . $flag->id); ?> diff --git a/templates/show_flagged.inc.php b/templates/show_flagged.inc.php index cec20187..2f5e9639 100644 --- a/templates/show_flagged.inc.php +++ b/templates/show_flagged.inc.php @@ -38,12 +38,12 @@ $web_path = Config::get('web_path'); - - - - - - + + + + + + - + - - - - - - + + + + + + diff --git a/templates/show_gather_art.inc.php b/templates/show_gather_art.inc.php index 424b1792..24b10254 100644 --- a/templates/show_gather_art.inc.php +++ b/templates/show_gather_art.inc.php @@ -26,9 +26,9 @@ * @link http://www.ampache.org/ */ -show_box_top(_('Album Art Search'), 'box box_gather_art'); -echo "" . _('Starting Album Art Search') . ". . .
    \n"; -echo _('Searched') . ": " . _('None') . "
    "; -echo _('Reading') . ":
    "; +show_box_top(T_('Album Art Search'), 'box box_gather_art'); +echo "" . T_('Starting Album Art Search') . ". . .
    \n"; +echo T_('Searched') . ": " . T_('None') . "
    "; +echo T_('Reading') . ":
    "; show_box_bottom(); ?> diff --git a/templates/show_get_albumart.inc.php b/templates/show_get_albumart.inc.php index 46954fb7..d064cce5 100644 --- a/templates/show_get_albumart.inc.php +++ b/templates/show_get_albumart.inc.php @@ -27,12 +27,12 @@ */ ?> - +
    @@ -36,9 +36,9 @@ diff --git a/templates/show_live_streams.inc.php b/templates/show_live_streams.inc.php index 02983486..87a73b35 100644 --- a/templates/show_live_streams.inc.php +++ b/templates/show_live_streams.inc.php @@ -40,12 +40,12 @@ $web_path = Config::get('web_path'); - - - - - - + + + + + + - + - - - - - - + + + + + +
    -   +   @@ -40,7 +40,7 @@
    -   +   @@ -48,7 +48,7 @@
    - + @@ -56,7 +56,7 @@
    - + @@ -67,7 +67,7 @@ - + diff --git a/templates/show_import_playlist.inc.php b/templates/show_import_playlist.inc.php index bb5bd7c6..f1bcbe5f 100644 --- a/templates/show_import_playlist.inc.php +++ b/templates/show_import_playlist.inc.php @@ -27,18 +27,18 @@ */ ?> - +
    - : + :
    - +
    - +
    diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php index 17927f7d..b6588d76 100644 --- a/templates/show_index.inc.php +++ b/templates/show_index.inc.php @@ -36,7 +36,7 @@ if (Art::is_enabled()) { echo Ajax::observe('window','load',Ajax::action('?page=index&action=random_albums','random_albums')); ?>
    - +
    diff --git a/templates/show_install.inc.php b/templates/show_install.inc.php index 598be729..195da699 100644 --- a/templates/show_install.inc.php +++ b/templates/show_install.inc.php @@ -30,57 +30,57 @@ $prefix = realpath(dirname(__FILE__). "/../"); require $prefix . '/templates/install_header.inc.php'; ?>
    -
    +
    -
    +
    -
    -
    +
    +


    - +
    " enctype="multipart/form-data" > - + - + - + - + - + - + - + - + - + - +
    ? ?
     " />" />
    diff --git a/templates/show_install_account.inc.php b/templates/show_install_account.inc.php index fb0b4f7c..a2f16de6 100644 --- a/templates/show_install_account.inc.php +++ b/templates/show_install_account.inc.php @@ -30,32 +30,32 @@ $prefix = realpath(dirname(__FILE__). "/../"); require $prefix . '/templates/install_header.inc.php'; ?>
    -
    -
    -
    +
    +
    +
    -
    +

    - +
    " enctype="multipart/form-data" > - + - + - + - +
     
    diff --git a/templates/show_install_check.inc.php b/templates/show_install_check.inc.php index 95334f57..f405aa55 100644 --- a/templates/show_install_check.inc.php +++ b/templates/show_install_check.inc.php @@ -28,15 +28,15 @@ ?> -

    +

    - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + @@ -63,8 +63,8 @@ - - + +
    ::
    ::
    ::
    ::
    ::

    ::
    ::
    ::
    ::
    ::
    -
    -
    +
    +
    -
    +
    -
    +

    - +
    " enctype="multipart/form-data" > - + - + - + - + - + @@ -77,7 +77,7 @@ require $prefix . '/templates/install_header.inc.php';
      - - /> + + />
    - +
    [
    - + [   - [] + []

    " enctype="multipart/form-data"> - +
    diff --git a/templates/show_install_lang.inc.php b/templates/show_install_lang.inc.php index 81395ebb..506bdee8 100644 --- a/templates/show_install_lang.inc.php +++ b/templates/show_install_lang.inc.php @@ -32,12 +32,12 @@ require $prefix . '/templates/install_header.inc.php';
    - +
    - +

    @@ -58,7 +58,7 @@ foreach ($languages as $lang=>$name) { echo "\n"; ?> - +
    diff --git a/templates/show_ip_history.inc.php b/templates/show_ip_history.inc.php index 5f71aad7..4ac9c1e3 100644 --- a/templates/show_ip_history.inc.php +++ b/templates/show_ip_history.inc.php @@ -27,16 +27,16 @@ */ ?> -fullname)); ?> +fullname)); ?>
    • - + - +
    @@ -49,8 +49,8 @@
    diff --git a/templates/show_live_stream.inc.php b/templates/show_live_stream.inc.php index b119108c..0717d832 100644 --- a/templates/show_live_stream.inc.php +++ b/templates/show_live_stream.inc.php @@ -27,11 +27,11 @@ */ ?> - +
    • - +
    diff --git a/templates/show_live_stream_row.inc.php b/templates/show_live_stream_row.inc.php index 8b039824..75917b48 100644 --- a/templates/show_live_stream_row.inc.php +++ b/templates/show_live_stream_row.inc.php @@ -28,7 +28,7 @@ ?>
    - id,'add',_('Add'),'add_radio_' . $radio->id); ?> + id,'add', T_('Add'),'add_radio_' . $radio->id); ?> f_name_link; ?> f_callsign; ?>f_tag; ?> - id,'edit',_('Edit'),'edit_radio_' . $radio->id); ?> + id,'edit', T_('Edit'),'edit_radio_' . $radio->id); ?> - id,'delete',_('Delete'),'delete_radio_' . $radio->id); ?> + id,'delete', T_('Delete'),'delete_radio_' . $radio->id); ?>
    diff --git a/templates/show_localplay_add_instance.inc.php b/templates/show_localplay_add_instance.inc.php index 0863ddb5..5ae40d59 100644 --- a/templates/show_localplay_add_instance.inc.php +++ b/templates/show_localplay_add_instance.inc.php @@ -27,7 +27,7 @@ */ ?> - +
    $field) { ?> @@ -38,7 +38,7 @@
    - +
    diff --git a/templates/show_localplay_control.inc.php b/templates/show_localplay_control.inc.php index 2a4a7aa4..7eaaf4cb 100644 --- a/templates/show_localplay_control.inc.php +++ b/templates/show_localplay_control.inc.php @@ -28,9 +28,9 @@ ?>
    - - - - - + + + + +
    diff --git a/templates/show_localplay_controllers.inc.php b/templates/show_localplay_controllers.inc.php index 8b3cda94..c6494266 100644 --- a/templates/show_localplay_controllers.inc.php +++ b/templates/show_localplay_controllers.inc.php @@ -37,10 +37,10 @@ $web_path = Config::get('web_path'); - - - - + + + + format(); if (Localplay::is_enabled($controller)) { $action = 'confirm_uninstall_localplay'; - $action_txt = _('Disable'); + $action_txt = T_('Disable'); } else { $action = 'install_localplay'; - $action_txt = _('Activate'); + $action_txt = T_('Activate'); } ?> @@ -64,14 +64,14 @@ foreach ($controllers as $controller) { - + - - - - + + + +
    diff --git a/templates/show_localplay_edit_instance.inc.php b/templates/show_localplay_edit_instance.inc.php index 42a5dcf8..ca9ca250 100644 --- a/templates/show_localplay_edit_instance.inc.php +++ b/templates/show_localplay_edit_instance.inc.php @@ -27,7 +27,7 @@ */ ?> - +
    $field) { ?> @@ -38,7 +38,7 @@
    - +
    diff --git a/templates/show_localplay_instances.inc.php b/templates/show_localplay_instances.inc.php index c88934cc..5d61cd45 100644 --- a/templates/show_localplay_instances.inc.php +++ b/templates/show_localplay_instances.inc.php @@ -27,13 +27,13 @@ */ ?> - + $field) { ?> - + $name) { $instance = $localplay->get_instance($uid); @@ -43,8 +43,8 @@ diff --git a/templates/show_localplay_playlist.inc.php b/templates/show_localplay_playlist.inc.php index ea42800c..7572cf95 100644 --- a/templates/show_localplay_playlist.inc.php +++ b/templates/show_localplay_playlist.inc.php @@ -38,9 +38,9 @@ $status = $localplay->status(); - - - + + + format_name($object['name'],$object['id']); ?> - + - - - + + +
    - - + +
    - +
    diff --git a/templates/show_localplay_status.inc.php b/templates/show_localplay_status.inc.php index 028e442d..b97b6b79 100644 --- a/templates/show_localplay_status.inc.php +++ b/templates/show_localplay_status.inc.php @@ -30,28 +30,28 @@ $status = $localplay->status(); $now_playing = $status['track_title'] ? $status['track_title'] . ' - ' . $status['track_album'] . ' - ' . $status['track_artist'] : ''; ?> -type), 'box box_localplay_status'); ?> -: +type), 'box box_localplay_status'); ?> +:
    • - - - -:% + + + +:%
    • | - +
    • | - +
    • - +
    diff --git a/templates/show_login_form.inc.php b/templates/show_login_form.inc.php index d4d65b2d..58860351 100644 --- a/templates/show_login_form.inc.php +++ b/templates/show_login_form.inc.php @@ -63,28 +63,28 @@ function focus(){ document.login.username.focus(); }
    - +
    - +
    /> +   />
    - - + + - +
    @@ -96,7 +96,7 @@ if (@is_readable(Config::get('prefix') . '/config/motd.php')) { ?>
    @@ -105,7 +105,7 @@ if (@is_readable(Config::get('prefix') . '/config/motd.php')) { diff --git a/templates/show_lostpassword_form.inc.php b/templates/show_lostpassword_form.inc.php index c8a782dc..07a8cce7 100644 --- a/templates/show_lostpassword_form.inc.php +++ b/templates/show_lostpassword_form.inc.php @@ -70,16 +70,16 @@ function focus(){ document.login.username.focus(); }

    -
    +
    + value="" />
    diff --git a/templates/show_lyrics.inc.php b/templates/show_lyrics.inc.php index aa5eb34c..89b4978d 100644 --- a/templates/show_lyrics.inc.php +++ b/templates/show_lyrics.inc.php @@ -37,14 +37,14 @@ * @todo get lyrics from id3tag, if possible. */ /* HINT: Song Title */ -show_box_top(sprintf(_('%s Lyrics'), $song->title), 'box box_lyrics'); +show_box_top(sprintf(T_('%s Lyrics'), $song->title), 'box box_lyrics'); ?> diff --git a/templates/show_playlist.inc.php b/templates/show_playlist.inc.php index 35adadc8..a9961b26 100644 --- a/templates/show_playlist.inc.php +++ b/templates/show_playlist.inc.php @@ -43,33 +43,33 @@ show_box_top('
    ' . $title .
    • - - + +
    • - - + +
    • - id,'add',_('Add All'),'play_playlist'); ?> - + id,'add', T_('Add All'),'play_playlist'); ?> +
    • - id,'random',_('Add Random'),'play_playlist_random'); ?> - + id,'random', T_('Add Random'),'play_playlist_random'); ?> +
    • has_access()) { ?>
    • - id,'edit',_('Edit'),'edit_playlist_' . $playlist->id); ?> - + id,'edit', T_('Edit'),'edit_playlist_' . $playlist->id); ?> +
    • - +
    diff --git a/templates/show_playlist_row.inc.php b/templates/show_playlist_row.inc.php index 95e252f5..08f83e84 100644 --- a/templates/show_playlist_row.inc.php +++ b/templates/show_playlist_row.inc.php @@ -28,8 +28,8 @@ ?>
    @@ -38,11 +38,11 @@ diff --git a/templates/show_playlist_song_row.inc.php b/templates/show_playlist_song_row.inc.php index 22ff8ee2..eae9cc54 100644 --- a/templates/show_playlist_song_row.inc.php +++ b/templates/show_playlist_song_row.inc.php @@ -27,7 +27,7 @@ */ ?> - + @@ -41,11 +41,11 @@ diff --git a/templates/show_playlist_songs.inc.php b/templates/show_playlist_songs.inc.php index c3ebc3b6..a9f997d2 100644 --- a/templates/show_playlist_songs.inc.php +++ b/templates/show_playlist_songs.inc.php @@ -46,19 +46,19 @@ $ajax_url = Config::get('ajax_url'); - - - - - - - + + + + + + + - + - + - - - - - - - + + + + + + + - + - +
    f_artist_full));
    - +
    - +
    - + diff --git a/templates/show_mail_users.inc.php b/templates/show_mail_users.inc.php index acc13fb5..66cd7ad2 100644 --- a/templates/show_mail_users.inc.php +++ b/templates/show_mail_users.inc.php @@ -28,17 +28,17 @@ ?> - +
    - + @@ -47,43 +47,43 @@ - - - - - - + + + + + + - + - - - - - - + + + + + +
    ::
    - + - + - + - + - + - + - + - + @@ -91,7 +91,7 @@ - + @@ -102,23 +102,23 @@ --> - + - + - + @@ -126,7 +126,7 @@
    :: ::
    :: ::
    :: ::
    :: ::
    ::
    ::
    ::
    ::
    - +
    diff --git a/templates/show_manage_catalogs.inc.php b/templates/show_manage_catalogs.inc.php index 4656b1d5..7f5d302a 100644 --- a/templates/show_manage_catalogs.inc.php +++ b/templates/show_manage_catalogs.inc.php @@ -27,27 +27,27 @@ */ ?> - +
    diff --git a/templates/show_manage_democratic.inc.php b/templates/show_manage_democratic.inc.php index 33d5373a..9b274265 100644 --- a/templates/show_manage_democratic.inc.php +++ b/templates/show_manage_democratic.inc.php @@ -26,7 +26,7 @@ * @link http://www.ampache.org/ */ -show_box_top(_('Manage Democratic Playlists')); ?> +show_box_top(T_('Manage Democratic Playlists')); ?>
      -
    • -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    • +
    - /data/myNewMusic'); ?>
    + /data/myNewMusic'); ?>

    - /data/myUpdatedMusic'); ?>
    + /data/myUpdatedMusic'); ?>

    - +
    @@ -38,13 +38,13 @@ show_box_top(_('Manage Democratic Playlists')); ?> - - - - - - - + + + + + + + - +
    f_primary; ?> count_items(); ?> - id,'all',_('Play'),'play_democratic'); ?> - + id,'all', T_('Play'),'play_democratic'); ?> +

    - +
    diff --git a/templates/show_manage_shoutbox.inc.php b/templates/show_manage_shoutbox.inc.php index b6b1fe0b..374c5a24 100644 --- a/templates/show_manage_shoutbox.inc.php +++ b/templates/show_manage_shoutbox.inc.php @@ -38,12 +38,12 @@ $web_path = Config::get('web_path');
    diff --git a/templates/show_newest.inc.php b/templates/show_newest.inc.php index 6236058a..23740c88 100644 --- a/templates/show_newest.inc.php +++ b/templates/show_newest.inc.php @@ -27,6 +27,6 @@ */ ?> - + diff --git a/templates/show_now_playing.inc.php b/templates/show_now_playing.inc.php index b2e8140f..09374b63 100644 --- a/templates/show_now_playing.inc.php +++ b/templates/show_now_playing.inc.php @@ -36,7 +36,7 @@ if (count($results)) { $link = Config::get('use_rss') ? ' ' . AmpacheRSS::get_display('nowplaying') : ''; ?> - + f_artist_full)); ?>
    - +
    id,'song'); ?>
    @@ -50,7 +50,7 @@ $artist = scrub_out(truncate_with_ellipsis($media->f_artist_full)); @@ -58,21 +58,21 @@ $artist = scrub_out(truncate_with_ellipsis($media->f_artist_full));
    - +
    - +
    - + @@ -93,7 +93,7 @@ $artist = scrub_out(truncate_with_ellipsis($media->f_artist_full));
    artist, 3, false)) { ?>
    - +
    f_artist_full)); id, 3)) { ?>
    - +
    type . '&object_id=' . if ($width < 0) $width = 0; //set the current rating background - echo "
  • " . _('Current rating: '); + echo "
  • " . T_('Current rating: '); if ($rating->rating <= 0) { - echo _('not rated yet') . "
  • \n"; + echo T_('not rated yet') . "\n"; } - else printf(_('%s of 5'), $rating->preciserating); echo "\n"; + else printf(T_('%s of 5'), $rating->preciserating); echo "\n"; for ($i=1; $i<6; $i++) { diff --git a/templates/show_object_rating_static.inc.php b/templates/show_object_rating_static.inc.php index 285d3bb3..198bb3b3 100644 --- a/templates/show_object_rating_static.inc.php +++ b/templates/show_object_rating_static.inc.php @@ -39,17 +39,17 @@ $base_url = Config::get('ajax_url') . '?action=set_rating&rating_type=' . $r if ($width < 0) $width = 0; //set the current rating background - echo "
  • " . _('Current rating: '); + echo "
  • " . T_('Current rating: '); if ($rating->rating <= 0) { - echo _('not rated yet') . "
  • \n"; + echo T_('not rated yet') . "\n"; } - else printf(_('%s of 5') ,$rating->preciserating); echo "\n"; + else printf(T_('%s of 5') ,$rating->preciserating); echo "\n"; for ($i=1; $i<6; $i++) { ?>
  • - +
  • - +
    - id,'add',_('Add'),'add_playlist_' . $playlist->id); ?> - id,'random',_('Random'),'random_playlist_' . $playlist->id); ?> + id,'add', T_('Add'),'add_playlist_' . $playlist->id); ?> + id,'random', T_('Random'),'random_playlist_' . $playlist->id); ?> f_link; ?> f_type; ?> - + has_access()) { ?> - id,'edit',_('Edit'),'edit_playlist_' . $playlist->id); ?> - id,'delete',_('Delete'),'delete_playlist_' . $playlist->id); ?> + id,'edit', T_('Edit'),'edit_playlist_' . $playlist->id); ?> + id,'delete', T_('Delete'),'delete_playlist_' . $playlist->id); ?> id,'add',_('Add'),'playlist_add_' . $song->id); ?>id,'add', T_('Add'),'playlist_add_' . $song->id); ?> f_link; ?> f_artist_link; ?> - + has_access()) { ?> - id . '&track_id=' . $object['track_id'],'edit',_('Edit'),'track_edit_' . $object['track_id']); ?> - id . '&track_id=' . $object['track_id'],'delete',_('Delete'),'track_del_' . $object['track_id']); ?> + id . '&track_id=' . $object['track_id'],'edit', T_('Edit'),'track_edit_' . $object['track_id']); ?> + id . '&track_id=' . $object['track_id'],'delete', T_('Delete'),'track_del_' . $object['track_id']); ?>
     
     
    diff --git a/templates/show_playlist_title.inc.php b/templates/show_playlist_title.inc.php index 957f0e64..cc3cee0b 100644 --- a/templates/show_playlist_title.inc.php +++ b/templates/show_playlist_title.inc.php @@ -28,4 +28,4 @@ ?> -f_type, $playlist->name); ?> +f_type, $playlist->name); ?> diff --git a/templates/show_playlists.inc.php b/templates/show_playlists.inc.php index c3959629..46999725 100644 --- a/templates/show_playlists.inc.php +++ b/templates/show_playlists.inc.php @@ -38,12 +38,12 @@ - - + +   - - - + + + - + - - + +   - - - + + + diff --git a/templates/show_playtype_switch.inc.php b/templates/show_playtype_switch.inc.php index 095a8b17..0a085d96 100644 --- a/templates/show_playtype_switch.inc.php +++ b/templates/show_playtype_switch.inc.php @@ -37,13 +37,13 @@ if (Preference::has_access('play_type')) {
    diff --git a/templates/show_plugins.inc.php b/templates/show_plugins.inc.php index dd434d0c..ead57dfd 100644 --- a/templates/show_plugins.inc.php +++ b/templates/show_plugins.inc.php @@ -37,11 +37,11 @@ $web_path = Config::get('web_path'); - - - - - + + + + + _plugin->name); if (! $installed_version) { $action = "" . - _('Activate') . ""; + T_('Activate') . ""; } else { $action = "" . - _('Deactivate') . ""; + T_('Deactivate') . ""; if ($installed_version < $plugin->_plugin->version) { $action .= '  ' . _('Upgrade') . ''; + scrub_out($plugin_name) . '">' . T_('Upgrade') . ''; } } ?> @@ -70,14 +70,14 @@ foreach ($plugins as $plugin_name) { - + - - - - + + + +
    diff --git a/templates/show_popular.inc.php b/templates/show_popular.inc.php index c3bfeb52..db6cd424 100644 --- a/templates/show_popular.inc.php +++ b/templates/show_popular.inc.php @@ -27,7 +27,7 @@ */ ?> - + - +
    @@ -35,32 +35,32 @@ - - + + - + - - + +
    - +
    diff --git a/templates/show_preference_box.inc.php b/templates/show_preference_box.inc.php index cd7b753c..6a8803a6 100644 --- a/templates/show_preference_box.inc.php +++ b/templates/show_preference_box.inc.php @@ -33,7 +33,7 @@ if ((Access::check('interface','100') OR !Config::get('use_auth')) AND $_REQUEST $is_admin = true; } ?> -

    +

    @@ -44,16 +44,16 @@ if ((Access::check('interface','100') OR !Config::get('use_auth')) AND $_REQUEST - - + + - - + + - + @@ -62,11 +62,11 @@ if ((Access::check('interface','100') OR !Config::get('use_auth')) AND $_REQUEST @@ -74,11 +74,11 @@ if ((Access::check('interface','100') OR !Config::get('use_auth')) AND $_REQUEST - - + + - - + +
    diff --git a/templates/show_preferences.inc.php b/templates/show_preferences.inc.php index 9aa98244..5ad845f5 100644 --- a/templates/show_preferences.inc.php +++ b/templates/show_preferences.inc.php @@ -32,13 +32,13 @@ */ ?> - +
    - + diff --git a/templates/show_random.inc.php b/templates/show_random.inc.php index c2ab692e..dcd0bd76 100644 --- a/templates/show_random.inc.php +++ b/templates/show_random.inc.php @@ -27,19 +27,19 @@ */ ?> - + - - - + + +
     
    - + - + - + @@ -40,23 +40,23 @@ diff --git a/templates/show_songs.inc.php b/templates/show_songs.inc.php index 4befb999..98331fc6 100644 --- a/templates/show_songs.inc.php +++ b/templates/show_songs.inc.php @@ -43,19 +43,19 @@ $ajax_url = Config::get('ajax_url'); - - - - - - - + + + + + + + - + - + - + - - - - - - - + + + + + + + - + - +
    >100 - +
    + diff --git a/templates/show_random_albums.inc.php b/templates/show_random_albums.inc.php index be669f75..e5abaa23 100644 --- a/templates/show_random_albums.inc.php +++ b/templates/show_random_albums.inc.php @@ -27,9 +27,9 @@ */ $web_path = Config::get('web_path'); -$button = Ajax::button('?page=index&action=random_albums','random',_('Refresh'),'random_refresh'); +$button = Ajax::button('?page=index&action=random_albums','random', T_('Refresh'),'random_refresh'); ?> - + "; } ?> - id,'add',_('Play Album'),'play_full_' . $album->id); ?> + id,'add', T_('Play Album'),'play_full_' . $album->id); ?> diff --git a/templates/show_recently_played.inc.php b/templates/show_recently_played.inc.php index f91f71de..542dd2b2 100644 --- a/templates/show_recently_played.inc.php +++ b/templates/show_recently_played.inc.php @@ -27,7 +27,7 @@ */ $link = Config::get('use_rss') ? ' ' . AmpacheRSS::get_display('recently_played') : ''; -show_box_top(_('Recently Played') . $link, 'box box_recently_played'); +show_box_top(T_('Recently Played') . $link, 'box box_recently_played'); ?> @@ -39,12 +39,12 @@ show_box_top(_('Recently Played') . $link, 'box box_recently_played'); - - - - - - + + + + + + format(); ?> @@ -105,16 +105,16 @@ show_box_top(_('Recently Played') . $link, 'box box_recently_played'); - + - - - - - - + + + + + +
    - id,'add',_('Add'),'add_' . $song->id); ?> + id,'add', T_('Add'),'add_' . $song->id); ?> f_link; ?> f_album_link; ?>
    diff --git a/templates/show_recommended_artists.inc.php b/templates/show_recommended_artists.inc.php index 6a168048..4652a0eb 100644 --- a/templates/show_recommended_artists.inc.php +++ b/templates/show_recommended_artists.inc.php @@ -27,7 +27,7 @@ */ ?> - + @@ -39,14 +39,14 @@ - - - - - - - - + + + + + + + + - + - - - - - - - - + + + + + + + +
    diff --git a/templates/show_registration_confirmation.inc.php b/templates/show_registration_confirmation.inc.php index 9aad6786..d7b62222 100644 --- a/templates/show_registration_confirmation.inc.php +++ b/templates/show_registration_confirmation.inc.php @@ -33,22 +33,22 @@ $web_path = Config::get('web_path'); -<?php echo Config::get('site_title'); ?> - <?php echo _('Registration'); ?> +<?php echo Config::get('site_title'); ?> - <?php echo T_('Registration'); ?>
    - +

    - +

    Ampache
    diff --git a/templates/show_rename_artist.inc.php b/templates/show_rename_artist.inc.php index 604ffcc8..8eebe5ce 100644 --- a/templates/show_rename_artist.inc.php +++ b/templates/show_rename_artist.inc.php @@ -33,15 +33,15 @@ function insert() document.getElementById('artist_name').value = 'name; ?>'; } -name)); ?> +name)); ?>

    id, "artist_id", 4); ?>
    -
    +
    - []
    + []
    print_error('artist_name'); ?> -  
    -
    +  
    +
    diff --git a/templates/show_rules.inc.php b/templates/show_rules.inc.php index e588f23a..ed076f0e 100644 --- a/templates/show_rules.inc.php +++ b/templates/show_rules.inc.php @@ -32,15 +32,15 @@ $logic_operator = strtolower($logic_operator); - + - + @@ -48,7 +48,7 @@ $logic_operator = strtolower($logic_operator); diff --git a/templates/show_run_add_catalog.inc.php b/templates/show_run_add_catalog.inc.php index be9f5b6f..d25ec832 100644 --- a/templates/show_run_add_catalog.inc.php +++ b/templates/show_run_add_catalog.inc.php @@ -28,5 +28,5 @@ // Get the count of the number of items in their playlist ?> -:
    -:
    +:
    +:
    diff --git a/templates/show_search.inc.php b/templates/show_search.inc.php index e55ba308..0d5484db 100644 --- a/templates/show_search.inc.php +++ b/templates/show_search.inc.php @@ -31,23 +31,23 @@ * This is the template for the searches... amazing! */ ?> - +
    - +
    - - - - + + + +
     
    - + diff --git a/templates/show_shoutbox.inc.php b/templates/show_shoutbox.inc.php index 5455539b..d2fc403e 100644 --- a/templates/show_shoutbox.inc.php +++ b/templates/show_shoutbox.inc.php @@ -27,7 +27,7 @@ */ ?> - +
    get_image(); ?> - object_type .'&id=' . $shout->object_id,'add',_('Add'),'add_' . $shout->object_type . '_' . $shout->object_id); ?> + object_type .'&id=' . $shout->object_id,'add', T_('Add'),'add_' . $shout->object_type . '_' . $shout->object_id); ?> f_link; ?> f_link; ?> date); ?> text); ?> diff --git a/templates/show_smartplaylist.inc.php b/templates/show_smartplaylist.inc.php index adde43fa..917c0a35 100644 --- a/templates/show_smartplaylist.inc.php +++ b/templates/show_smartplaylist.inc.php @@ -31,24 +31,24 @@ show_box_top('
    ' . $title .
    • - - + +
    • - id,'add',_('Add All'),'play_playlist'); ?> - + id,'add', T_('Add All'),'play_playlist'); ?> +
    • has_access()) { ?>
    • - id,'edit',_('Edit'),'edit_playlist_' . $playlist->id); ?> - + id,'edit', T_('Edit'),'edit_playlist_' . $playlist->id); ?> +
    • - +
    @@ -59,7 +59,7 @@ show_box_top('
    ' . $title .
    - +
    diff --git a/templates/show_smartplaylist_row.inc.php b/templates/show_smartplaylist_row.inc.php index bf1f43f0..201df5cb 100644 --- a/templates/show_smartplaylist_row.inc.php +++ b/templates/show_smartplaylist_row.inc.php @@ -21,7 +21,7 @@ */ ?>
    @@ -29,11 +29,11 @@ diff --git a/templates/show_smartplaylist_title.inc.php b/templates/show_smartplaylist_title.inc.php index 8691ac98..1d81ca80 100644 --- a/templates/show_smartplaylist_title.inc.php +++ b/templates/show_smartplaylist_title.inc.php @@ -21,4 +21,4 @@ */ ?> -f_type, $playlist->name); ?> +f_type, $playlist->name); ?> diff --git a/templates/show_smartplaylists.inc.php b/templates/show_smartplaylists.inc.php index 2c891884..b371d882 100644 --- a/templates/show_smartplaylists.inc.php +++ b/templates/show_smartplaylists.inc.php @@ -32,11 +32,11 @@ - - + + - - + + - + - - + + - - + +
       +    -    +    diff --git a/templates/show_search_bar.inc.php b/templates/show_search_bar.inc.php index 558868bd..fa9dee8e 100644 --- a/templates/show_search_bar.inc.php +++ b/templates/show_search_bar.inc.php @@ -34,14 +34,14 @@ - - + + diff --git a/templates/show_search_options.inc.php b/templates/show_search_options.inc.php index c4e49de6..a9434071 100644 --- a/templates/show_search_options.inc.php +++ b/templates/show_search_options.inc.php @@ -26,17 +26,17 @@ * @link http://www.ampache.org/ */ ?> - +
    • - id,'add',_('Add Search Results'),'add_search_results'); ?> - + id,'add', T_('Add Search Results'),'add_search_results'); ?> +
    • - - + +
    diff --git a/templates/show_shout_row.inc.php b/templates/show_shout_row.inc.php index 154171dd..221f3e89 100644 --- a/templates/show_shout_row.inc.php +++ b/templates/show_shout_row.inc.php @@ -36,11 +36,11 @@
    - + - +
    - id,'add',_('Add'),'add_playlist_' . $playlist->id); ?> + id,'add', T_('Add'),'add_playlist_' . $playlist->id); ?> f_link; ?> f_type; ?> - + has_access()) { ?> - id,'edit',_('Edit'),'edit_playlist_' . $playlist->id); ?> - id,'delete',_('Delete'),'delete_playlist_' . $playlist->id); ?> + id,'edit', T_('Edit'),'edit_playlist_' . $playlist->id); ?> + id,'delete', T_('Delete'),'delete_playlist_' . $playlist->id); ?>
     
     
    diff --git a/templates/show_song.inc.php b/templates/show_song.inc.php index f3cfd638..794ceb43 100644 --- a/templates/show_song.inc.php +++ b/templates/show_song.inc.php @@ -29,22 +29,22 @@ $icon = $song->enabled ? 'disable' : 'enable'; $button_flip_state_id = 'button_flip_state_' . $song->id; ?> -title . ' ' . _('Details'), 'box box_song_details'); ?> +title . ' ' . T_('Details'), 'box box_song_details'); ?>
    -
    +
    id,'song'); ?>
    -
    +
    - id,'add',_('Add'),'add_song_' . $song->id); ?> + id,'add', T_('Add'),'add_song_' . $song->id); ?> - - + + - id,$icon,_(ucfirst($icon)),'flip_song_' . $song->id); ?> + id,$icon, T_(ucfirst($icon)),'flip_song_' . $song->id); ?>
    @@ -72,7 +72,7 @@ $button_flip_state_id = 'button_flip_state_' . $song->id; if(trim($value)) { $rowparity = flip_class(); - echo "
    " . _($key) . "
    " . $value . "
    "; + echo "
    " . T_($key) . "
    " . $value . "
    "; } } ?> diff --git a/templates/show_song_row.inc.php b/templates/show_song_row.inc.php index 626f5967..5913e64a 100644 --- a/templates/show_song_row.inc.php +++ b/templates/show_song_row.inc.php @@ -28,7 +28,7 @@ ?>
    - id,'add',_('Add'),'add_' . $song->id); ?> + id,'add', T_('Add'),'add_' . $song->id); ?> f_title; ?> f_artist_link; ?>id,'song'); ?> - + - + - + - id,'edit',_('Edit'),'edit_song_' . $song->id); ?> + id,'edit', T_('Edit'),'edit_song_' . $song->id); ?> enabled ? 'disable' : 'enable'; ?> - id,$icon,_(ucfirst($icon)),'flip_song_' . $song->id); ?> + id,$icon, T_(ucfirst($icon)),'flip_song_' . $song->id); ?>
    id . '&sort=title', _('Song Title'), 'sort_song_title'); ?>id . '&sort=artist', _('Artist'), 'sort_song_artist'); ?>id . '&sort=album', _('Album'), 'sort_song_album'); ?>id . '&sort=track', _('Track'), 'sort_song_track'); ?>id . '&sort=time', _('Time'), 'sort_song_time'); ?>id . '&sort=title', T_('Song Title'), 'sort_song_title'); ?>id . '&sort=artist', T_('Artist'), 'sort_song_artist'); ?>id . '&sort=album', T_('Album'), 'sort_song_album'); ?>id . '&sort=track', T_('Track'), 'sort_song_track'); ?>id . '&sort=time', T_('Time'), 'sort_song_time'); ?>
    diff --git a/templates/show_stats.inc.php b/templates/show_stats.inc.php index 07f6da6f..8f3b37e3 100644 --- a/templates/show_stats.inc.php +++ b/templates/show_stats.inc.php @@ -29,19 +29,19 @@ $stats = Catalog::get_stats(); $catalogs = Catalog::get_catalogs(); ?> - - + + - - - - - - - - - + + + + + + + + + @@ -68,14 +68,14 @@ $catalogs = Catalog::get_catalogs(); - - - - - - - - + + + + + + + + _('Most Popular Albums')); + $headers = array('f_link' => T_('Most Popular Albums')); show_box_top('','info-box box_popular_albums'); require Config::get('prefix') . '/templates/show_objects.inc.php'; show_box_bottom(); $objects = Stats::get_top('artist'); - $headers = array('f_name_link'=>_('Most Popular Artists')); + $headers = array('f_name_link' => T_('Most Popular Artists')); show_box_top('','info-box box_popular_artists'); require Config::get('prefix') . '/templates/show_objects.inc.php'; show_box_bottom(); diff --git a/templates/show_tagcloud.inc.php b/templates/show_tagcloud.inc.php index 6ba7bb8f..215b0141 100644 --- a/templates/show_tagcloud.inc.php +++ b/templates/show_tagcloud.inc.php @@ -37,6 +37,6 @@ $web_path = Config::get('web_path'); id),'click',Ajax::action('?page=tag&action=add_filter&browse_id=' . $browse2->id . '&tag_id=' . intval($tag->id),'')); ?> - + diff --git a/templates/show_test.inc.php b/templates/show_test.inc.php index fcc070bd..eda139d8 100644 --- a/templates/show_test.inc.php +++ b/templates/show_test.inc.php @@ -36,26 +36,26 @@
    - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    - +
    [ " . phpversion() . " " . _('Hash Function Exists') . " " . print_bool(function_exists('hash_algos')) . " " . _('SHA256 Support') . " " . print_bool(in_array('sha256',$algos)) . ""; + $string = "" . phpversion() . " " . T_('Hash Function Exists') . " " . print_bool(function_exists('hash_algos')) . " " . T_('SHA256 Support') . " " . print_bool(in_array('sha256',$algos)) . ""; } else { echo debug_result('',true); @@ -64,12 +64,12 @@ ] - +
    [ - +
    [ - +
    [ ] - +
    [ ] - +
    [ ] - +
    [ ] - +
    [ ] - +
    [ -
    - + [ - +
    [ - +
    [ - +
    [ - +
    diff --git a/templates/show_test_config.inc.php b/templates/show_test_config.inc.php index 5a493bff..b78c0dff 100644 --- a/templates/show_test_config.inc.php +++ b/templates/show_test_config.inc.php @@ -44,7 +44,7 @@ body {
    diff --git a/templates/show_update_items.inc.php b/templates/show_update_items.inc.php index c952dc41..0466f876 100644 --- a/templates/show_update_items.inc.php +++ b/templates/show_update_items.inc.php @@ -26,10 +26,10 @@ * @link http://www.ampache.org/ */ -show_box_top(_('Starting Update from Tags'), 'box box_update_items'); +show_box_top(T_('Starting Update from Tags'), 'box box_update_items'); Catalog::update_single_item($type,$object_id); ?>
    -   - +   + diff --git a/templates/show_user.inc.php b/templates/show_user.inc.php index cc085055..653cfd32 100644 --- a/templates/show_user.inc.php +++ b/templates/show_user.inc.php @@ -26,27 +26,27 @@ * @link http://www.ampache.org/ */ -$last_seen = $client->last_seen ? date("m\/d\/y - H:i",$client->last_seen) : _('Never'); -$create_date = $client->create_date ? date("m\/d\/y - H:i",$client->create_date) : _('Unknown'); +$last_seen = $client->last_seen ? date("m\/d\/y - H:i",$client->last_seen) : T_('Never'); +$create_date = $client->create_date ? date("m\/d\/y - H:i",$client->create_date) : T_('Unknown'); $client->format(); ?> fullname); ?> @@ -37,6 +37,6 @@ diff --git a/templates/show_videos.inc.php b/templates/show_videos.inc.php index a4fe0741..90a2b700 100644 --- a/templates/show_videos.inc.php +++ b/templates/show_videos.inc.php @@ -41,13 +41,13 @@ $web_path = Config::get('web_path'); - - - - - - - + + + + + + + - + - - - - - - - + + + + + + +
    - : fullname; ?>
    - :
    - :
    - : f_useage; ?>
    + : fullname; ?>
    + :
    + :
    + : f_useage; ?>
    is_logged_in() AND $client->is_online()) { ?> - + - +
    -

    +

    id)); diff --git a/templates/show_user_activate.inc.php b/templates/show_user_activate.inc.php index af8caf19..71307724 100644 --- a/templates/show_user_activate.inc.php +++ b/templates/show_user_activate.inc.php @@ -33,14 +33,14 @@ $web_path = Config::get('web_path'); -<?php echo Config::get('site_title'); ?> - <?php echo _('Registration'); ?> +<?php echo Config::get('site_title'); ?> - <?php echo T_('Registration'); ?> @@ -52,15 +52,15 @@ $web_path = Config::get('web_path'); if ($validation == User::get_validation($username) AND strlen($validation)) { User::activate_user($username); ?> -

    +

    ', ''); ?> + printf(T_('This User ID is activated and can be used %sLogin%s'), '', ''); ?>

    -

    -

    +

    +

    diff --git a/templates/show_user_preferences.inc.php b/templates/show_user_preferences.inc.php index ead20fee..f179f768 100644 --- a/templates/show_user_preferences.inc.php +++ b/templates/show_user_preferences.inc.php @@ -32,7 +32,7 @@ */ ?> -fullname),'box box_preferences'); ?> +fullname),'box box_preferences'); ?>
    @@ -40,12 +40,12 @@ - - + + - + @@ -54,7 +54,7 @@ @@ -45,10 +45,10 @@ format_recommendations($recommended_albums,'album'); - show_info_box(_('Recommended Albums'),'album',$items); + show_info_box(T_('Recommended Albums'),'album',$items); } else { - echo "" . _('Not Enough Data') . ""; + echo "" . T_('Not Enough Data') . ""; } ?> @@ -56,10 +56,10 @@ format_recommendations($recommended_songs,'song'); - show_info_box(_('Recommended Songs'),'song',$items); + show_info_box(T_('Recommended Songs'),'song',$items); } else { - echo "" . _('Not Enough Data') . ""; + echo "" . T_('Not Enough Data') . ""; } ?> diff --git a/templates/show_user_registration.inc.php b/templates/show_user_registration.inc.php index 2d9ce3a8..27f951a6 100644 --- a/templates/show_user_registration.inc.php +++ b/templates/show_user_registration.inc.php @@ -33,7 +33,7 @@ $web_path = Config::get('web_path'); -<?php echo Config::get('site_title'); ?> - <?php echo _('Registration'); ?> +<?php echo Config::get('site_title'); ?> - <?php echo T_('Registration'); ?> @@ -45,7 +45,7 @@ $web_path = Config::get('web_path');
    -

    +

    - +
    -

    +

    - +
    - +
    - +
    - +
    - +
    - +
    @@ -112,7 +112,7 @@ if (Config::get('user_agreement')) { ?>
    - ' /> + ' />
    @@ -120,7 +120,7 @@ if (Config::get('user_agreement')) { ?> diff --git a/templates/show_user_row.inc.php b/templates/show_user_row.inc.php index 13ec72e7..93f783e4 100644 --- a/templates/show_user_row.inc.php +++ b/templates/show_user_row.inc.php @@ -43,18 +43,18 @@ is_logged_in()) AND ($client->is_online())) { diff --git a/templates/show_user_stats.inc.php b/templates/show_user_stats.inc.php index 9d812672..10ca28f5 100644 --- a/templates/show_user_stats.inc.php +++ b/templates/show_user_stats.inc.php @@ -35,11 +35,11 @@ if (count($favorite_artists)) { $items = $working_user->format_favorites($favorite_artists); $title = '' . - get_user_icon('all', _('Favorite Artists')) . ' ' . _('Favorite Artists'); + get_user_icon('all', T_('Favorite Artists')) . ' ' . T_('Favorite Artists'); show_info_box($title,'artist',$items); } else { - echo "" . _('Not Enough Data') . ""; + echo "" . T_('Not Enough Data') . ""; } ?> @@ -48,11 +48,11 @@ if (count($favorite_albums)) { $items = $working_user->format_favorites($favorite_albums); $title = '' . - get_user_icon('all', _('Favorite Albums')) . ' ' . _('Favorite Albums'); + get_user_icon('all', T_('Favorite Albums')) . ' ' . T_('Favorite Albums'); show_info_box($title,'album',$items); } else { - echo "" . _('Not Enough Data') . ""; + echo "" . T_('Not Enough Data') . ""; } ?> @@ -61,11 +61,11 @@ if (count($favorite_songs)) { $items = $working_user->format_favorites($favorite_songs); $title = '' . - get_user_icon('all', _('Favorite Songs')) . ' ' . _('Favorite Songs'); + get_user_icon('all', T_('Favorite Songs')) . ' ' . T_('Favorite Songs'); show_info_box($title,'your_song',$items); } else { - echo "" . _('Not Enough Data') . ""; + echo "" . T_('Not Enough Data') . ""; } ?> diff --git a/templates/show_users.inc.php b/templates/show_users.inc.php index 552d4b19..ae789f4b 100644 --- a/templates/show_users.inc.php +++ b/templates/show_users.inc.php @@ -43,36 +43,36 @@ $web_path = Config::get('web_path'); - - - - + + + + - + - - + + format(); - $last_seen = $client->last_seen ? date("m\/d\/Y - H:i",$client->last_seen) : _('Never'); - $create_date = $client->create_date ? date("m\/d\/Y - H:i",$client->create_date) : _('Unknown'); + $last_seen = $client->last_seen ? date("m\/d\/Y - H:i",$client->last_seen) : T_('Never'); + $create_date = $client->create_date ? date("m\/d\/Y - H:i",$client->create_date) : T_('Unknown'); ?> - - - - + + + + - + - - + +
    - +
    diff --git a/templates/show_user_recommendations.inc.php b/templates/show_user_recommendations.inc.php index 3d163ae5..6b2e761a 100644 --- a/templates/show_user_recommendations.inc.php +++ b/templates/show_user_recommendations.inc.php @@ -34,10 +34,10 @@ format_recommendations($recommended_artists,'artist'); - show_info_box(_('Recommended Artists'),'artist',$items); + show_info_box(T_('Recommended Artists'),'artist',$items); } else { - echo "" . _('Not Enough Data') . ""; + echo "" . T_('Not Enough Data') . ""; } ?>
    - - + + disabled == '1') { - echo "id\">" . get_user_icon('enable', _('Enable')) . ""; + echo "id\">" . get_user_icon('enable', T_('Enable')) . ""; } else { - echo "id\">" . get_user_icon('disable', _('Disable')) .""; + echo "id\">" . get_user_icon('disable', T_('Disable')) .""; } ?> - +
    ( )( )
    ( )( )
    diff --git a/templates/show_verify_catalog.inc.php b/templates/show_verify_catalog.inc.php index 4786c703..a9004b5e 100644 --- a/templates/show_verify_catalog.inc.php +++ b/templates/show_verify_catalog.inc.php @@ -26,13 +26,13 @@ * @link http://www.ampache.org/ */ -show_box_top(_('Verify Catalog'), 'box box_verify_catalog'); +show_box_top(T_('Verify Catalog'), 'box box_verify_catalog'); /* HINT: Catalog Name */ -printf(_('Updating the %s catalog'), "[ $this->name ]"); +printf(T_('Updating the %s catalog'), "[ $this->name ]"); echo "
    \n"; printf(ngettext('%d item found checking tag information', '%d items found checking tag information', $number), $number); echo "
    \n\n"; -echo _('Verified') . ': ' . $catalog_verify_found . '
    '; -echo _('Reading') . ': ' . $catalog_verify_directory . '
    '; +echo T_('Verified') . ': ' . $catalog_verify_found . '
    '; +echo T_('Reading') . ': ' . $catalog_verify_directory . '
    '; show_box_bottom(); ?> diff --git a/templates/show_video_row.inc.php b/templates/show_video_row.inc.php index 6f0ebd1f..e34c4bff 100644 --- a/templates/show_video_row.inc.php +++ b/templates/show_video_row.inc.php @@ -28,7 +28,7 @@ ?>
    - id,'add',_('Add'),'add_video_' . $video->id); ?> + id,'add', T_('Add'),'add_video_' . $video->id); ?> f_title; ?> f_codec; ?>f_tags; ?> - +
    diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php index f1d980a0..00685bc4 100644 --- a/templates/sidebar.inc.php +++ b/templates/sidebar.inc.php @@ -31,11 +31,11 @@ $class_name = 'sidebar_' . $_SESSION['state']['sidebar_tab']; ${$class_name} = ' active'; // List of buttons ( id, title, icon, access level) -$sidebar_items[] = array('id'=>'home', 'title'=>_('Home'), 'icon'=>'home', 'access'=>5); -$sidebar_items[] = array('id'=>'localplay', 'title'=>_('Localplay'), 'icon'=>'volumeup', 'access'=>5); -$sidebar_items[] = array('id'=>'preferences', 'title'=>_('Preferences'), 'icon'=>'edit', 'access'=>5); -$sidebar_items[] = array('id'=>'modules','title'=>_('Modules'),'icon'=>'plugin','access'=>100); -$sidebar_items[] = array('id'=>'admin', 'title'=>_('Admin'), 'icon'=>'admin', 'access'=>100); +$sidebar_items[] = array('id'=>'home', 'title' => T_('Home'), 'icon'=>'home', 'access'=>5); +$sidebar_items[] = array('id'=>'localplay', 'title' => T_('Localplay'), 'icon'=>'volumeup', 'access'=>5); +$sidebar_items[] = array('id'=>'preferences', 'title' => T_('Preferences'), 'icon'=>'edit', 'access'=>5); +$sidebar_items[] = array('id'=>'modules','title' => T_('Modules'),'icon'=>'plugin','access'=>100); +$sidebar_items[] = array('id'=>'admin', 'title' => T_('Admin'), 'icon'=>'admin', 'access'=>100); $web_path = Config::get('web_path'); @@ -65,7 +65,7 @@ $ajax_url = Config::get('ajax_url'); ?>
  • - +
diff --git a/templates/sidebar_admin.inc.php b/templates/sidebar_admin.inc.php index 789d654d..eda90e7c 100644 --- a/templates/sidebar_admin.inc.php +++ b/templates/sidebar_admin.inc.php @@ -28,44 +28,44 @@ ?>
    -
  • +
    • -
    • -
    • +
    • +
  • -
  • +
    • -
    • -
    • +
    • +
  • -
  • +
    • -
    • -
    • +
    • +
  • -
  • +
    • -
    • -
    • -
    • +
    • +
    • +
    • -
    • +
  • -
  • +
    • -
    • +
  • diff --git a/templates/sidebar_home.inc.php b/templates/sidebar_home.inc.php index 8c7fd25d..186bd7e1 100644 --- a/templates/sidebar_home.inc.php +++ b/templates/sidebar_home.inc.php @@ -29,7 +29,7 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); ?>
      -
    • +
      • -
      • -
      • -
      • -
      • -
      • -
      • -
      • -
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
    • -
    • +
      • -
      • +
      • -
      • +
      • current_instance(); $class = $current_instance ? '' : ' class="active_instance"'; ?> -
      • +
      • -
      • +
    • -
    • +
      • -
      • -
      • -
      • -
      • +
      • +
      • +
      • +
    • -
    • +
      • -
      • -
      • - +
      • +
      • +
    • -
    • +
    diff --git a/templates/sidebar_localplay.inc.php b/templates/sidebar_localplay.inc.php index 7339e2a9..a689e497 100644 --- a/templates/sidebar_localplay.inc.php +++ b/templates/sidebar_localplay.inc.php @@ -37,19 +37,19 @@ $class = $current_instance ? '' : ' class="active_instance"'; ?> -
  • +
    • -
    • -
    • +
    • +
    • -
    • +
  • -
  • +
    • -
    • >
    • +
    • >
    • get_instances(); @@ -65,13 +65,13 @@
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
diff --git a/templates/sidebar_modules.inc.php b/templates/sidebar_modules.inc.php index 83e64568..7989f030 100644 --- a/templates/sidebar_modules.inc.php +++ b/templates/sidebar_modules.inc.php @@ -29,25 +29,25 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); ?>
    -
  • +
    • -
    • -
    • +
    • +
  • -
  • +
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +