all ui translated to Latvian

This commit is contained in:
jorenchik
2024-11-03 11:16:55 +02:00
parent 8e6b3f7f96
commit 73c37659cb
5 changed files with 93 additions and 96 deletions

View File

@@ -167,7 +167,7 @@ Result<std::vector<Token>> tokenizeMdem(const std::string& content) {
if (!identifierStarted) {
return {
tokens,
"Cannot end identifier if it is not started",
"Nevar beigt identifikatoru, ja tas nav iesākts",
tokens[i].row,
tokens[i].column
};
@@ -245,12 +245,12 @@ Result<std::vector<Token>> tokenizeMdem(const std::string& content) {
);
if (debug) {
std::cout << "SECTION: Lexer output:\n";
std::cout << std::format("Token count: {}", tokens.size()) << std::endl;
std::cout << "SECTION: LEXER:\n";
std::cout << std::format("Tekstvienību daudzums: {}", tokens.size()) << std::endl;
for (const Token& token : tokens) {
std::cout << token.toString();
}
std::cout << "SECTION END: Lexer output\n";
std::cout << "SECTION END: LEXER\n";
}
return {tokens, ""};
@@ -258,18 +258,18 @@ Result<std::vector<Token>> tokenizeMdem(const std::string& content) {
std::string Token::toString(const TokenType* ttype) {
switch (*ttype) {
case TokenType::TextFragment: return "text fragment";
case TokenType::QuestionEnd: return "question end symbol";
case TokenType::MatchGroupEnd: return "match group end";
case TokenType::ElementDashStart: return "dash element start";
case TokenType::ElementOrderModifier: return "order element modifier";
case TokenType::ElementPlusStart: return "plus element start";
case TokenType::Cooldown: return "cooldown";
case TokenType::CooldownStart: return "start of cooldown";
case TokenType::CooldownEnd: return "end of cooldown";
case TokenType::StartOfFile: return "start of the file";
case TokenType::EndOfFile: return "end of file";
default: return "unrecognized token";
case TokenType::TextFragment: return "teksta fragments";
case TokenType::QuestionEnd: return "jautājuma beigas";
case TokenType::MatchGroupEnd: return "grupas beigas";
case TokenType::ElementDashStart: return "svītras elementa sākums";
case TokenType::ElementOrderModifier: return "secības elementa sākums";
case TokenType::ElementPlusStart: return "plusa elementa sākums";
case TokenType::Cooldown: return "pārtraukums";
case TokenType::CooldownStart: return "pātraukuma sākums";
case TokenType::CooldownEnd: return "pātraukuma beigas";
case TokenType::StartOfFile: return "faila sākums";
case TokenType::EndOfFile: return "faila beigas";
default: return "neatpazīta tekstvienība";
}
}