diff --git a/swad_account.c b/swad_account.c index 309f756f9..3a6015f04 100644 --- a/swad_account.c +++ b/swad_account.c @@ -69,6 +69,7 @@ extern struct Globals Gbl; /*****************************************************************************/ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title); +static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrData *UsrDat); static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWithoutArroba, const char *NewEmail); static bool Acc_GetParamsNewAccount (char *NewNicknameWithoutArroba, @@ -162,8 +163,7 @@ void Acc_CheckIfEmptyAccountExists (void) { extern const char *Txt_Do_you_think_you_are_this_user; extern const char *Txt_Do_you_think_you_are_one_of_these_users; - extern const char *Txt_Name; - extern const char *Txt_Its_me; + extern const char *Txt_There_is_no_empty_account_associated_with_your_ID_X_; extern const char *Txt_Check_another_ID; extern const char *Txt_Please_enter_your_ID; extern const char *Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered_with_your_ID; @@ -222,41 +222,8 @@ void Acc_CheckIfEmptyAccountExists (void) /* Get user's data */ Usr_GetAllUsrDataFromUsrCod (&UsrDat); - /***** Write number of user in the list *****/ - fprintf (Gbl.F.Out,"" - "" - "%u" - "", - Gbl.RowEvenOdd,NumUsr); - - /***** Write user's name *****/ - fprintf (Gbl.F.Out,"" - "%s: %s" - "", - Gbl.RowEvenOdd,Txt_Name, - UsrDat.FullName[0] ? UsrDat.FullName : - "?"); - - /* Button to login with this account */ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); - Act_FormStart (ActAutUsrNew); - Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); - Lay_PutCreateButtonInline (Txt_Its_me); - Act_FormEnd (); - fprintf (Gbl.F.Out,"" - ""); - - /* Courses of this user */ - fprintf (Gbl.F.Out,"" - "", - Gbl.RowEvenOdd); - UsrDat.Sex = Usr_SEX_UNKNOWN; - Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_TEACHER); - Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_STUDENT); - fprintf (Gbl.F.Out,"" - ""); + /***** Write row with data of empty account *****/ + Acc_WriteRowEmptyAccount (NumUsr,ID,&UsrDat); } /***** Free memory used for user's data *****/ @@ -267,10 +234,7 @@ void Acc_CheckIfEmptyAccountExists (void) } else { - sprintf (Gbl.Message,"No existe ninguna cuenta "vacía"" - " (aún no usada) asociada a su ID %s.
" - " Si cree que puede haber sido inscrito/a" - " con otro ID, compruébelo, por favor.", // TODO: Need translation!!! + sprintf (Gbl.Message,Txt_There_is_no_empty_account_associated_with_your_ID_X_, ID); Lay_ShowAlert (Lay_INFO,Gbl.Message); } @@ -293,6 +257,59 @@ void Acc_CheckIfEmptyAccountExists (void) } } +/*****************************************************************************/ +/************************ Write data of empty account ************************/ +/*****************************************************************************/ + +static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrData *UsrDat) + { + extern const char *Txt_ID; + extern const char *Txt_Name; + extern const char *Txt_yet_unnamed; + extern const char *Txt_Its_me; + + /***** Write number of user in the list *****/ + fprintf (Gbl.F.Out,"" + "" + "%u" + "", + Gbl.RowEvenOdd,NumUsr); + + /***** Write user's ID and name *****/ + fprintf (Gbl.F.Out,"" + "%s: %s
" + "%s: ", + Gbl.RowEvenOdd, + Txt_ID,ID, + Txt_Name); + if (UsrDat->FullName[0]) + fprintf (Gbl.F.Out,"%s",UsrDat->FullName); + else + fprintf (Gbl.F.Out,"%s",Txt_yet_unnamed); + fprintf (Gbl.F.Out,""); + + /***** Button to login with this account *****/ + fprintf (Gbl.F.Out,"", + Gbl.RowEvenOdd); + Act_FormStart (ActAutUsrNew); + Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); + Lay_PutCreateButtonInline (Txt_Its_me); + Act_FormEnd (); + fprintf (Gbl.F.Out,"" + ""); + + /***** Courses of this user *****/ + fprintf (Gbl.F.Out,"" + "", + Gbl.RowEvenOdd); + UsrDat->Sex = Usr_SEX_UNKNOWN; + Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TEACHER); + Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STUDENT); + fprintf (Gbl.F.Out,"" + ""); + } + /*****************************************************************************/ /************ Show form to create a new account using parameters *************/ /*****************************************************************************/ diff --git a/swad_changelog.h b/swad_changelog.h index d86a934a3..aa67e0d4d 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -142,13 +142,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.2.13 (2016-09-26)" +#define Log_PLATFORM_VERSION "SWAD 16.15 (2016-09-26)" #define CSS_FILE "swad15.229.css" #define JS_FILE "swad15.238.1.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* + Version 16.15: Sep 26, 2016 Message translated. + Code refactoring of list with empty accounts for an ID. (205285 lines) Version 16.2.13: Sep 26, 2016 Message translated. (205203 lines) Version 16.2.12: Sep 26, 2016 Message translated. (205181 lines) Version 16.2.11: Sep 26, 2016 Message translated. (205159 lines) diff --git a/swad_text.c b/swad_text.c index 86eb4b378..705aeaec7 100644 --- a/swad_text.c +++ b/swad_text.c @@ -3569,7 +3569,7 @@ const char *Txt_Before_creating_a_new_account_check_if_you_have_been_already_reg "Abans de crear un compte nou," " comprovi si ja li han inscrit amb el seu ID"; #elif L==2 - "Bevor ein neues Konto erstellen," + "Bevor ein neues Benutzerkonto erstellen," " wenn Sie bereits mit Ihrer ID registriert worden sind"; #elif L==3 "Before creating a new account," @@ -3591,7 +3591,7 @@ const char *Txt_Before_creating_a_new_account_check_if_you_have_been_already_reg " należy sprawdzić, czy został on już zarejestrowany z identyfikatorem"; #elif L==9 "Antes de criar uma nova conta," - " verifique se você já foi registrado com o seu ID"; + " verifique se você já foi registrado/a com o seu ID"; #endif const char *Txt_Before_going_to_any_other_option_you_must_fill_your_nickname = @@ -4981,7 +4981,7 @@ const char *Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_reque " vostè pot crear abans de sol·licitar la seva inscripció en ella" " (el mateix és aplicable a institucions, centres i titulacions)."; #elif L==2 - "Herzlichen Glückwunsch! Du hast Dein Konto @%s erstellt." + "Herzlichen Glückwunsch! Du hast Dein Benutzerkonto @%s erstellt." " Jetzt %s finden Sie einige Daten in Ihrem Profil." " Vervollständigen anfordern und dann werden Sie in der Lage," " für die Einschreibung in Kurse an." @@ -30096,7 +30096,7 @@ const char *Txt_Remove_account = #if L==1 "Eliminar compte"; #elif L==2 - "Konto entfernen"; + "Benutzerkonto entfernen"; #elif L==3 "Remove account"; #elif L==4 @@ -46359,6 +46359,53 @@ const char *Txt_There_is_already_a_non_empty_folder_named_X = // Warning: it is "There is already a non-empty folder named %s."; // Necessita de tradução #endif +const char *Txt_There_is_no_empty_account_associated_with_your_ID_X_ = // Warning: it is very important to include %s in the following sentences +#if L==1 + "No hi ha cap compte buida (encara no usada)" + " associada al seu ID %s." + " Si creu que pot haver estat inscrit amb un altre ID," + " comprovi-ho, per favor."; +#elif L==2 + "Es gibt keine leeren Benutzerkonto (noch nicht verwendet)" + " im Zusammenhang mit Ihrer ID %s." + " Wenn Sie denken, dass Sie mit einer anderen ID registriert worden sein," + " überprüfen Sie es bitte."; +#elif L==3 + "There is no empty (not yet used) account" + " associated with your ID %s." + " If you think you may have been registered with another ID," + " check it, please."; +#elif L==4 + "No existe ninguna cuenta vacía (aún no usada)" + " asociada a su ID %s." + " Si cree que puede haber sido inscrito/a con otro ID, compruébelo, por favor."; +#elif L==5 + "Il n'y a pas de compte vide (pas encore utilisé)" + " associé à votre ID %s." + " Si vous pensez que vous avez été enregistré avec un autre ID," + " vérifier, s'il vous plaît."; +#elif L==6 + "No existe ninguna cuenta vacía (aún no usada)" + " asociada a su ID %s." + " Si cree que puede haber sido inscrito/a con otro ID," + " compruébelo, por favor."; // Okoteve traducción +#elif L==7 + "Non vi è alcun conto vuoto (non ancora utilizzato)" + " associato con il tuo ID %s." + " Se si pensa che potrebbe essere stato registrato/a con un altro ID," + " verificare, per favore."; +#elif L==8 + "Nie ma pusta konta (jeszcze nie używany)" + " powiązany z identyfikatorem %s." + " Jeśli uważasz, że mogła zostać zarejestrowana w innym ID," + " sprawdź to, proszę."; +#elif L==9 + "Não existe nenhuma conta vazio (ainda não utilizado)" + " associado ao seu ID %s." + " Se você acha que pode ter sido registado/a com outro ID," + " verifique-o, por favor."; +#endif + const char *Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed = #if L==1 "No se puede saber cuántos usuarios distintos han accedido sin identificarse."; // Necessita traduccio @@ -51256,6 +51303,27 @@ const char *Txt_Yesterday = "Ontem"; #endif +const char *Txt_yet_unnamed = +#if L==1 + "encara sense nom"; +#elif L==2 + "noch unbenannte"; +#elif L==3 + "yet unnamed"; +#elif L==4 + "aún sin nombre"; +#elif L==5 + "encore sans nom"; +#elif L==6 + "aún sin nombre"; +#elif L==7 + "ancora senza nome"; +#elif L==8 + "jeszcze nienazwany"; +#elif L==9 + "ainda sem nome"; +#endif + const char *Txt_You_already_answered_this_survey_before = #if L==1 "Usted ya respondió esta encuesta anteriormente."; // Necessita traduccio