Closed kovakthemost closed 3 years ago
Hi and thanks for the PR! Unfortunately we won't be able to merge this yet. A few notes on why:
This mod hasn't been localized in general yet. The way that localization works in KSP is that fields which require localization should be replaced with placeholders and then you create a localization file for each language that maps the placeholders to the real text. So for example, a part config would look something like this:
PART
{
name = Malemute_ExpandingDockingPort
title = #LOC_USI_Malemute_ExpandingDockingPort_Title
description = #LOC_USI_Malemute_ExpandingDockingPort_Description
...
}
Then the localization file would look something like this:
Localization
{
ru
{
#LOC_USI_Malemute_ExpandingDockingPort_Title = Выдвигающийся стыковочный порт
#LOC_USI_Malemute_ExpandingDockingPort_Description = Док-порт с расширяющейся стыковочной манжетой. Предназначен для облегчения стыковки бок о бок.
...
}
}
The folder structure should look something like this then:
FOR_RELEASE/GameData/UmbraSpaceIndustries/Malemute
│
├─ Localization
│ ├─ en-us.cfg
│ └─ ru.cfg
│
└─ Parts
├─ ExpandingDockingPort.cfg
└─ ...
So in order for us to accept a PR for localization, the following needs to happen:
Hi and thanks for the PR! Unfortunately we won't be able to merge this yet. A few notes on why:
This mod hasn't been localized in general yet. The way that localization works in KSP is that fields which require localization should be replaced with placeholders and then you create a localization file for each language that maps the placeholders to the real text. So for example, a part config would look something like this:
PART { name = Malemute_ExpandingDockingPort title = #LOC_USI_Malemute_ExpandingDockingPort_Title description = #LOC_USI_Malemute_ExpandingDockingPort_Description ... }
Then the localization file would look something like this:
Localization { ru { #LOC_USI_Malemute_ExpandingDockingPort_Title = Выдвигающийся стыковочный порт #LOC_USI_Malemute_ExpandingDockingPort_Description = Док-порт с расширяющейся стыковочной манжетой. Предназначен для облегчения стыковки бок о бок. ... } }
The folder structure should look something like this then:
FOR_RELEASE/GameData/UmbraSpaceIndustries/Malemute │ ├─ Localization │ ├─ en-us.cfg │ └─ ru.cfg │ └─ Parts ├─ ExpandingDockingPort.cfg └─ ...
So in order for us to accept a PR for localization, the following needs to happen:
The existing part configs need to be updated to support localization
- There should only be 1 config per part, so you'll need to remove all the duplicate part config files you created
- A localization file needs to be created for English, with all the existing part titles and descriptions added to it
- A localization file needs to be created for Russian, with all the part titles and descriptions you translated
Oh, it sounds complicated, I'm far from all these programmable things, but I understand more or less what's what, thank you :)
It sounds more complicated than it is and you're part of the way there already. It wouldn't take much to get the work you've already done in the correct format. You can use WOLF as an example for how to setup the localization files:
I'll be happy to continue offering guidance if you want to keep working on this and get your PR to a place where we can accept it.
It sounds more complicated than it is and you're part of the way there already. It wouldn't take much to get the work you've already done in the correct format. You can use WOLF as an example for how to setup the localization files:
I'll be happy to continue offering guidance if you want to keep working on this and get your PR to a place where we can accept it.
I will try to do this after I finish what I am currently working on. I am currently translating a large mod (Outer Planets Mod) and only ~ 20% translated in 3-4 hours. I am seriously determined to complete the work, because according to my observations, few people dare to complete the work completely. I think it will be an interesting experience 😄
I wanted to ask if I can make one common localization file for details in all languages, something like:
Localization { en-us { //Parts
//Expanding Docking Port
#LOC_USI_Malemute_ExpandingDockingPort_Title = Expanding Docking Port
#LOC_USI_Malemute_ExpandingDockingPort_Description = A docking port that includes an expanding docking collar. Designed to aid in side by side docking.
#LOC_USI_Malemute_ExpandingDockingPort_Toggle = Toggle
#LOC_USI_Malemute_ExpandingDockingPort_Extend = Extend
#LOC_USI_Malemute_ExpandingDockingPort_Retract = Retract
}
ru
{
//Детали
//Выдвигающийся стыковочный порт
#LOC_USI_Malemute_ExpandingDockingPort_Title = Выдвигающийся стыковочный порт
#LOC_USI_Malemute_ExpandingDockingPort_Description = Док-порт с расширяющейся стыковочной манжетой. Предназначен для облегчения стыковки бок о бок.
#LOC_USI_Malemute_ExpandingDockingPort_Toggle = Переключить
#LOC_USI_Malemute_ExpandingDockingPort_Extend = Выдвинуть
#LOC_USI_Malemute_ExpandingDockingPort_Retract = Убрать
}
}
These files can grow quite large, so from an organizational standpoint, I would prefer that each language have its own file. It will also make it easier to see at a glance which languages are supported by just looking at the folder structure. Lastly, it will make it easier for anyone wanting to make translations for another language to just make a copy of the en-us.cfg file, rename it for their language and replace all the English phrases with their translations.
Thanks! One more question: can I replace the standard text lines with the in-game localization? Something like this:
name = ModuleScienceContainer
reviewActionName = Review Stored Data
storeActionName = Store Experiments
evaOnlyStorage = True
storageRange = 1.3
and
name = ModuleScienceContainer
reviewActionName = #autoLOC_502201
storeActionName = #autoLOC_502202
evaOnlyStorage = True
storageRange = 1.3
Yep! That would be great!
And a question about the translation of the phrase in the description of the Malemute Cab: The main cabin of the Malemute Rover. Seats two comfortably, eight track not included. What is "eight track"?
Ah, so I understood everything correctly initially, I thought it could be something else, thank you.
Side note... we have a Discord server now for USI with a "dev-talk" channel that might interest you:
Thank you, I will keep in touch there :)
Done. Check description please. :)
Nice job with the localization files! Just a few things to clean up before we can merge this:
FOR_RELEASE/GameData/UmbraSpaceIndustries/Malemute
folder instead of in the root folder of the project. That means you will need to overwrite the original part .cfg files with the ones you updated.FOR_RELEASE/
.gitignore
I don't know how to delete the files, can I just zip and upload the mod here or something?
Are you making your changes directly on the GitHub website or do you have the repo cloned locally on your computer?
Are you making your changes directly on the GitHub website or do you have the repo cloned locally on your computer?
I don't know how to delete files in the Github
The web IDE on the GitHub website is very limited and is really only meant for making quick edits to existing files or adding new files. Unfortunately, it's outside the scope of comment thread for me to explain how to clone GitHub repos to your computer, make your changes locally and then push those changes back up to GitHub.
What I can do is clone your repo myself, make the changes that are needed and then submit a PR to your repo. When you accept my PR to your repo, it should update your PR to the main repo. In the meantime, I suggest that you look at tool like GitHub Desktop (https://desktop.github.com/) if you plan to continue doing this sort of work for other mods since you will likely run into this issue frequently.
Done, I think it's all right this time. :)
Hey! Looking better. :)
One last thing... the change you made in 000_USITools for the agency description actually needs to go in a different repo (confusing, I know). USITools is a separate mod that comes bundled with the Malemute (and every other USI mod) and its repo lives here:
https://github.com/UmbraSpaceIndustries/UmbraSpaceIndustries
So you'll need to make a separate PR to that repo in order for the localization for the agency description to be propagated.
Okay Understood. So what should I do now? In the meantime, return the original file and reload it here?
It's fine to leave the file in this PR. It just also needs to be copied over to the USITools repo in order for it to actually make it into the game the next time we do a release.
That is, I just need to grab the localization file from 000_USITools and create a new pull request and upload it there?
Done. I hope.
Translated parts of the rover into Russian. I don't have much experience with this yet, so could you check the code for errors? Perhaps I could translate something wrong, but according to my observations, it seems like everything works and is displayed as it should. Encoding in UTF-8. I know that this translation cannot be implemented directly, but I hope it will help a little when localizing the mod into Russian in the future.