Implementar systema de idiomas con gl, es y en

Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
2020-10-28 13:26:34 +01:00
parent 275a41a922
commit fbbef585d2
9 changed files with 240 additions and 19 deletions

View File

@ -8,10 +8,9 @@ class Config {
public:
Config(int8_t numHilos, std::string tiempo);
// ~Config();
int8_t getNumHilos();
std::string getTiempo();
void setNumHilos(int8_t numHilos);
void setTiempo(std::string timepo);
void setTiempo(std::string tiempo);
};
#endif // __CONFIG_HPP_

25
include/idiomas/en.hpp Normal file
View File

@ -0,0 +1,25 @@
#include <string>
#ifndef __EN_HPP_
#define __EN_HPP_
namespace en{
const extern std::string noColor = "The terminal doesn't support cors";
const extern std::string errorGenerico_1 = "How do you get here?";
const extern std::string errorGenerico_2 = "Just in case we go to the main menu";
const extern std::string menuPrincipal = "Main Menu";
const extern std::string menuPrincipal_1 = "- Start Stress Test";
const extern std::string menuPrincipal_2 = "- Configurate";
const extern std::string menuPrincipal_3 = "- Exit";
const extern std::string menuConfigurar = "Configuration";
const extern std::string menuConfigurar_1 = "- Configurate all";
const extern std::string menuConfigurar_2 = "- Number of threads";
const extern std::string menuConfigurar_3 = "- Time";
const extern std::string menuConfigurar_4 = "- Main Menu";
const extern std::string confTodo = "All the configuration will be write in ";
const extern std::string confHilos = "Current number of threads > ";
const extern std::string confTiempo = "Current execution time > ";
const extern std::string confHilosInput = "- Number of threads\t> ";
const extern std::string confTiempoInput = "- Execution time\t> ";
}
#endif // __EN_HPP_

25
include/idiomas/es.hpp Normal file
View File

@ -0,0 +1,25 @@
#include <string>
#ifndef __ES_HPP_
#define __ES_HPP_
namespace es{
const extern std::string noColor = "El terminal no soporta colores";
const extern std::string errorGenerico_1 = "¿Como has llegado aquí?";
const extern std::string errorGenerico_2 = "Por si acaso vamos al menú principal";
const extern std::string menuPrincipal = "Menú Principal";
const extern std::string menuPrincipal_1 = "- Iniciar Stress Test";
const extern std::string menuPrincipal_2 = "- Configurar";
const extern std::string menuPrincipal_3 = "- Salir";
const extern std::string menuConfigurar = "Configuración";
const extern std::string menuConfigurar_1 = "- Configurar todo";
const extern std::string menuConfigurar_2 = "- Número de hilos";
const extern std::string menuConfigurar_3 = "- Tiempo";
const extern std::string menuConfigurar_4 = "- Menú principal";
const extern std::string confTodo = "Toda la configuración se escribirá en ";
const extern std::string confHilos = "Número de hilos actuales > ";
const extern std::string confTiempo = "Tiempo actual > ";
const extern std::string confHilosInput = "- Número de hilos\t> ";
const extern std::string confTiempoInput = "- Tiempo de ejecución\t> ";
}
#endif // __ES_HPP_

25
include/idiomas/gl.hpp Normal file
View File

@ -0,0 +1,25 @@
#include <string>
#ifndef __GL_HPP_
#define __GL_HPP_
namespace gl{
const extern std::string noColor = "El terminal non soporta cores";
const extern std::string errorGenerico_1 = "Como chegaches aquí?";
const extern std::string errorGenerico_2 = "Por si acaso imos ó menú principal";
const extern std::string menuPrincipal = "Menú Principal";
const extern std::string menuPrincipal_1 = "- Iniciar Stress Test";
const extern std::string menuPrincipal_2 = "- Configurar";
const extern std::string menuPrincipal_3 = "- Sair";
const extern std::string menuConfigurar = "Configuración";
const extern std::string menuConfigurar_1 = "- Configurar todo";
const extern std::string menuConfigurar_2 = "- Número de filos";
const extern std::string menuConfigurar_3 = "- Tempo";
const extern std::string menuConfigurar_4 = "- Menú principal";
const extern std::string confTodo = "Toda a configuración escribirase en ";
const extern std::string confHilos = "Número de filos actuáis > ";
const extern std::string confTiempo = "Tempo actual > ";
const extern std::string confHilosInput = "- Número de filos\t> ";
const extern std::string confTiempoInput = "- Tempo de execución\t> ";
}
#endif // __GL_HPP_

27
include/textos.hpp Normal file
View File

@ -0,0 +1,27 @@
#include <string>
#ifndef __TEXTOS_HPP_
#define __TEXTOS_HPP_
namespace txt{
extern std::string g_noColor;
extern std::string g_errorGenerico_1;
extern std::string g_errorGenerico_2;
extern std::string g_menuPrincipal;
extern std::string g_menuPrincipal_1;
extern std::string g_menuPrincipal_2;
extern std::string g_menuPrincipal_3;
extern std::string g_menuConfigurar;
extern std::string g_menuConfigurar_1;
extern std::string g_menuConfigurar_2;
extern std::string g_menuConfigurar_3;
extern std::string g_menuConfigurar_4;
extern std::string g_confTodo;
extern std::string g_confHilos;
extern std::string g_confTiempo;
extern std::string g_confHilosInput;
extern std::string g_confTiempoInput;
void inicializarIdioma(std::string idioma);
}
#endif // __TEXTOS_HPP_