Index: gp-includes/install-upgrade.php
===================================================================
--- gp-includes/install-upgrade.php	(révision 390)
+++ gp-includes/install-upgrade.php	(copie de travail)
@@ -52,11 +52,11 @@
 	
 	gp_update_option( 'uri', guess_uri() );
 	
-	$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->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', ) );
+	$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') ) {
Index: gp-includes/cli.php
===================================================================
--- gp-includes/cli.php	(révision 390)
+++ gp-includes/cli.php	(copie de travail)
@@ -42,15 +42,15 @@
 			$this->usage();
 		}
 		$project = GP::$project->by_path( $this->options['p'] );
-		if ( !$project ) $this->error( 'Project not found!' );
+		if ( !$project ) $this->error( __('Project not found!') );
 		
 		$locale = GP_Locales::by_slug( $this->options['l'] );
-		if ( !$locale ) $this->error( 'Locale not found!' );
+		if ( !$locale ) $this->error( __('Locale not found!') );
 		
 		$this->options['t'] = gp_array_get( $this->options, 't', 'default' );
 		
 		$translation_set = GP::$translation_set->by_project_id_slug_and_locale( $project->id, $this->options['t'], $locale->slug );
-		if ( !$translation_set ) $this->error( 'Translation set not found!' );
+		if ( !$translation_set ) $this->error( __('Translation set not found!') );
 
 		$this->action_on_translation_set( $translation_set );
 	}
Index: gp-includes/l10n.php
===================================================================
--- gp-includes/l10n.php	(révision 390)
+++ gp-includes/l10n.php	(copie de travail)
@@ -10,6 +10,10 @@
 	if (isset($locale))
 		return apply_filters( 'locale', $locale );
 
+	// GP_LANG is defined in gp-config.
+	if ( defined('GP_LANG') )
+		$locale = GP_LANG;
+		
 	// TODO: get locale from DB
 
 	if (empty($locale))
Index: gp-includes/warnings.php
===================================================================
--- gp-includes/warnings.php	(révision 390)
+++ gp-includes/warnings.php	(copie de travail)
@@ -71,7 +71,7 @@
 		$len_trans = gp_strlen( $translation );
 		if ( !( $this->length_lower_bound*$len_src < $len_trans && $len_trans < $this->length_upper_bound*$len_src ) &&
 				( !gp_in( '_abbreviation', $original ) && !gp_in( '_initial', $original ) ) ) {
-			return 'Lenghts of source and translation differ too much.';
+			return __('Lenghts of source and translation differ too much.');
 		}
 		return true;
 	}
@@ -82,10 +82,10 @@
 		$original_parts = preg_split($tag_re, $original, -1, PREG_SPLIT_DELIM_CAPTURE);
 		$translation_parts = preg_split($tag_re, $translation, -1, PREG_SPLIT_DELIM_CAPTURE);
 		if ( count( $original_parts) > count( $translation_parts ) ) {
-			return 'Missing tags from translation.';
+			return __('Missing tags from translation.');
 		}
 		if ( count( $original_parts) < count( $translation_parts ) ) {
-			return 'Too many tags in translation.';
+			return __('Too many tags in translation.');
 		}
 		foreach( gp_array_zip( $original_parts, $translation_parts ) as $tags ) {
 			list( $original_tag, $translation_tag ) = $tags;
@@ -117,10 +117,10 @@
 			$original_count = gp_array_get( $original_counts, $placeholder, 0 );
 			$translation_count = gp_array_get( $translation_counts, $placeholder, 0 );
 			if ( $original_count > $translation_count ) {
-				return 'Missing '.$placeholder.' placeholder in translation.';
+				return sprintf(__('Missing %s placeholder in translation.'), $placeholder);
 			}
 			if ( $original_count < $translation_count ) {
-				return 'Extra '.$placeholder.' placeholder in translation.';
+				return sprintf(__('Extra %s placeholder in translation.'), $placeholder);
 			}
 		}
 		return true;
@@ -137,10 +137,10 @@
 	
 	function warning_both_begin_end_on_newlines( $original, $translation, $locale ) {
 		if ( gp_endswith( $original, "\n" ) xor gp_endswith( $translation, "\n" ) ) {
-			return 'Original and translation should both end on newline.';
+			return __('Original and translation should both end on newline.');
 		}
 		if ( gp_startswith( $original, "\n" ) xor gp_startswith( $translation, "\n" ) ) {
-			return 'Original and translation should both begin on newline.';
+			return __('Original and translation should both begin on newline.');
 		}
 		return true;
 	}

