hacettepeoyt / hu-announcement-bot

Get the latest from Hacettepe with this amazing Telegram Bot!
https://t.me/HacettepeDuyurucuBot
GNU General Public License v3.0
8 stars 6 forks source link

Embed joker values into translations #41

Open furkansimsekli opened 1 year ago

furkansimsekli commented 1 year ago

I was always disappointed how the translation unit wasn't capable of using variables in the messages. You have to write those translations in a way that to accommodate variables from outer scope. This isn't ideal because every language has its own structure; such as where to put subject, verb and object?

Using the translation message as a template, and filling the empty spots afterwards might be a good idea. For example:

en: You successfully subscribed to {department_name}! tr: Başarıyla {department_name}'ne abone oldun!

Well some languages like Turkish also suffixes that depends to the word itself, this is yet another problem. However I prefer having grammatically wrong messages to the messages I somehow forced to make the way they are.