feat: Add translation support for motd#154
feat: Add translation support for motd#154theMimolet wants to merge 11 commits intoprojectbluefin:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces translation support for the MOTD, starting with French. The implementation involves determining the system language and loading the appropriate template and tips files. The changes look good overall, but I found a critical issue in env.sh where a relative path is used to find the list of available languages. This will cause the language detection to always fall back to English. I've left a specific comment with a suggested fix to address this.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Here's what the updated version contains :
Basically it will get the user's language code, check if a file for it already exist, retrieve the strings, retrieve one random tip (from the user's language code) and then finally renders the motd. |
ledif
left a comment
There was a problem hiding this comment.
At a quick glance, this looks good. I haven't tested it, but it seems like it should work. I'd be more comfortable approving if someone could test it.
Co-authored-by: Adam Fidel <ledif@users.noreply.github.com>
|
I tested it in as it's own thing in its own folder and it worked perfectly |
There was a problem hiding this comment.
looks like you accidentally stripped the executable bit somewhere down the line
|
So what happens if the original is changed, shouldn't it override the outdated translation then in the markdown files? I fear this thing as a whole could become difficult to maintain in the future, which was our overall goal by moving here in the first place. EDIT: Don't get me wrong, I like the overall goal of this but perhaps this should just be using standard tooling like gnu gettext where this problem is solved |
|
Well those are really just plain old json files.. |
Hi !
I was wondering to myself if it was possible to add translations to the motd.
So I tested a bit, and here you go ! 👍
It's still a draft PR because I still need to fully translate it in french (ofc) and I'm not sure about my changes in env.sh.
Any feedback is welcome ! 😄
(Of course, if it works out here, it will also be added to Bazzite and Aurora)