Astral-codex/main.cpp

47 lines
1017 B
C++
Raw Normal View History

2024-12-18 13:06:15 +00:00
#include <iostream>
#include <sstream>
#include "Errorseal.h"
2024-12-18 16:26:30 +00:00
#include "translator.h"
2024-12-18 13:06:15 +00:00
/*
* Coder: TheSkyWinds
* Translator: MewTheNekomata
*
* Created: 12/16/24.
*/
// Mew's translations:
// A=; B=x C=* D=x E=& F=( G=x H=) I=[ J=x K=x L=| M=x N=/ O=? P=+ Q=x R=] S={ T=} U=. V=x W=- X=x Y=x Z=x
2024-12-18 13:06:15 +00:00
// Sky's translations:
// A=; B=@ C=* D=< E=& F=( G=" H=) I=[ J=x K=x L=| M=x N=/ O=? P=+ Q=x R=] S={ T=} U=. V=x W=- X=x Y=x Z=x
2024-12-18 13:06:15 +00:00
std::string usrInput() {
std::string input{};
// Ensures that whitespace is preserved.
std::cout << "Enter the untranslated text: ";
std::getline(std::cin, input);
// Checks if there's any error & clears the buffer.
error::cinErrorVerbose();
return input;
}
int main() {
std::string untranslatedText{};
while (true) {
untranslatedText = {usrInput()};
if (untranslatedText == "exit") {
break;
}
2024-12-18 16:26:30 +00:00
std::cout << "Translation: " << translation::translateInput(untranslatedText) << std::endl;
2024-12-18 13:06:15 +00:00
}
}