Jump to content

Addon Localization Home


DMagic

Recommended Posts

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
Link to comment
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:

 

Link to comment
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?

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

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

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
Link to comment
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? :)

 

Link to comment
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.

Link to comment
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

 

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
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.)

Link to comment
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.

Link to comment
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.

Link to comment
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!

Link to comment
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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...