Commits

Ricardo Obregón committed 3fd3d56

Agregados mensajes bilingües para página de login

Comments (0)

Files changed (4)

components/CrugeUi.php

 		}
 		$ar = array('name'=>$name);
 		
-		$_texto = ucwords(CrugeTranslator::t($texto));
+		$_texto = ucwords($texto);
 		
 		$estiloBoton = CrugeUtil::config()->buttonStyle;
 		
 		}
 		
 		if($estiloBoton == 'bootstrap'){
-			Yii::app()->getController()->widget('bootstrap.widgets.BootButton'
+			Yii::app()->getController()->widget('bootstrap.widgets.TbButton'
 				, array(
 					'buttonType'=>$_type, 
 					'type'=>'primary', 

messages/es/logon.php

+<?php
+/**
+ * Spanish translation for Cruge Logon messages
+ * @author Ricardo Obregón <ricardo@obregon.co>
+ * @date 4/12/12 03:37 PM
+ */
+
+return array(
+    'Login' => 'Iniciar Sesión',
+    'User not found' => 'el usuario no fue hallado',
+    'password' => 'clave de acceso',
+    'remember this machine' => 'recordar en este equipo',
+    'verify code' => 'codigo de seguridad',
+    'or' => 'o',
+);

models/ui/CrugeLogon.php

 		// ademas de cargar sus campos de perfil (flag=true)
 		$this->_model = Yii::app()->user->um->loadUser($this[$arg],true);
 		if($this->_model == null)
-			$this->addError($arg,CrugeTranslator::t("el usuario no fue hallado"));
+			$this->addError($arg,CrugeTranslator::t('logon', 'User not found'));
 	}
 
 	public function authenticate($arg='password',$param=''){
 		// la etiqueta $label cambiara depende de como este configuado el sistema
 		//
 		return array(
-			'username'=>$this->_getUsernameLabel(),
-			'password'=>ucfirst(CrugeTranslator::t('clave de acceso').":"),
-			'rememberMe'=>ucfirst(CrugeTranslator::t('recordar en este equipo').":"),
-			'verifyCode' => ucfirst(CrugeTranslator::t('codigo de seguridad').":"),
+			'username' => $this->_getUsernameLabel(),
+			'password' => ucfirst(CrugeTranslator::t('logon', 'password').":"),
+			'rememberMe' => ucfirst(CrugeTranslator::t('logon', 'remember this machine').":"),
+			'verifyCode' => ucfirst(CrugeTranslator::t('logon', 'verify code').":"),
 		);
 	}
 	private function _getUsernameLabel() {
 		$label = ""; $sep="";
 		foreach(CrugeUtil::config()->availableAuthModes as $k=>$v){
-			$label .= $sep.CrugeTranslator::t(ucfirst(CrugeUtil::config()->availableAuthModes[$k]));
-			$sep=" ".CrugeTranslator::t("o")." ";
+			$label .= $sep.CrugeTranslator::t('logon', ucfirst(CrugeUtil::config()->availableAuthModes[$k]));
+			$sep = " ".CrugeTranslator::t('logon', 'or')." ";
 		}
 		$label .= ":";
 		return $label;

views/ui/login.php

-<h1><?php echo CrugeTranslator::t("Iniciar Sesion"); ?></h1>
+<h1><?php echo CrugeTranslator::t('logon',"Login"); ?></h1>
 <?php if(Yii::app()->user->hasFlash('loginflash')): ?>
 <div class="flash-error">
 	<?php echo Yii::app()->user->getFlash('loginflash'); ?>
 	</div>
 
 	<div class="row buttons">
-		<?php Yii::app()->user->ui->tbutton("Iniciar Sesion"); ?>
+		<?php Yii::app()->user->ui->tbutton(CrugeTranslator::t('logon',"Login")); ?>
 		<?php echo Yii::app()->user->ui->passwordRecoveryLink; ?>
 		<?php
 			if(Yii::app()->user->um->getDefaultSystem()->getn('registrationonlogin')===1)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.