Skip to content

Commit 34b308d

Browse files
committed
New mod
0 parents  commit 34b308d

35 files changed

+3016
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.ckan linguist-language=JSON linguist-detectable=true

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug
3+
about: For typical problems and glitches
4+
assignees: HebaruSan
5+
---
6+
7+
## Background
8+
9+
PlanningNode version:
10+
11+
12+
KSP version:
13+
14+
15+
Operating system:
16+
17+
18+
Planet packs installed:
19+
20+
21+
Save file:
22+
<!-- Create a ZIP, then click "attach files" in the bottom of the editing box -->
23+
24+
25+
## Problem
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Validate AVC .version files
2+
on:
3+
push:
4+
pull_request:
5+
types:
6+
- reopened
7+
- synchronize
8+
- reopened
9+
10+
jobs:
11+
validate_version_files:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 1
18+
- name: Validate files
19+
uses: DasSkelett/AVC-VersionFileValidator@master

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build release
2+
on:
3+
release:
4+
types:
5+
- created
6+
7+
jobs:
8+
Release:
9+
runs-on: ubuntu-latest
10+
container:
11+
image: mono:latest
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v2
15+
16+
- name: Decrypt/unpack dependencies and build
17+
env:
18+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
19+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
20+
AWS_REGION: us-east-2
21+
AWS_DEFAULT_REGION: us-east-2
22+
23+
run: |
24+
apt-get update
25+
apt-get install -y jq gpg awscli make
26+
KSP_VERSION=$(jq -rM '"\(.KSP_VERSION_MIN.MAJOR).\(.KSP_VERSION_MIN.MINOR)"' GameData/PlanningNode/PlanningNode.version)
27+
aws s3 cp s3://hebarusan/KSP_Data-${KSP_VERSION}.tar.gz.gpg - | gpg --batch --no-tty --yes --passphrase ${{ secrets.GPG_KEY }} -d | tar xzf - -C Source
28+
make
29+
30+
- name: Upload to GitHub
31+
uses: actions/upload-release-asset@main
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
upload_url: ${{ github.event.release.upload_url }}
36+
asset_path: ./PlanningNode.zip
37+
asset_name: PlanningNode.zip
38+
asset_content_type: application/zip

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Source/KSP_Data
2+
obj/
3+
*.dll
4+
*.xml
5+
*.zip
6+
*.gpg
1.51 KB
Loading

GameData/PlanningNode/LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Translating to your language
2+
3+
![Languages supported by KSP 1.3: English, Spanish, Chinese, Russian, Japanese](https://i.imgur.com/DbCCJWK.png)
4+
5+
The 1.3 release of KSP introduces localization, which allows in-game text to be translated to other languages. This allows more people to enjoy the game in their preferred language and enlarges the community. However, it does not happen automatically for mods; by default, a mod will appear in English regardless of the language of the base game. In order to have both the base game and mods available in the same non-English languages, some additional work must be done by the modder.
6+
7+
Unfortunately, I only speak English, and I maintain this mod for free. This means I cannot create my own translations, and I cannot pay a professional translation service to produce high quality translations. The best I can do on my own is to use Google Translate, which is of dubious value for the terse, idiomatic strings needed in a KSP mod's UI. Instead, I must rely on the expertise of you, the multilingual KSP mod user, to tell me what good translations look like for your language. If you would like to help in this effort, please keep reading to learn how the mod's language files are structured and how to submit translations for use by others.
8+
9+
Note: Even though you will appear to be editing the project's files, don't worry about making mistakes. Github will keep your changes separate from the main files until I have verified that they are OK to use. It is even possible for me to ask questions or request changes before your work is committed to the main files.
10+
11+
## Creating or editing a translation
12+
13+
It is recommended to make your changes on your own computer at first so you can test them before uploading, especially if you are creating a new translation from scratch.
14+
15+
1. Install the [current release](https://github.com/HebaruSan/PlanningNode/releases/latest) if you have not already
16+
2. Open your `Kerbal Space Program/GameData/PlanningNode/Localization` folder on your local disk
17+
3. Look for a file called *lang*.cfg, where *lang* is KSP's name for your locale; as of KSP 1.3, this includes:
18+
- en-us (English)
19+
- es-es (Spanish)
20+
- ja (Japanese)
21+
- ru (Russian)
22+
- zh-cn (Chinese)
23+
24+
The remaining steps are different depending on whether the file already exists:
25+
26+
### If the file exists
27+
28+
Follow these steps to make improvements to an existing translation:
29+
30+
4. Edit the file for your language in your favorite text editor
31+
5. Make the changes you wish to see in-game (see the [File format section](#file-format) below for details)
32+
6. Save your changes
33+
7. Remember to [test your changes](#testing)!
34+
35+
### If the file does not exist
36+
37+
Follow these steps to start your own translation from scratch:
38+
39+
4. Make a copy of `en-us.cfg` in the `lang` folder
40+
5. Rename the file according to the list of languages above
41+
6. Edit the file for your language in your favorite text editor
42+
7. Change the third line from `en-us` to the string for your language
43+
8. Translate each string from English to your language (see the [File format section](#file-format) below for details)
44+
9. Save your changes
45+
10. Remember to [test your changes](#testing)!
46+
47+
### File format
48+
49+
The middle part of the `cfg` file contains the strings to translate. The format is `name = translation`, where the name is a special string defined by the mod. For example:
50+
51+
PlanningNode_mainTitle = Planning Node
52+
53+
Do **not** change the part to the left of the equals sign ("=")! These names must be the same in every language file.
54+
55+
The part to the right of the equals sign is the string to be used in-game. Most of the text will be shown as-is, but it can contain a few special strings as shown in the [Lingoona grammar module demo](http://lingoona.com/cgi-bin/grammar#l=en&oh=1):
56+
57+
| String | Purpose |
58+
| --- | --- |
59+
| `\n` | Line break; try to preserve these based on the original strings to make sure the strings will fit |
60+
| `<<1>>` | The first substitutable token in the string, will be replaced by a number, name of a planet, etc., depending on the string |
61+
| `<<2>>` | Second token, and so on |
62+
| `<<A:1>>` | The first token, but substituted with a proper article |
63+
64+
### Testing
65+
66+
It's important to make sure that your changes work correctly. If you use Steam:
67+
68+
1. [Select the language to use in Steam](https://www.youtube.com/watch?v=iBwYCvQxfeI)
69+
2. Wait for the language pack download to complete
70+
3. Run KSP
71+
4. Use Planning Node and make sure your changes appear as you intended
72+
73+
If you do not use Steam, I don't know the steps to choose a language. Contact SQUAD if you can't figure it out.
74+
75+
## Contributing your translation for others to use
76+
77+
After you have prepared a `cfg` file for your language and confirmed that it works as you intend, if you are willing to contribute it for redistribution under the GLPv3 license, follow these steps to upload it for inclusion in the main mod distribution:
78+
79+
1. Log in to [Github](https://github.com); you may need to register an account if you do not already have one
80+
2. Navigate to the [Localization folder](https://github.com/HebaruSan/PlanningNode/tree/master/GameData/PlanningNode/Localization)
81+
3. Look for the file you edited
82+
83+
The remaining steps are different depending on whether the file already exists:
84+
85+
### If the file exists
86+
87+
4. Click the file's name to view it
88+
5. Click the [pencil icon](https://help.github.com/assets/images/help/repository/edit-file-edit-button.png) to edit
89+
6. Replace the text with the pasted contents of the file you edited locally
90+
7. **Important**: At the bottom of the page, under Propose file change, type an English description of the changes you have made and the reason you think they should be made. This will help me to confirm that your changes are appropriate. Remember, I do not speak the language in the `cfg` file, so I need you to tell me why your way is better!
91+
6. Click `Propose file change` at the bottom when done
92+
93+
### If the file does not exist
94+
95+
4. Click [Create new file](https://help.github.com/assets/images/help/repository/create_new_file.png) to create it
96+
5. Enter the correct file name in the box at the top
97+
6. Paste the contents of the file you edited locally into the big box in the middle
98+
8. Click `Propose new file` at the bottom when done
99+
100+
### Review
101+
102+
Once you finish your changes, Github will send me a notification that a pull request has been submitted. I will take a look at it within a day or two and attempt to verify that the changes make sense by:
103+
104+
- Confirming that the file name and the third line of the file match one of the supported locale names
105+
- Viewing each changed string in-game
106+
- Checking Google Translate
107+
- Asking individual human experts
108+
- Requesting help on the KSP forum
109+
110+
If I have any questions about specific changes you've made, I will add them to the pull request, which should trigger a notification to you. Please try to respond to these in as timely a manner as you can manage. Your pull request may be closed without merging if you do not reply for a long time.
111+
112+
Once all the questions and comments are resolved to my satisfaction, your changes will be merged into the main files and included in the next release. I will also add your Github name to the Acknowledgements section of the README file.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Localization
2+
{
3+
en-us
4+
{
5+
PlanningNode_mainTitle = Planning Node
6+
PlanningNode_mainTooltip = Plan maneuver nodes from your parent body
7+
PlanningNode_viewOnlyTooltip = Switch to a vessel to create planning nodes
8+
9+
PlanningNode_editorTitle = Planning Node v<<1>>.<<2>>.<<3>>
10+
11+
PlanningNode_defaultNodeName = New planning node
12+
13+
PlanningNode_markerCaption = <b><<1>></b>\nExcess V: <<2>>m/s\nT - <<3>>
14+
15+
PlanningNode_negativeLength = (<<1>>)
16+
PlanningNode_yearsLength = <<1>>y <<2>>d <<3>>h <<4>>m <<5>>s
17+
PlanningNode_daysLength = <<1>>d <<2>>h <<3>>m <<4>>s
18+
PlanningNode_hoursLength = <<1>>h <<2>>m <<3>>s
19+
PlanningNode_minutesLength = <<1>>m <<2>>s
20+
PlanningNode_secondsLength = <<1>>s
21+
22+
PlanningNode_DeleteButtonCaption = Delete
23+
PlanningNode_DeleteButtonTooltip = Delete this planning node
24+
PlanningNode_CloseButtonCaption = Close
25+
PlanningNode_CloseButtonTooltip = Done editing planning nodes
26+
PlanningNode_NewButtonCaption = New
27+
PlanningNode_NewButtonTooltip = Create a new planning node
28+
PlanningNode_NameLabelCaption = Name:
29+
PlanningNode_PrevNodeCaption = <
30+
PlanningNode_PrevNodeTooltip = Edit the previous planning node
31+
PlanningNode_PrevNodeViewOnlyTooltip = View the previous planning node
32+
PlanningNode_NextNodeCaption = >
33+
PlanningNode_NextNodeTooltip = Edit the next planning node
34+
PlanningNode_NextNodeViewOnlyTooltip = View the next planning node
35+
PlanningNode_BodyLabelCaption = Body:
36+
PlanningNode_PrevBodyCaption = <
37+
PlanningNode_PrevBodyTooltip = Switch to the previous celestial body
38+
PlanningNode_NextBodyCaption = >
39+
PlanningNode_NextBodyTooltip = Switch to the next celestial body
40+
PlanningNode_ShowForAllCheckboxCaption = Show for all vessels
41+
PlanningNode_ShowForAllCheckboxTooltip = If checked, display this node for all vessels, otherwise only for the current vessel
42+
43+
PlanningNode_loadingTip1 = Rejecting your reality and substituting my own...
44+
PlanningNode_loadingTip2 = Striking that, reversing it...
45+
PlanningNode_loadingTip3 = Beautifying thing to joy-forever level...
46+
}
47+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
KERBALCHANGELOG
2+
{
3+
modName = PlanningNode
4+
author = HebaruSan
5+
license = GPL-3.0
6+
website = github.com/HebaruSan/PlanningNode
7+
showChangelog = True
8+
VERSION
9+
{
10+
version = 0.1.0
11+
versionName = Ruthless Revision by Nature or Fate
12+
versionKSP = 1.11
13+
}
14+
}

0 commit comments

Comments
 (0)