OK - no symbol localisationI agree with everyone else so far. Please don't translate, please use internal unique symbols/identifiers.
... and the ship IDs should match the ones in the companion api, as they come from the same database.
OK - no symbol localisationI agree with everyone else so far. Please don't translate, please use internal unique symbols/identifiers.
OK - no symbol localisation
... and the ship IDs should match the ones in the companion api, as they come from the same database.
In principle I agree. However, if the Frontier client has the ID and has already localised it for us, why not just give us both. It means clients can do less work, can use the same set of localised values, etc. Win win win.As others have said, internal names are preferable because we want single unique identifiers. Localisation is more of a client-side thing.
It would be good if Frontier could provide translation data (the revision is part of the log, so it would be Easy™ to use versioned translations with the highest version ≤ the log revision). Those would just be a chunk of key/value information, e.g., a big stonking JSON-encoded hash.In principle I agree. However, if the Frontier client has the ID and has already localised it for us, why not just give us both. It means clients can do less work, can use the same set of localised values, etc. Win win win.
It would be good if Frontier could provide translation data (the revision is part of the log, so it would be Easy™ to use versioned translations with the highest version ≤ the log revision). Those would just be a chunk of key/value information, e.g., a big stonking JSON-encoded hash.
Having both would make things easier for purely local tools, but it would also add redundant and repeating information to the log.
I was, in fact, thinking in terms of a purely local tool. Why raise the bar for such a thing when we the information is there already and easy to obtain. All I see being "repeated" is the internal ID is repeated but localised in a separate property inside the same line of json. So, if the id property (including label) is 20 characters you get roughly 20 more characters.Having both would make things easier for purely local tools, but it would also add redundant and repeating information to the log.
{ "timestamp":"2016-07-22T14:14:19Z", "event":"Location", "StarSystem":"LFT 926", "StarPos":[51.031,17.688,30.219],
"Economy":"$economy_HighTech;", "Economy_French":"Haute Technologie",
"Government":"$government_PrisonColony;", "Government_French":"Colonie pénitentiaire",
"Security":"$SYSTEM_SECURITY_high;", "Security_French":"Haute sécurité",
"Faction":"Los Chupacabras" }
Oh please use static references. Or else we would never be done in trying to map different values to the real state. We had to do this with OCR for a long time. Please not again![]()
I think we can do auto-generated localised strings like this:
(word-wrapped for legibility)Code:{ "timestamp":"2016-07-22T14:14:19Z", "event":"Location", "StarSystem":"LFT 926", "StarPos":[51.031,17.688,30.219], "Economy":"$economy_HighTech;", "Economy_French":"Haute Technologie", "Government":"$government_PrisonColony;", "Government_French":"Colonie pénitentiaire", "Security":"$SYSTEM_SECURITY_high;", "Security_French":"Haute sécurité", "Faction":"Los Chupacabras" }
Startup will state current credits balance and loan.
Instead provide a separate static translation file that we could use to map in post-processing. You shouldn't put localized text in the log.
{ "timestamp":"2016-07-22T14:14:19Z", "event":"Location", "StarSystem":"LFT 926", "StarPos":[51.031,17.688,30.219],
"Economy":"$economy_HighTech;",
"Government":"$government_PrisonColony;",
"Security":"$SYSTEM_SECURITY_high;",
"Faction":"Los Chupacabras"
}
{ "timestamp":"2016-07-22T14:14:19Z", "event":"locale", "lang":"fr-FR",
"$economy_HighTech;":"Haute Technologie",
"$government_PrisonColony;":"Colonie pénitentiaire",
"$SYSTEM_SECURITY_high;":"Haute sécurité"
}
{
"timestamp":"2016-07-22T14:14:19Z",
"event":"Location",
"StarSystem":"LFT 926",
"StarPos":[51.031,17.688,30.219],
"Economy":"$economy_HighTech;",
"Government":"$government_PrisonColony;",
"Security":"$SYSTEM_SECURITY_high;",
"Faction":"Los Chupacabras",
"txn":{
"fr":{
"Economy":"Haute Technologie",
"Security":"Haute sécurité",
"Government":"Colonie pénitentiaire"
}
}
}
If you want to keep things local to the events, how about something like this:
Code:{ "timestamp":"2016-07-22T14:14:19Z", "event":"Location", "StarSystem":"LFT 926", "StarPos":[51.031,17.688,30.219], "Economy":"$economy_HighTech;", "Government":"$government_PrisonColony;", "Security":"$SYSTEM_SECURITY_high;", "Faction":"Los Chupacabras", "txn":{ "fr":{ "Economy":"Haute Technologie", "Security":"Haute sécurité", "Government":"Colonie pénitentiaire" } } }
That would make it easier to map translations to fields (no substring matches, just direct lookups).
If you want to keep things local to the events, how about something like this:
Code:{ "timestamp":"2016-07-22T14:14:19Z", "event":"Location", "StarSystem":"LFT 926", "StarPos":[51.031,17.688,30.219], "Economy":"$economy_HighTech;", "Government":"$government_PrisonColony;", "Security":"$SYSTEM_SECURITY_high;", "Faction":"Los Chupacabras", "txn":{ "fr":{ "Economy":"Haute Technologie", "Security":"Haute sécurité", "Government":"Colonie pénitentiaire" } } }
That would make it easier to map translations to fields (no substring matches, just direct lookups).
Really, the version hchalkley proposed is the simplest way to do it, both for the game writing the logs, and anyone wanting to read them. The only thing I'd see as an improvement there is changing e.g. "Economy_French" to "Economy_Localised", and then anything reading it wouldn't need to look for these values, or even know which language the player is using.
As these localised values would only be relevant for local display (the $whatever; things should be parsed/stored/uploaded instead), just showing any _Localised directly to the player should be fine. Websites wanting to display the localised text should have no problems gathering the translations with the help of users.
Really, the version hchalkley proposed is the simplest way to do it, both for the game writing the logs, and anyone wanting to read them. The only thing I'd see as an improvement there is changing e.g. "Economy_French" to "Economy_Localised", and then anything reading it wouldn't need to look for these values, or even know which language the player is using.
As these localised values would only be relevant for local display (the $whatever; things should be parsed/stored/uploaded instead), just showing any _Localised directly to the player should be fine. Websites wanting to display the localised text should have no problems gathering the translations with the help of users.
Really, the version hchalkley proposed is the simplest way to do it, both for the game writing the logs, and anyone wanting to read them. The only thing I'd see as an improvement there is changing e.g. "Economy_French" to "Economy_Localised", and then anything reading it wouldn't need to look for these values, or even know which language the player is using.
As these localised values would only be relevant for local display (the $whatever; things should be parsed/stored/uploaded instead), just showing any _Localised directly to the player should be fine. Websites wanting to display the localised text should have no problems gathering the translations with the help of users.