1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00

Fixed indent and add translation words

This commit is contained in:
momo-i 2011-02-03 14:03:16 +09:00
parent 7ef24e84c6
commit 9ce63661d1
10 changed files with 96 additions and 34 deletions

View file

@ -62,7 +62,6 @@ switch($_REQUEST['action']) {
require_once Config::get('prefix') . '/templates/show_artist.inc.php';
break;
case 'update_from_tags':
$type = 'artist';
$object_id = intval($_REQUEST['artist']);
$target_url = Config::get('web_path') . "/artists.php?action=show&artist=" . $object_id;
@ -93,8 +92,8 @@ switch($_REQUEST['action']) {
}
if ($count > 0) {
show_confirmation (
"Renamed artist(s)",
"$count artists have been merged with " . $artist->name,
_('Renamed artist(s)'),
sprintf(_('%1$s artists have been merged with %2$s'), $count, $artist->name),
conf('web_path') . "/artists.php?action=show&artist=" . $artist->id
);
} else {
@ -173,8 +172,8 @@ switch($_REQUEST['action']) {
// show something other than a blank screen after this
if ($ret) {
show_confirmation (
"Renamed artist",
$artist->name . " is now known as " . $newname,
_('Renamed artist'),
sprintf(_('%1$s is now known as %2$s'), $artist->name, $newname),
conf('web_path') . "/artists.php?action=show&artist=" . $newid
);
}

View file

@ -54,10 +54,18 @@
*/
class Config {
// These are the settings for this specific class
/**
* These are the settings for this specific class
*
* @var array
*/
private $_local = array();
// These are the global settings they go where it goes
/**
* These are the global settings they go where it goes
*
* @var array
*/
private static $_global = array();
/**
@ -74,6 +82,9 @@ class Config {
* get
* This checks to see if this is an instance or procedure
* call, procedure == global, instance == local
*
* @param string $name
* @return mixed array or null
*/
public static function get($name) {
@ -85,6 +96,8 @@ class Config {
/**
* get_all
* This returns all of the current config variables as an array
*
* @return array
*/
public static function get_all() {
@ -96,6 +109,11 @@ class Config {
* set
* This checks to see if this is an instance or procedure calls
* and then sets the correct variable based on that
*
* @param string $name Key name
* @param string $value Value name
* @param integer $clobber Clobber flag 0 or 1
* @return void
*/
public static function set($name, $value, $clobber = 0) {
@ -112,6 +130,9 @@ class Config {
/**
* set_by_array
* This is the same as the set function except it takes an array as input
*
* @param array $array Array
* @param integer $clobber Clobber flag 0 or 1
*/
public static function set_by_array($array, $clobber = 0) {

View file

@ -53,12 +53,41 @@
*/
interface media {
/**
* format
*
* @return
*/
public function format();
/**
* native_stream
*
* @return mixed
*/
public function native_stream();
/**
* play_url
*
* @param int $oid ID
* @return mixed
*/
public static function play_url($oid);
/**
* stream_cmd
*
* @return mixed
*/
public function stream_cmd();
/**
* has_flag
*
* @return mixed
*/
public function has_flag();
} // end interface
?>

View file

@ -34,6 +34,8 @@
/**
* load_gettext
* Sets up our local gettext settings.
*
* @return void
*/
function load_gettext() {
/* If we have gettext */
@ -65,6 +67,11 @@ function load_gettext() {
* This function does the same as _ on the supplied
* string, but also does a str_replace on the supplied
* vars
*
* @param string $string
* @param string $subject
* @param string $replace
* @return string
*/
function __($string,$subject,$replace) {
@ -74,6 +81,12 @@ function __($string,$subject,$replace) {
} // __
/**
* gettext_noop
*
* @param string $string
* @return string
*/
function gettext_noop($string) {
return $string;
}

View file

@ -74,7 +74,7 @@ switch ($_REQUEST['action']) {
$playlist->create($playlist_name,$playlist_type);
$_SESSION['data']['playlist_id'] = $playlist->id;
show_confirmation(_('Playlist Created'),$playlist_name . ' (' . $playlist_type . ') ' . _(' has been created'),'playlist.php');
show_confirmation(_('Playlist Created'), sprintf(_('%1$s (%2$s) has been created'), $playlist_name, $playlist_type),'playlist.php');
break;
case 'delete_playlist':
// If we made it here, we didn't have sufficient rights.

View file

@ -63,7 +63,7 @@ switch ($_REQUEST['action']) {
case 'save_as_track':
$playlist_id = save_search($_REQUEST);
$playlist = new Playlist($playlist_id);
show_confirmation("Search Saved","Your Search has been saved as a track in $playlist->name",conf('web_path') . "/search.php");
show_confirmation(_('Search Saved'),sprintf(_('Your Search has been saved as a track in %s'), $playlist->name),conf('web_path') . "/search.php");
break;
default:
require_once Config::get('prefix') . '/templates/show_search.inc.php';