midspace / midspace/Space-Engineers-Admin-script-mod

Localization

Open
#28 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
43
Forks
12
PR merge metrics
No merged PRs in 30d

Description

KeenSWH made significant changes to their Localization, removing the localization assemblies, and moving to using Resource files here:
steamapps\common\SpaceEngineers\Content\Data\Localization
I think this is paving the way to allow mods to have their own localized text resources.

I had a quick look at the localization, and tested a custom localization with Blueprints.sbc in a mod, and it doesn't work currently.
Hopefully some time soon it will be enabled.

There is a brief example of how I've used their Localization resources with an Extension here:
https://github.com/midspace/Space-Engineers-Admin-script-mod/blob/master/midspace%20admin%20helper/Data/Scripts/midspace.adminscripts/CommandSaveGame.cs

When the resources are enabled for use inside Mods, this will open the path to Localizing our mod.
In the mean time, we should make sure we are using string.Format() instead of concatenating strings.

We also need to look at modifying the Commands use of Regex, to embed custom command names into the Regex.
Regex.Escape() will make sure we don't embed anything silly into the command as a expression instead of a string.

There is currently no method for programmatically determining the Culture.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the referenced CommandSaveGame.cs example and inspect the Commands code mentioned in the issue. Determine which localization, string formatting, Regex command-name, and culture-detection requirements are still applicable. Done would require an agreed scope and working localized mod resources without unsafe command-pattern interpolation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.