Recommended Posts

Posted (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 by KerbOrbiter

Share this post


Link to post
Share on other sites

@cakepie Thanks, I think I chose the right one then.  I used 244332 for Requires: Electric Charge.

Share this post


Link to post
Share on other sites

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:

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Posted (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 by cakepie

Share this post


Link to post
Share on other sites
Posted (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 by Nils277

Share this post


Link to post
Share on other sites
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? :)

 

Share this post


Link to post
Share on other sites

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 :D

 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
5 hours ago, TriggerAu said:

VS, whats your OS/environment

I run  Windows - but I am  comfortable with Cygwin/Python etc... 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

@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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now