query("UPDATE $gpdb->translations SET status = REPLACE(REPLACE(status, '-', ''), '+', '');"); } } function gp_install() { global $gpdb; $errors = gp_upgrade_db(); if ( $errors ) return $errors; gp_update_option( 'uri', guess_uri() ); } function gp_create_initial_contents() { global $gpdb; $gpdb->insert( $gpdb->projects, array('name' => __('Sample'), 'slug' => __('sample'), 'description' => __('A Sample Project'), 'path' => __('sample') ) ); $gpdb->insert( $gpdb->originals, array('project_id' => 1, 'singular' => __('GlotPress FTW'), 'comment' => __('FTW means For The Win'), 'context' => 'dashboard', 'references' => 'bigfile:666 little-dir/small-file.php:71' ) ); $gpdb->insert( $gpdb->originals, array('project_id' => 1, 'singular' => __('A GlotPress'), 'plural' => __('Many GlotPresses') ) ); $gpdb->insert( $gpdb->translation_sets, array( 'name' => __('My Translation'), 'slug' => __('my'), 'project_id' => 1, 'locale' => 'bg', ) ); // TODO: ask the user for an e-mail -- borrow WordPress install process if ( !defined('CUSTOM_USER_TABLE') ) { $admin = GP::$user->create( array( 'user_login' => 'admin', 'user_pass' => 'a', 'user_email' => 'baba@baba.net' ) ); GP::$permission->create( array( 'user_id' => $admin->id, 'action' => 'admin' ) ); } // TODO: ask the user to choose an admin user if using custom table }