Project

General

Profile

Feedback #14314

Request a lowercase-"the" version of CelestialBody.displayName

Added by HebaruSan 12 days ago. Updated 6 days ago.

Status:
New
Priority:
Low
Assignee:
Category:
Spelling/Grammar
Target version:
-
Version:
Platform:
Linux

Description

Previously, we had CelestialBody.theName, which would say "the Mun" and "the Sun" for those bodies, and just the name for everything else. This was nice for inserting into the middle or ends of sentences, as in "launch to the Mun." If we needed to use it at the beginning of a sentence, we could use CultureInfo.InstalledUICulture.TextInfo.ToTitleCase to capitalize appropriately.

Now we have CelestialBody.displayName, which has "The Mun" and "The Sun," which is good for beginnings of sentences, but looks weird elsewhere: "launch to The Mun." Unlike capitalization, lowercasing cannot be done safely in third party code, as we don't have a (good) programmatic way to tell whether we're lowercasing the first letter of "The Mun" or "Minmus".

Suggestions:
  1. Make CelestialBody.displayName use a lowercase "the" itself; or
  2. Add a new property containing the lowercase "the" display name; or
  3. Add a parameter to GetDisplayName indicating capital or lowercase

History

#1 Updated by JPLRepo 11 days ago

  • Assignee set to JPLRepo

This is not actually needed per-se and why it was removed from the stock code.
Use of the lingoona Language modules can achieve exactly what you require.
Once we get everything bedded down and the Modders notes come out, I'll include information about how to use the lingoona calls and stock methods to achieve this that are availabe in the API.

#2 Updated by HebaruSan 6 days ago

Looks like the Lingoona way to do this involves using special format strings. For "the Mun" we would need a format string of "<<A:1>>", and "The Mun" would be "<<CA:1>>". Capital A indicates to use a definite article, and lowercase a indicates indefinite, and C capitalizes the article.

However, currently the articles are embedded in the strings themselves in planets.cfg. I think that would need to change to fix this and the related issue http://bugs.kerbalspaceprogram.com/issues/14367 .

#autoLOC_910035 = The Mun^N
#autoLOC_910053 = The Sun^N

Presumably there is a caret-suffix character that can indicate whether an article is needed, maybe something to do with marking proper nouns? I have not been able to determine this, however, since the only Lingoona documentation I have to go by is the grammar module demo form on their web site.

Also available in: Atom PDF