Make ships translatable#6103
Conversation
|
Would "of model" fix it? "of model AC..." or "of make/", "type"? |
|
Out of scope, but how about having a "a" or "an" defined in the ship.jsons, so missions could see which to use? Or I'm overthinking again? |
You would make it grammatically correct but it's not how people speak. It would still be annoying.
I think you would need to make the ships translatable somehow but I don't know if that would work in a json file. Maybe have ship terms defined in a lua file, make, synonyms, etc. and that could be easily translatable. |
|
OK, I'll try a simple "ships" json file. |
|
As it turns out the AC33 doesn't seem to show up as a target vehicle. The model seem to be guided by I have made a simple "ac33": {
"description": "",
"message": "an AC-33 Dropstar"
},
"bluenose": {
"description": "",
"message": "a Bluenose"
}, |
|
This now works but only with new games so it wouldn't be for the next release. I think maybe, especially if the AC-33 isn't even ever selected for assassination targets, that the first one-liner still has the merits of just bringing good and you can add it to the next release. The new fuller version is better in the long run and can be applied to other modules as well. |
|
"a Pumpkinseed Police" I guess this wouldn't look good in the game. The ship is a Pumpkinseed Police and has registration id {shipregid}. Maybe "a Pumpkinseed police ship" ? |
Sounds like an ugly hack that would also only be specific to English. I'm not convinced the best and simplest work-around is to re-word the context in which it is used, something along the lines of my initial suggestion, but that's just, like, my opinion. |
Unfortunately that creates a language that isn't flowing very well and that's how it's done all over the code. I've tried rephrasing stuff like that and it doesn't work as well as the real deal. On the other hand, I've poked around ways to address it and in precisely every case it runs away in complexity super fast. My wet dream right now is to just pipe the strings, at least some of them, to an external app that can fix them up on the fly with at least the most basic stuff, like a/an or genitive s or whatever is most worth it in other languages. I think this way of doing it here, by making the ships translatable, is a reasonable way of doing it. Lot's of strings but a simple to understand idea so it should be easy on the translators. It will take some consideration though. You could add more fields for the ships so some of them could have alternative names or nicknames. The AC-33 could be either AC-33 or Dropstar or both. I think it is also reasonable to merge the original one-line fix for the up coming stable bug fix. It's a small change but that string is on ever single assassination mission and it looks bad. I approve of this message. |
As I understand it, as these are new translations, the strings here would be pushed to all other languages and come out with English articles. That wouldn't be good. Is there a way to do a first push to Transifex with ships.json without articles so the translations will look the same as today and then change the strings in a later commit? |
Do all languages at the same time and with the same English translation without article or with a rough automatic translation? This is where we could use Grok right? |
No, not that I know of.
Hm? When you push they get the default English until translated. However, the cron-job that pulls the strings back to master doesn't like to run, so at the moment nothing gets back to master until I kick the machine (which we also do when releasing new version) |
Yes, but the strings are still in the English original. If we merge this, all languages will show ups with the English article. I looked at some language files and it looks like Swedish, Danish, Italian, and French, all could use their ship file with just the current name added. You don't need to be a translator to manage that. If we pushed these file pretranslated, would Transifex accept that? |
This is what I mean. Last commit sees an example of |
|
OK. Definitely not a quick fix no longer. Added strings for Search and Rescue too. The variable names are not unison for the modules. Will fix. |
|
Would like thoughts from @sturnclaw here, on if adding a translation module ship is the best solution (and if it is to be added, would the name be "ships-core" or "ships"?) (Besides, this will need further hooking up into transifex upon merge, by me) |
It's a bit like #5852. Did you have to do anything special on merge? |
|
@zonkmachine no, difference is this adds a new module, that needs some configuring on transifex side. |
|
Please be more verbose. What am I looking at here? |
Oops. It was not supposed to be a quote. |
Sorry, English is not my first language. ; ) |
I think you still need an article in there for this sentence to be complete. |
|
Rebased on master and squashed. I don't know how to deal with other languages. I can add in all of them with just the base name like in the Swedish ship name file or just leave it to the translators to solve. It may be easier to add in the files via this PR or the untranslated ship names will pop up with English articles where they should not. |
mwerle
left a comment
There was a problem hiding this comment.
Thank you for your work, but after looking at this PR I think it is only the start of translating ship names.
Firstly, it only adds translations for "singular" ship names.
Secondly it only updates the Assassination and SearchRescue missions. There are many other areas in the game which display the ship name to the user. While most of the ship names are literally just names, a few contain a descriptor as well, which needs translating.
Furthermore some of the ship names are real nouns/descriptors so it might actually make sense for different languages to provide a different name. For example "Wave"(en) -> "Welle"(de).
| ---@field id string | ||
| ---@field path string | ||
| ---@field name string | ||
| ---@field i18n_key string |
There was a problem hiding this comment.
Does this belong to notion too?
Edit: it doesn't look like it...
4a06eb7 to
c894d31
Compare
|
Added translatable ship names in the Views.
|
82d6326 to
fee221a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
I've added translated ship names to the comms/info views now. What other places needs fixing?
I think I will only do 'singular' in this round. If it's needed we can add this later. Are ship models used in plural anywhere in the game apart from maybe the lore? @sturnclaw I kept the esoteric stuff separate (77bf4de). Esoteric meaning C++. The meaty stuff, (lua) I think I have some kind of grasp on but src/lua/stuff, not so much. I'll let this one rest now, no more force pushes. |
|
Original post updated and now contains a todo list. |
d2abdd0 to
ec3cdf9
Compare
2b731d4 to
e27f70f
Compare
|
Squashed to 1 commit. There are still two todo's that I don't think I can fix. It may not be necessary for a merge however. If you change the name of a ship in translation and not just adjust it grammatically, then the ship name will show the original name in the New Game Window and in game when you select a ship and look at it's name under 'info' in the System Map. It could be two easy fixes but I didn't manage to wrap my mind around it. Other than those two fixes this is ready for a review/play test. |
e27f70f to
443e263
Compare
|
Rebased on master and commit message improved |
|
Fixed ship translations in New Game window. |
|
The last instances I can find that needs ship names translated are these: pioneer/data/pigui/modules/system-view-ui.lua Line 428 in 5a7eb6a pioneer/data/pigui/modules/system-view-ui.lua Line 445 in 5a7eb6a They use GetShipType() which handles back the 'name' and not the modelName. I'm not sure what's the best way to approach this. |
|
b53c44a to
9de2fb3
Compare
There was a problem hiding this comment.
@sturnclaw I kept the esoteric stuff separate (77bf4de). Esoteric meaning C++. The meaty stuff, (lua) I think I have some kind of grasp on but src/lua/stuff, not so much. I'll let this one rest now, no more force pushes.
Looks good to me, adding a single field to LuaShipDef is very straightforward and doesn't need much rocket surgery.
I like what I'm seeing here, though I don't see any (current) consumers of the SHIP_DEF form? On the whole, this PR rectifies a long-running deficiency in the localization capability of the game, and you get two big thumbs up for improving that!
* Extend ship with i18n token 'SHIP'
* Add ships for translation in separate file '/data/lang/ships'
* Add support for simplified grammar through tokens
SHIP - Base form, same as ship translation token
SHIP_DEF - Deninitive form 'the ship'
SHIP_INDEF - Indefinite form 'a ship'
9de2fb3 to
97efa60
Compare
I thought it was in use actually. I do remember having a case of 'the kanara' in there but it must have been dropped along the way. Yes. I think I had a problem with it because I wanted it in the beginning of a sentence but ended rewriting it because of the problem with changing case, which now also is fixed. |
It's not as easy to work into a text as the indefinite form. The usual use case would be more easily solved by using the more general 'the ship'. It doesn't hurt to keep and maybe it would make more sense in some other language. I almost expect there to be a ship name in there like in: "{SHIP_DEF} the Black Pearl ... " or "{SHIP_DEF} Boaty McBoatface MCXXIV". |

Improve text by making the ship names translatable.
Example of use: In the Assassination module the answer to chat question "Where do I find {target}" is always the same and the ending looks a bit off as the string doesn't cater for the ship model, a/an.
The ship is Wave and has registration ID QA-7856.
The example above has been temporarily improved by adding article 'a' as by chance it fits in with all ship models except AC-33, which by chance isn't used in the Assassination module.
The ship is a Wave and has registration ID QA-7856.
But this is now permanently solved by adding translations of the ship names into a separate 'data/lang/ships' directory which allows a limited grammatical subset of ship names.
A key in the ship models, i18n_key is added, which contains the upper case ship identifier that pairs with the form suffix needed. CORONATRIX .. "_INDEF" = 'a Coronatrix'
The forms available are:
The base form with no article (_BASE): "Model: Natrix"
The indefinite form, a/an (_INDEF): "an AC-33"/"a Dropstar"
The definite form, the (_DEF):"The Bluenose is severely damaged and currently in orbit around Titan.".
Please note that this is intended to be a small language tool and not a complete translation tool.
Code example:
TODO:
Related. Ship descriptions, translatable: #1693