Time Nick Message 01:20 MTDiscord Is anyone currently investigating this? Can I help with providing logs or debug info? I'm constantly getting "connection timed out" on two devices. https://github.com/minetest/minetest/issues/9107 14:12 rubenwardy Any idea of the best way to get a .tr compatible lang-code in the mainmenu? 14:12 rubenwardy as in, the current user locale 14:17 erle rubenwardy what have you tried so far so that we can rule it out? 14:18 erle and what are you actually trying to do, a language selector? or a locale selector? 14:19 rubenwardy I'm adding support for title and short description translations 14:20 rubenwardy for mods, games, and texture packs 14:22 rubenwardy I've tried seeing how the client does it, looks like the server sends them the correct translations from the start 14:23 erle how are you adding it though, can i see? 14:23 rubenwardy found i 14:23 rubenwardy Client-side translation uses gettext("LANG_CODE"); 14:23 erle i have a bit of experience with locale code, but not *too* much (see my complains about gettext in really old minetest lol) 14:24 erle note that language != locale though 14:24 erle you *probably* don't want locale, only language 14:24 erle otherwise your numbers may format weirdly, for example. 14:25 rubenwardy I don't mean C locale 14:26 rubenwardy > In computing, a locale is a set of parameters that defines the user's language, region and any special variant preferences that the user wants to see in their user interface. 14:26 rubenwardy Specifically I want the user's language here 14:27 rubenwardy but the context of "the lang code" is "the curren user's locale" 14:29 sfan5 well the thing we have for this is LANG_CODE 14:30 sfan5 because we termined that there was no way to just ask gettext for it 14:30 rubenwardy does this mean that you can't have a mod translation if there's no engine translation for that lang code? 14:31 rubenwardy the translation system isn't very flexible - it's normal to have a list of preferred languages, rather than just one, and also support generalisation like `en-US` -> `en` for example 14:31 rubenwardy maybe this isn't such a huge issue 14:31 sfan5 yes to your question 14:31 rubenwardy oh wait, you can't select a language if there's no engine translation, let alone LANG_CODE 14:32 rubenwardy I guess the engine is fairly well translated anyway 14:34 rubenwardy argh, warr has pointed out that this doesn't work very well for games - as there's no toplevel locale folder, and they may centralise translations 14:34 rubenwardy so it'll need to check all locale media folders for the translation, and have a key for the textdomain in game.conf 14:35 sfan5 I don't think the client-side translation system makes sense for this anyway (except maybe for consistency for the game author) 14:36 rubenwardy consistency is exactly the goal here 14:36 sfan5 I'd just put a description.de, description.fr, description.ko field in the game.conf otherwise 14:36 rubenwardy wouldn't be able to use weblate to automate that 14:37 sfan5 not like weblate can automate .tr without external help can it? 14:37 rubenwardy weblate doesn't support .tr, but some users convert .tr to gettext/json for weblate. And I'd like to support gettext in the future 14:38 rubenwardy see nore's PR 14:39 nore aaaa not enough time, I still need to finish that PR :'( 14:39 nore hi everyone by the way :) 14:40 rubenwardy also, there's an argument that maybe a .json format could be worth using instead if gettext is that complex to parse. Weblate supports a few of them 14:41 rubenwardy consistency with engine translation would be nice though 14:41 nore well, gettext is not *that* complex to parse 14:41 nore also, .mo files have the advantage of being quite compact 15:49 erle most important for mod authors is having something easy to author 15:49 erle so matching other translations is a good thing 15:58 rubenwardy #12208 15:58 ShadowBot https://github.com/minetest/minetest/issues/12208 -- Add support for translating content titles and descriptions by rubenwardy 16:04 erle rubenwardy does LANG have to be an ISO-639-1 code? 16:05 erle i mean, i already have translation files for de, ru, fr, es … but i wonder now 16:11 rubenwardy I don't know what standard it uses, but it's the same as engine translations 16:11 rubenwardy And there needs to be a matching engine translation to translate a mod into that language