Closed dmitmel closed 4 years ago
you don't have reliable access to discord. These days, you can say i don't have access at all.
and localize me will deprecate support for using non-English languages as the source for translations in 1.x
i didn't plan to do that. I only stopped relying on from_locale
to find langlabels, so all langlabels in the game gotta have an en_US or a langUid, or localize-me won't find them. Forcing from_locale
to en_US doesn't help much. Defaulting it could help, though.
And otherwise, i don't get it. Localize-Me basically attempts to disables itself as soon as it detects a non-modded locale, and runs away. And i don't see any reason why eisus would have localize-me installed or have anything depend on it. The one thing that happened since the 0.5 refactor, is that putting stuff inside sc.LANG_DETAILS.en_US.map_file
will make localize-me use it.
To me, the thing that patches the langfile is in the best position to handle it. Like the modloader already knows about every patch that touch langfiles and could at least tell it to some mod that nobody will install anyway. so i'm a bit undecided..
You misunderstood me. This isn't meant to be a part of Localize Me, I'm asking you for ideas on how to implement such behavior in a general injection which will be included in the CCLoader directly.
Edit: actually, I forgot to specify this, but whatever.
Err, not really for ideas (I know how this can be theoretically implemented, but haven't tried out doing that yet), but for suggestions on how to implement this in a way that wouldn't conflict with Localize Me. Anyway, my current plan is to just use the new and shiny scripted JSON patching system (which was added two days ago) and when a request to any of the lang files of built-in non-English locales is intercepted, fire a request to a corresponding English lang file and merge the received data on top of the English data.
If this is not a localize-me problem then why is this a localize-me issue :p
oh, and Satcher and I refer to these files as "lang files"
well, their doctype is literally STATIC-LANG-FILE
, no getting around that.
so while it is correct in the cases of English and German, in Asian languages it still stays as "round"
I'm not a native german speaker, but "round" does not seems correct, and wikipedia agrees, the translation might be something like Runde. it's correct in french, through. That's something i should implement in localize-me, when i get the time. But hey, considering that the german translation does not even translate combat arts...
And for the issue at hand, well, since the modloader knows about all patches, i suggest to includes patches for the wrong langfile if there is no patch for the right one. That's maybe your option 2, if i understand correctly.
Like if i'm running in de_DE
, and there is this mod with a gui.en_US.json.patch
but no gui.de_DE.json.patch
, then apply the one for en_US
instead. And let's not limit it to en_US
; If there is a great mod with a gui.ko_KR.json.patch
and a gui.zh_CN.json.patch
, then pick one of them.
It won't allow mods to have their own ru_RU
translation, through, because localize-me won't even attempt to load it by design.
AFAIK BROKEN_LOCALE can refer only to de_DE, ko_KR, ja_JP and zh_CN
Hardcoding locales is bad. What if RFG adds a new language ? Because i suspect that a new language is coming very soon. I mean, just look at this and peek at that directory list view...
If this is not a localize-me problem then why is this a localize-me issue :p
Because I prefer Github issues over email ¯\_(ツ)_/¯. After all the ticket is labeled "idea".
Hardcoding locales is bad. What if RFG adds a new language ?
The alternative is to iterate over the keys of ig.LANG_DETAILS
before Localize Me adds its own locale, this is easily doable. However, the point of asking that question is more about whether a broken locale can be added through Localize Me, which to me seems not, so I asked you directly in Localize Me's bugtracker.
Finished implementing this in CCLoader, as such I'm closing this ticket. Thanks for help!
(I hope github will let me fit all of this into a single message)
The discussion starts here on the discord crosscode modding server, copying my messages here as you don't have reliable access to discord.
To solve the issue at hand I propose loading
lang/sc/*.en_US.json
for each correspondinglang/sc/*.<BROKEN_LOCALE>.json
, first copying contents of the English file intoig.Lang
'slabels
field, then merging the labels of theBROKEN_LOCALE
over that. English, of course, is assumed to be the default language here asig.LangLabel
does so as well. AFAIKBROKEN_LOCALE
can refer only tode_DE
,ko_KR
,ja_JP
andzh_CN
because locales added with Localize Me implicitly support the needed behavior due to the way Localize Me works (especially after the 1.0 release when you'll be able to translate only from English). What do you think about this in general and in terms of how to implement this? Also: is it possible to add the builtin locales through Localize Me-based mods? Though I feel this shouldn't be a problem in this case.