diff --git a/DataStructures/TurnInstructionsList.h b/DataStructures/TurnInstructionsList.h index 4a0abe822..8c1e3dab7 100644 --- a/DataStructures/TurnInstructionsList.h +++ b/DataStructures/TurnInstructionsList.h @@ -14,21 +14,19 @@ struct TurnInstructionsListClass { - // Clase en la que recorreremos la estructura en directorios + // Class to go over directory hierachy list tilist; vector languages; - // Constructor vacio TurnInstructionsListClass(){}; - // Constructor TurnInstructionsListClass(std::string path){ vector archivos; vector::iterator posArchivo; posArchivo = archivos.begin(); FindFile(path.c_str(), archivos); TurnInstructionsClass ti; - // Vector con los nombres de los archivos a leer + // Vector with the file names to read for (int i = 0; i < archivos.size(); ++i){ ti = TurnInstructionsClass(archivos.at(i)); posArchivo++; @@ -39,15 +37,15 @@ struct TurnInstructionsListClass { void FindFile (const char dirname[], vector &archivos){ static DIR *dir; static struct dirent *mi_dirent; - // Comprobar que se abre el directorio + // Check if the directory have opened correctly if((dir = opendir(dirname)) == NULL) cout << "Fault in opendir" << endl;; - // Recorremos el contenido del directorio + // Go over directory content while ((mi_dirent = readdir(dir)) != NULL){ - // Si no es él mismo (.) o el padre (..) + // If it's not (.) or (..) if (strcmp (mi_dirent->d_name, ".") != 0 && strcmp (mi_dirent->d_name, "..") != 0){ struct stat structura; - // Leer la ruta completa + // Read the complete path string dirnameString = dirname; string nameFile = mi_dirent->d_name; string pathFile = dirnameString + "/" + nameFile; @@ -73,7 +71,7 @@ struct TurnInstructionsListClass { boost::to_upper(language); list ::iterator pos; int index = -1; - // Cuando no se le pasa ningún idioma + // In case the language is empty if(index == -1 && language == ""){ for(int i=0; i