claude: arreglos d'estil
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <string> // Para string, basic_string
|
||||
#include <utility>
|
||||
#include <utility> // Para move
|
||||
|
||||
// --- Namespace Lang: gestión de idiomas y textos ---
|
||||
namespace Lang {
|
||||
// --- Códigos de idioma soportados ---
|
||||
// --- Enums ---
|
||||
enum class Code : int {
|
||||
SPANISH = 0,
|
||||
VALENCIAN = 1,
|
||||
ENGLISH = 2
|
||||
SPANISH = 0, // Español
|
||||
VALENCIAN = 1, // Valenciano
|
||||
ENGLISH = 2 // Inglés
|
||||
};
|
||||
|
||||
// --- Estructura que representa un idioma ---
|
||||
// --- Estructuras ---
|
||||
struct Language {
|
||||
Code code; // Código que identifica al idioma
|
||||
std::string name; // Nombre que identifica el idioma
|
||||
@@ -21,7 +22,7 @@ struct Language {
|
||||
: code(c), name(std::move(n)), file_name(std::move(fn)) {}
|
||||
};
|
||||
|
||||
// --- Métodos ---
|
||||
// --- Funciones ---
|
||||
auto loadFromFile(const std::string &file_path) -> bool; // Carga los textos desde el fichero JSON especificado
|
||||
auto getText(const std::string &key) -> std::string; // Obtiene el texto por clave
|
||||
auto getNextLangCode(Code current_lang) -> Code; // Obtiene el código del siguiente idioma (circular)
|
||||
|
||||
Reference in New Issue
Block a user