[EN/PT-BR] Creating a solution to increase my productivity via translation for threads.

image.pngUnsplash

lotus_divisor.png

Hello everyone! Greetings to all programmers. I believe this will be my first post here, so calm down, patience and solidarity at this moment my friends! Everything in life is a learning experience!


The good side of being a programmer is that We can think of cool solutions to some problem or difficulty we are facing and then develop the solution ourselves. This is what I started doing recently, considering that my biggest difficulty at the moment is translations and the use of tags in the answers. , I started developing my own solution for this.

Using a free translation API from "MyMemory", you can check out their website here => https://mymemory.translated.net/ which apparently allowed me to translate 5000 characters per One day, I implemented a simple translator in C# (C-Sharp), focused on translating from Portuguese to English (and other languages ​​are also possible) for Inleo Threads, X and later the idea for Meta Threads.

image.png

With that, the latest stable version is the one in the image above, where I I put my text in Portuguese and by clicking on the button or shortcut F2 I translate it and put it in the desired format to put in inLeo and in X. Of course now that X is banned in Brazil and we are back to the times of good old censorship, oops, from the caveman days, that one is now obsolete.

With that came the idea of ​​going to Meta Threads, trying to create contacts, friendships and bonds with people who also enjoy cryptocurrencies and financial freedom. With that, I started the new development of my project, which was called "Tradutor Libre" and later changed to Tradutor Livre.

Yes, I did research and looked for information on how to make a program translate texts, so it was Google + ChatGPT + my imagination to do it. create and well, I don't see a problem with that, with or without AI I would arrive at this solution as I have arrived at several others before artificial intelligence existed, simply by searching on Google.

To copy the content of these fields, I still use Ctrl + C and V , but it is already on the list to change this code so that when I enter the field by TAB or mouse click, the program already places the content of the translated text on my clipboard, so I only need to paste it where I want the text.


Now showing the new version still in development, a lot of things will be changed. I put the main menu as an MDI Container so that more screens can be opened inside it, making it a future manager and productivity facilitator for Hive.

image.png

The last text field is for Meta Threads, in which I've been making some small posts and trying to improve the circle of acquaintances and people focused on cryptocurrencies, so it's interesting to be able to post there quickly as well.

Gradually the idea is to make a connection to SQL Server to use HiveSQL and thus have a complete tool for observe and monitor the gains related to dividends, something I have already been doing and posting from time to time and everything is also manual. With this, after this first phase, export to Excel, PDF and other files.

image.png

The heart of the project is this function, which receives the text in Portuguese and converts it to English. The "input" variable receives this text and the "targetLanguage" variable receives "EN" in this case, indicating that it will be in English.

public string TranslateText(string input, string targetLanguage)
{
try
{
var client = new RestClient("https://api.mymemory.translated.net/get");

// Create a GET request with the query parameters
var request = new RestRequest("", Method.Get);

request.AddParameter("q", input); // Text to be translated

// Language pair (from: 'pt' to target)
request.AddParameter("langpair", $"pt|{targetLanguage}");

// Execute the request
var response = client.Execute(request);

dynamic jsonResponse = JObject.Parse(response.Content);

if (jsonResponse != null && jsonResponse.responseData.translatedText != null)
{
return jsonResponse.responseData.translatedText.ToString();
}

return "Error in translation.";
}
catch (Exception ex)
{
return $"Error: {ex.Message}";
}

}

It's all still very rigid, obviously, but another point I want to implement is reading parameters from an .ini file, to give more flexibility to the project, which could be used to define, for example, which tags I want to use by default.

Finally, I also want to make just one translator, in which I translate what I wrote into English and then add a tag at the end, also focusing on inLeo's Threads. Since I have a character limit per day, translating long posts is not my focus at this point.

So, until the next update, guys! See you there!

sun_divisor.webp

image.pngUnsplash

lotus_divisor.png

Olá a todos! Saudações a todos os programadores. Acredito que essa será a minha primeira postagem aqui, então, calma, paciência e solidariedade neste momento meus amigos! Tudo na vida é aprendizado!


O lado bom de ser um programador é que podemos pensar em soluções bacanas para algum problema ou dificuldade que estamos passando e com isso desenvolver nós mesmos a solução. É o que comecei a fazer a pouco tempo, visando que a minha maior dificuldade no momento são as traduções e o uso de tags nas respostas, comecei a desenvolver uma solução própria para isso.

Utilizando uma API de tradução grátis da "MyMemory", você pode conferir o site deles aqui => https://mymemory.translated.net/ que ao que parece me permiti traduzir 5000 caracteres por dia, implementei na linguagem em C# (C-Sharp) um simples tradutor, focado em traduzir do português para o inglês (E é possível outras línguas também) para as Threads da inleo, X e posteriormente a ideia para a Threads da Meta.

image.png

Com isso a ultima versão estável é essa da imagem acima, onde eu coloco o meu texto em português e clicando no botão ou atalho F2 realizo a tradução e já coloco no formato desejado para colocar na inLeo e no X. Claro que agora que o X está banido do Brasil e voltamos aos tempos da boa e velha censura, opa, do tempo das cavernas, esse ficou obsoleto.

Com isso surgiu a ideia de ir para as Threads da Meta, tentar criar contatos, amizades e laços com pessoas que também curtem criptomoedas e liberdade financeira. Com isso, comecei o novo desenvolvimento do meu projeto que tinha como nome "Tradutor Libre" e depois mudei para Tradutor Livre.

Sim, fiz pesquisas e busquei informações de como fazer um programa traduzir os textos, então foi Google + ChatGPT + minha imaginação para criar e bem, não vejo problema nisso, com ou sem IA eu iria chegar nessa solução como já cheguei em várias outras antes de existir inteligência artificial, simplesmente pesquisando no Google.

Para copiar o conteúdo destes campos, ainda utilizo o Ctrl + C e V, mas, já está na lista para mudar esse código para que quando eu entrar no campo por TAB ou clique do mouse, o programa já coloque no meu clipboard o conteúdo do texto traduzido, assim, somente preciso colar aonde desejar o texto.


Agora mostrando a versão nova ainda em desenvolvimento, muita coisa vai ser mudada. Coloquei o menu principal como um MDI Container para que mais telas possam ser abertas ali dentro, fazendo dele um futuro gerenciador e facilitador de produtividade para a Hive.

image.png

O ultimo campo de texto é para as Threads da Meta, no qual tenho feito algumas pequenas postagens e tentando melhorar o circulo de conhecidos e focados em criptomoedas, então é interessante ter uma agilidade para postar lá também.

Gradualmente a ideia é fazer uma conexão ao SQL Server para usar o HiveSQL e assim ter uma ferramenta completa também para observar e monitorar os ganhos relacionados aos dividendos, algo que já venho fazendo e postando uma vez ou outra e tudo bem manual também. Com isso depois dessa primeira fase, exportar em arquivo excel, pdf e coisas do tipo.

image.png

O coração do projeto é essa função, que recebe o texto em português e converte para o inglês. A variável "input" recebe esse texto e a "targetLanguage" recebe no caso "EN", indicando que será em inglês.

public string TranslateText(string input, string targetLanguage)
{
try
{
var client = new RestClient("https://api.mymemory.translated.net/get");

// Create a GET request with the query parameters
var request = new RestRequest("", Method.Get);

request.AddParameter("q", input); // Text to be translated

// Language pair (from: 'pt' to target)
request.AddParameter("langpair", $"pt|{targetLanguage}");

// Execute the request
var response = client.Execute(request);

dynamic jsonResponse = JObject.Parse(response.Content);

if (jsonResponse != null && jsonResponse.responseData.translatedText != null)
{
return jsonResponse.responseData.translatedText.ToString();
}

return "Error in translation.";
}
catch (Exception ex)
{
return $"Error: {ex.Message}";
}

}

Tudo muito ainda engessado obviamente, mas outro ponto que quero implementar é a leitura de parâmetros de um arquivo .ini, para dar mais flexibilidade ao projeto, podendo servir para por exemplo definir quais tags que quero utilizar por padrão.

Por fim, depois também quero fazer apenas um tradutor, no qual traduza o que escrevi para o inglês e depois jogue uma tag no final, focando também nas Threads da inLeo. Como tenho limite de caracteres para usar por dia, nesse primeiro momento a tradução de postagens longas não está no meu foco.

Então, até a próxima atualização pessoal! Nós vemos lá!

lotus_divisor.png

banner_hiver_br_01.png

🔹Hive Games: Splinterlands | dCrops | Terracore | Holozing🔹

🔹Follow me on X | Get Paid For Unused Internet Honeygain🔹

Posted Using InLeo Alpha

Sort:  

!hbits !hiqvote

Success! You mined 1.0 HBIT on Wusang: Isle of Blaq. Sorry, but you didn't find a bonus treasure token today. Try again tomorrow...they're out there! You can see your random number generated in the Discord server, #hbit-wusang-log channel. | tools | wallet | discord | community | daily <><

Check for bonus treasure tokens by entering your username at an H-E explorer or take a look at your wallet.
Read about Hivebits (HBIT) or read the story of Wusang: Isle of Blaq.$

Bzzz-rrr, Shiftrox! Parabéns pelo conhecimento em compartilhar! Entendo a dor de traduzir threads, é um trabalho chato! Seu programa em C# parece bem interessante! Bztt, espero que isso ajude a aumentar sua produtividade! #hivebr

Obrigado por promover a comunidade Hive-BR em suas postagens.

Vamos seguir fortalecendo a Hive

Metade das recompensas dessa resposta serão destinadas ao autor do post.

Vote no @perfilbrasil para Testemunha Hive.

Já no aguardo de ver isso funcionando para quando o cabeça de ovo liberar o X novamente.

Vai ser top mano, vai ajudar demais na produtividade, so de traduzir e ja jogar as tags e tipo vou por para quando clicar ja copiar, vai agilizar muita coisa kkkk

Curious about HivePakistan? Join us on Discord!

Delegate your HP to the Hivepakistan account and earn 90% of curation rewards in liquid hive!

50 HP
100 HP
200 HP
500 HP (Supporter Badge)
1000 HP

Follow our Curation Trail and don't miss voting!

Additional Perks: Delegate To @ pakx For Earning $PAKX Investment Token


Curated by gwajnberg

Thanks for your support! #freecompliments

Que massa boa ferramenta para deixar as pessoas mais a vontades em postar!
!BBH

Vai agilizar demais, depois que estiver pronto e lapidado to pensando em liberar a versão para as pessoas baixarem caso elas queiram kkk, valeu pelo suporte mano!

Nicely done, you're programming skills pay off once again!
!BBH
!DOOK


You just got DOOKed!
@thebighigg thinks your content is the shit.
They have 4/400 DOOK left to drop today.
dook_logo
Learn all about this shit in the toilet paper! 💩

I'm very simple at programming, there's a lot to learn, but every now and then my skills help with something haha, thanks for the support!

!BBH !LOLZ !PIZZA

My kids must love to camp
Whenever we go somewhere they keep asking RV there yet.

Credit: blockchainerx
@thebighigg, I sent you an $LOLZ on behalf of shiftrox

(3/10)
Delegate Hive Tokens to Farm $LOLZ and earn 110% Rewards. Learn more.

@thebighigg! @shiftrox likes your content! so I just sent 1 BBH to your account on behalf of @shiftrox. (1/20)

(html comment removed: )

@shiftrox! @thebighigg likes your content! so I just sent 1 BBH to your account on behalf of @thebighigg. (5/50)

(html comment removed: )

PIZZA!

$PIZZA slices delivered:
@shiftrox(2/15) tipped @phillarecette
shiftrox tipped thebighigg
cryptoyzzy tipped shiftrox

Que projeto legal! Espero ver o progresso dele!

Valeu man, eu quero tentar trazer as evoluções que eu fizer nele, acho legal compartilhar isso, eu trabalho com programação a tanto tempo e pouco posto aqui, talvez chegou a hora de tentar mostrar mais esse assunto aqui para todos! Um forte abraço!

Sem dúvidas! Seria um nicho bem interessante para você escrever sobre.

Já to com umas ideias prontas para amanha kkk, acho que vou escrever mais um pouco do que mudei, ta bem legal, agilizou bastante postar as threads

Congratulations @shiftrox! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You made more than 14000 comments.
Your next target is to reach 15000 comments.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

!PIZZA
!LOL
!INDEED

What did the Golden Gate bridge say to the Golden Gate river when they broke up?
I'm over you.

Credit: reddit
@shiftrox, I sent you an $LOLZ on behalf of cryptoyzzy

(1/10)
Delegate Hive Tokens to Farm $LOLZ and earn 110% Rewards. Learn more.

(1/10)
@shiftrox! @cryptoyzzy Totally agrees with your content! so I just sent 1 IDD to your account on behalf of @cryptoyzzy.

Indeed Logo

!LOL
!INDEED

Did you hear about the guy who threw his alarm clock while hosting a party?
He wanted to see if time flys while having fun.

Credit: reddit
@shiftrox, I sent you an $LOLZ on behalf of phillarecette

(3/10)
NEW: Join LOLZ's Daily Earn and Burn Contest and win $LOLZ

Thx man!

!PIZZA !LOLZ !BBH

Why are cats bad storytellers?
Because they only have one tale.

Credit: marshmellowman
@phillarecette, I sent you an $LOLZ on behalf of shiftrox

(1/10)

PLAY & EARN $DOOM

@phillarecette! @shiftrox likes your content! so I just sent 1 BBH to your account on behalf of @shiftrox. (2/20)

(html comment removed: )

(3/10)
@shiftrox! @phillarecette Totally agrees with your content! so I just sent 1 IDD to your account on behalf of @phillarecette.

Indeed Logo

@shiftrox, the HiQ Smart Bot has recognized your request (1/3) and will start the voting trail.

In addition, @shiftrox gets !COFFEE from @hiq.redaktion.

For further questions, check out https://hiq-hive.com or join our Discord. And don't forget to vote HiQs fucking Witness! 😻