Nils277 Posted June 6, 2017 Share Posted June 6, 2017 (edited) The localization of Kerbal Planetary Base System has been updated, it now supports spanish Kerbal Planetary Base System - [Spanish] Kerbal Planetary Base System - 5916 Words - Needs Chinese, Japanese, Russian Edited June 6, 2017 by Nils277 Quote Link to comment Share on other sites More sharing options...
KerbOrbiter Posted June 6, 2017 Share Posted June 6, 2017 (edited) Made a RU localization of Science Relay and JSI Adv Trans Pods. May need some corrections. UPD: Made some tweaks to the RU localization of AirlockPlus. Btw, we shouldn't translate the names of the mods IMO. Edited June 6, 2017 by KerbOrbiter Quote Link to comment Share on other sites More sharing options...
Alshain Posted June 7, 2017 Share Posted June 7, 2017 @cakepie Thanks, I think I chose the right one then. I used 244332 for Requires: Electric Charge. Quote Link to comment Share on other sites More sharing options...
Nils277 Posted June 7, 2017 Share Posted June 7, 2017 I don't know if it belongs here, but i created a small plugin to allow mods to automatically switch the files for KSPedia entries and textures, which should make it easier for mod creators and users to provide and use localized versions of KSPedia and other static files: Quote Link to comment Share on other sites More sharing options...
gomker Posted June 8, 2017 Share Posted June 8, 2017 Hey guys, been searching around and not finding much information, this is a unique challenge. For mods that have to support 1000+ parts is there a way to create a Localization.cfg from existing parts? I would think that SQUAD did not write out the "en-us" file line by line manually? Quote Link to comment Share on other sites More sharing options...
Nils277 Posted June 8, 2017 Share Posted June 8, 2017 1 hour ago, gomker said: Hey guys, been searching around and not finding much information, this is a unique challenge. For mods that have to support 1000+ parts is there a way to create a Localization.cfg from existing parts? I would think that SQUAD did not write out the "en-us" file line by line manually? No, Squad already mentioned that they used a tool to automatically extract the strings out of the part configs. It is indeed possible to write a parser which extrancts the strings and creates the tags in the Localization.cfg and the part configs. For 1000+ parts writing a parser migh be worth the work. Quote Link to comment Share on other sites More sharing options...
gomker Posted June 8, 2017 Share Posted June 8, 2017 Just now, Nils277 said: Squad already mentioned that they used a tool to automatically extract the strings That would be a great tool to redistribute to help with localization, you know of any topic that this was being discussed? I would like to ping a dev to see if its possible to get that source code. Quote Link to comment Share on other sites More sharing options...
cakepie Posted June 8, 2017 Share Posted June 8, 2017 (edited) 3 hours ago, gomker said: Hey guys, been searching around and not finding much information, this is a unique challenge. For mods that have to support 1000+ parts is there a way to create a Localization.cfg from existing parts? I would think that SQUAD did not write out the "en-us" file line by line manually? I've had some success generating the dictionary file by: Pull the key = value pairs of interest out of cfg files using regexes. I use notepad++, but grep should work as well. It's a good idea to extract the part name as well, so you can generate locIDs from it. Plonk into a spreadsheet (column A). Using spreadsheet formulae, split into key (col B) and value (col D). Generate localization IDs (colC) -- I like #LOC_modname_partname_key and #LOC_modname_partname_partmodule_key Copying cols C+D to a text file gives the meat of dictionary file. Cols B+C gives the mappings that need to go back into the part cfgs <-- I don't have a clever solution for this, though. Edited June 8, 2017 by cakepie Quote Link to comment Share on other sites More sharing options...
Nils277 Posted June 8, 2017 Share Posted June 8, 2017 (edited) 8 minutes ago, gomker said: That would be a great tool to redistribute to help with localization, you know of any topic that this was being discussed? I would like to ping a dev to see if its possible to get that source code. Unfortunately not. I think it was mentioned several times in the KSPWeekly or even in this Thread here and the names of the tags in the language files (e.g. #autoLOC_244332) strongly indicate that. I suspect that most modders won't write a parser though because the writing will most probably take more time than extracting the strings by hand. Edited June 8, 2017 by Nils277 Quote Link to comment Share on other sites More sharing options...
gomker Posted June 8, 2017 Share Posted June 8, 2017 4 minutes ago, Nils277 said: won't write a parser though because the writing will most probably take more time than extracting the strings by hand Ugggh - Yeah, We are gonna need a parser, 1000 + parts is going to take forever @JPLRepo Is there any way to help us out here? Quote Link to comment Share on other sites More sharing options...
TiktaalikDreaming Posted June 8, 2017 Share Posted June 8, 2017 Start with a basic grep for data extraction; egrep -R "(title|description|ActionName) = " * >MyModLocalizationStuff.txt (in your mod's folder) There may* be fields I didn't think of that need localization. * will be Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted June 8, 2017 Share Posted June 8, 2017 2 hours ago, gomker said: Ugggh - Yeah, We are gonna need a parser, 1000 + parts is going to take forever @JPLRepo Is there any way to help us out here? Yep. We are working on something. @TriggerAu EDIT: Actually we are working on something for code changes. Not cfg (part) cfg changes. But a Grep would get the job done pretty easily. Quote Link to comment Share on other sites More sharing options...
TriggerAu Posted June 8, 2017 Share Posted June 8, 2017 6 minutes ago, JPLRepo said: Yep. We are working on something. @TriggerAu EDIT: Actually we are working on something for code changes. Not cfg (part) cfg changes. But a Grep would get the job done pretty easily. I been working on something for my mods to help out in VS, but it might be able to translate to cfg files easily, let me have a ponder on it in my modding time (I have Work time, Squad time and Modding time - my wife tells me theres this thing called Family time, but I disagree :P) Back on topic though I did do some code to parse files and tags before I went all VS, whats your OS/environment @gomker Quote Link to comment Share on other sites More sharing options...
IgorZ Posted June 8, 2017 Share Posted June 8, 2017 Guys, does anybody know a good link to the Lingoona docs? Either I'm doing the search completely wrong, or they have hided it very well. Btw, since now the localization templates are in that format, it makes sense to add a link into this topic OP. Quote Link to comment Share on other sites More sharing options...
TriggerAu Posted June 8, 2017 Share Posted June 8, 2017 2 minutes ago, IgorZ said: Guys, does anybody know a good link to the Lingoona docs? Either I'm doing the search completely wrong, or they have hided it very well. Btw, since now the localization templates are in that format, it makes sense to add a link into this topic OP. http://lingoona.com/cgi-bin/grammar#l=en&oh=1 is my go to page the showhelp checkbox shows you all the params Quote Link to comment Share on other sites More sharing options...
IgorZ Posted June 8, 2017 Share Posted June 8, 2017 (edited) 2 minutes ago, TriggerAu said: http://lingoona.com/cgi-bin/grammar#l=en&oh=1 is my go to page the showhelp checkbox shows you all the params Thanks! I was using just http://grammar.lingoona.com, and it shows the same page but without the help. Edited June 8, 2017 by IgorZ Quote Link to comment Share on other sites More sharing options...
TiktaalikDreaming Posted June 8, 2017 Share Posted June 8, 2017 12 minutes ago, JPLRepo said: Yep. We are working on something. @TriggerAu EDIT: Actually we are working on something for code changes. Not cfg (part) cfg changes. But a Grep would get the job done pretty easily. I was going to do a Grep sed awk sort uniq to find all the squad autoloc fields, and post up an improved Grep and findstr line, once I got home. Just remembered I killed my pc. So it may take longer than expected. Quote Link to comment Share on other sites More sharing options...
Nils277 Posted June 8, 2017 Share Posted June 8, 2017 The localization of Feline Utility Rovers has been updated, it now supports spanish. Feline Utility Rovers - [Spanish] Feline Utility Rovers - 1968 Words - Needs Chinese, Japanese, Russian Quote Link to comment Share on other sites More sharing options...
gomker Posted June 8, 2017 Share Posted June 8, 2017 5 hours ago, TriggerAu said: VS, whats your OS/environment I run Windows - but I am comfortable with Cygwin/Python etc... Quote Link to comment Share on other sites More sharing options...
micha Posted June 8, 2017 Share Posted June 8, 2017 Question on localisation: how would people expect part / experiment names which are in the "real world" to be localised? For example, NASA's ISS Combustion Integrated Rack (FIR) with the Cool Flame Experiment (CFE) I've tried (and failed) to find "official" translations, so invented my own in german: Integriertes Verbrennungsrack (IVR) mit dem Kühle-Flammen Experiment (KFE). Or should the experiment names and abbreviations remain "international" (ie, in english), with only descriptions, results, and other text localised? The latter would aid any international discussions around the experiments and for bug reports etc. Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted June 8, 2017 Share Posted June 8, 2017 This may be an odd question, but is there a way I could set my Steam install to download and keep all locales, so I don't have to re-download them when I switch? I've been making fixes and testing things in English, Spanish, and Chinese today, and I'd like to make that process a bit smoother. (Yes, I realize I could make separate copies, or cheat by swapping Chinese strings into my English resources, but I'd like to stay closer to a typical install.) Quote Link to comment Share on other sites More sharing options...
TiktaalikDreaming Posted June 8, 2017 Share Posted June 8, 2017 35 minutes ago, HebaruSan said: This may be an odd question, but is there a way I could set my Steam install to download and keep all locales, so I don't have to re-download them when I switch? I've been making fixes and testing things in English, Spanish, and Chinese today, and I'd like to make that process a bit smoother. (Yes, I realize I could make separate copies, or cheat by swapping Chinese strings into my English resources, but I'd like to stay closer to a typical install.) I have a suspicion the answer is "make copies, Steam won't let you". But I'm very interested in the answer if it's not. Quote Link to comment Share on other sites More sharing options...
DMagic Posted June 8, 2017 Author Share Posted June 8, 2017 @HebaruSan For the static files I don't think there is anything you can do, KSP won't like loading multiple files with the same name. You would just have to copy them outside of the KSP folder. For the text strings you could just download each of them and then change the name of the dictionary.cfg file for each language. KSP will load all of them regardless of what the file is called and it will use whichever language set is defined in your BuildID file. Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted June 8, 2017 Share Posted June 8, 2017 58 minutes ago, DMagic said: For the text strings you could just download each of them and then change the name of the dictionary.cfg file for each language. KSP will load all of them regardless of what the file is called and it will use whichever language set is defined in your BuildID file. Perfect! Somehow in the transition from the many cfg files of the pre-release to the single dictionary.cfg of 1.3.0, I became convinced that these strings now lived in the (presumably Unity-produced, obfuscated) .asset or .resource files in KSP_Data. After a few more downloads, this will allow me to do exactly what I was hoping. Thanks! Quote Link to comment Share on other sites More sharing options...
TiktaalikDreaming Posted June 10, 2017 Share Posted June 10, 2017 I've only looked at the joys of part configs so far, but a quick grep to grab this would be; grep -EHR --include=*.cfg "(GUIName|ActionName|ConverterName|description|eventOffName|eventOnName|manufacturer|menuName|MeshMenuName|Mode|moduleType|NodeMenuName|outputName|DisplayName|stagingDisableText|stagingEnableText|tags|title|toggleName|TooltipPrimaryField|TooltipTitle) \= " * >myModsLocalization.txt The equivalent findstr would be using findstr /RSP, but it doesn't actually use regex beyond the limited set of capabilities, so it doesn't work. You'd need to do a findstr per OR(|) term above, while leaving out the spaces and equals. Several of those terms are partials, which is why there's no "start of word boundary" marking or anything like that. DisplayName and ActionName in particular are always appended to something else. Which means there'll be the occasional non-translating value like resourceFlowMode. If you were very enthusiastic you could pipe those out with a grep -vRE "(resourceFlowMode|anything else you find)". But I suspect at thats stage you'd be spending more time messing around getting the grep right than you would just excluding these when you get to them. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.