-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some Localization Requests (Translateable Jump Nodes and Wing names, Fix Script Implementation remaining) #1730
Comments
And what about Malay and Chinese languages? |
And what about them? He's not working on those obviously, just German. |
Well, what is about them? There is a Japanese Translation Patch for FreeSpace 2 thanks to the Unicode support... so i think that you are able to do a Malay and Chinese Translation already. What i am requesting here, is not specific only for the german language... except point 1 which is only present for specific languages (german, french and polish iirc). In Malay and Chinese you would not even have this problem. |
Yeah. But where's the support for Malay and Chinese anyways? |
The Unicode changes should be able to support those languages. This issue has nothing to do with that so please stop asking unrelated questions here. |
For item number 5, the feature should already do what you want. The "command sender" option specifies what is displayed when the "command persona" messages (e.g. "Incoming jump signature! Hostile configuration!") are sent. So, if you set the "command sender" to XSTR("#Command", 7823457) and you have an appropriate tstrings.tbl, then it should automatically change to #Kommandatur or whatever you have. However this does not apply to senders which are manually supplied using the send-message ship. So using
will still show the message coming from #Command. You may be able to edit the mission using Notepad++ and manually add an XSTR, but I have not tested this. |
Yes, the $command sender can be translated on this way and this is working (maybe i described that too unclear, but i already use this method). But this is not applied to the #Command as message source and in my experience you will likely break SEXPs if you try to add XSTRs into them, because SEXPs are very strict in this cases. Here this would likely cause into a crash of FRED2 due to a wrong used send-message-SEXP. And if not i think an error message about a missing object in the mission with the name XSTR("#Command", 12345), which would already create problems, because of the quotation marks in the middle of it, are more likely. |
(1): Do I understand you correctly that the code already supports XSTRs for the briefing labels? I would guess that that is the case in which case it would be pretty dumb to try translating it again. The old translation code could be disabled if unicode mode is active. Since most translation mods will probably use that this would be a good way for preserving backwards compatibility. (2): I don't really understand what you are requesting here. Do you want translatable wing names? (3): The code could be changed to always use the (4): I found the issue and fixed it already. (6): An alternative name for medals is probably the best way to do this. The actual medal name is used in multiple places including the pilot file code so I would like to avoid using a translatable string for the medal name. |
Yes, if i remember correctly, you was the person who implement that, because i requested that in Mantis back then. And currently the game tries to translate it again, because the code seems to look for special terms in the labels. If there is a label which contain the word "Transport", the game translate it automatically into "Transporter" in german, even it was already translated in tstrings, because "Transporter" contain the "Transport" aswell.
Well, more importantly would be translateable object names in general. For example, in the first FSPort Mission "Eve of Destruction" you have a NavBuoy with the Name "Distress Signal"... a translateable object would make it possible to call it "Notsignal" in german for example as well. "Instructor", "Sentry Gun" and "Support" are objects that are translated automatically by the game. I simply would like to see a feature that enables the translation of other objects as well. In the past couple of days i worked with the Callsign feature a bit. Actually you can translate callsigns if you put them into XSTRs and also put the translated term into the $callsign list at the beginning of the mission file. Unfortunately the callsign is not used as the actual name in the escort list for example. Even this would still require a changed mission file for every new language you add into a translation, because you have to add the translated callsign into the callsign list, but well, actually a Callsign that can also behave like a real ship name (appear in the escort list as such etc.) (maybe with a new flag?) would also be very helpful already. |
Huh, I don't remember writing that code... Anyway, do you have any preference for how the "old" behavior should be disabled? I'll have to take a look at how the engine handles callsigns to determine how to add proper translation support for ship names. I though we already had that somehow but apparently not... |
Regarding callsigns, they are not quite the same things as alternate ship names. They are displayed in the message sender as the callsign itself, but on the target display as the ship name plus the callsign. (However I believe the format of the callsign on the target display can be configured.) The primary issue, as I see it, is that callsigns are not used either in the comm menu or the escort list. I looked into adding this feature a couple months ago but didn't pick it up, as I was quite busy at the time and it is not a trivial problem. The callsign feature wasn't designed with translation support in mind, but XSTRs should work with callsigns in the same way as XSTRs work anywhere else. Regarding #Command, @NovachenFS2, have you tested putting XSTR into the send-message sexp as the message sender? I am pretty sure it should work. You will probably not be able to save it in FRED, but as long as you remember to only edit it in Notepad++, it should be fine. There should not be an issue with quotation marks because XSTR parsing is well defined, and there should not be a problem with translated strings because a message source that starts with # can be any string. In other words, yes, many sexps will break if you just add XSTR in the middle of them, but this particular case is an exception and it should work just fine. |
It was this one: #1287
No, not really. The question i only have, it is needed to disable the old behavior at all or only to change it? That is the current code for the position:
Actually.. would it not be sufficent already if you would change that into
? Because the strstr function is the main problem, because the translated term also contain the string. But the string comparsion would only be in effect if the label is called like the original english one. In the polish language it seems to be the same problem. Even i do not know, how accurate the term Transportowiec for a translation of Transport really is, because google translate gives me a total different term for Transport. But i think that could be used in the same way. Instead of
simply this:
All other cases with the "contain string" codes are present for names in the Target box. But if we are able to get deeper into the ships with an alternative translateable name, i think that this cases can be avoided. (except for the support ships so far, because you can not change their name in a mission anyway) @Goober5000 And no, actually i did not try to use a XSTR in the send-message SEXP. This was simply too offbeat for me, because i know how every other SEXP is reacting to XSTRs. But because i will test the Scramble Message thing anyway in the course of the day, so i could use the opportunity to test this one as well. EDIT: I checked all of FreeSpace2 missions for the abovementioned solution with the string comparsion. sm3-04.fs2 uses a couple of "Transport" labels. X_Third-Watch_X.fs2, which is a SOTY-mission, uses a "Transports" label. @Goober5000 Both
or
results in the same error message. Error: Required token = [#Goals] or [$Formula:], found [ ) |
I want to disable the old translation code because I think that it is bad to hard-code translations in the source code since they can't be changed easily. Your suggestions would probably fix the immediate issue but the fundamental issue of hard-coded translations would still exist. I think it would be better to introduce a mod table option for disabling this behavior which would leave old missions unchanged but would allow you to translate the missions properly. The hard-coded translations wouldn't be applied anymore though so if you rely on that behavior you will have to duplicate the translations but that's only a one-time operation so it shouldn't be too bad. For the |
Well okay, i understand this yes. But i do not have any preference how you make the old code disableable. As long this is not restricted to Unicode Mode only, because most mods/campaigns are not using TTFs. A special mod-table option is fine, yes.
Nope, i did not try that, because i actually do not have much fredding experience with Variables and i had already some problems to understand a finished mission with all the Variable Stuff for my first translation (BtA). |
@NovachenFS2 Strange, I thought the XSTR in the middle of the SEXP would work. I was mistaken. Thank you for testing. I think @asarium's suggestion of using a SEXP variable is the right idea. It is not really possible to modify the |
The Maybe a special string syntax similar to how SEXP variables could be added which contains the untranslated string and the id somehow? I am not very familiar with the SEXP system so I don't know how feasible that would be. |
I tried it with the variable as a message source and yes, it worked! In this process i looked a little more in the Variable translation in general, because for more recent mods i have to implement translated variables anyway in the missions. Found a small problem in its behaviour. If a string is required to end with a space (to seperate the text to other values that directly follows) the space in the translation is ignored. Only the original/untranslated string is working as it should. Two spaces at the end as a workaround make no difference. Also there seems to be no character in Unicode, that can be used as a invisible placeholder like the well known #, And all unsupported characters from the TTF are shown as a square and so can not be used to write an invisible character. But to summerize all the points of the OP so far, based on the previous posts:
|
This disables the old hack code if the weapon class has an alternate name which may have been translated. See scp-fs2open#1730 for more information.
For (2): I think it would be a good solution to also introduce a "Display Name" property of a ship which is used for modifying the display name of the ship without actually changing the "name" of the ship. The callsign feature is not meant to be an alternate name of the ship so it would not be a good idea to reuse this field for translating ship names. I have opened a PR with the changes: #1736 @NovachenFS2 Please test the changes to make sure that they really fix the issues you have reported. |
Yes, the "Display Name" was the solution i would had prefered right from the start. So yes, i am very fine with this. The Callsign was only an idea to create a solution until there is a better one :). What i have to enter in the mod table to disable the built-in translations? "$Disable built-in translations: Yes" in #Other Settings? |
Yes For medals, |
@NovachenFS2 Could you open a separate issue for the bugs you have found in the Unicode code maybe with a test mod to reproduce the issue? Also, there is the zero width space in Unicode which should work with FSO if you need to add an invisible character for some reason. |
If At a minimum, in order to add support for XSTRs as string parameters we would need to create a new SEXP parameter type, I heartily agree with adding the Display Name feature for ship names. This could also have some fun applications in FRED outside of the realm of translations. |
This disables the old hack code if the weapon class has an alternate name which may have been translated. See scp-fs2open#1730 for more information.
This disables the old hack code if the weapon class has an alternate name which may have been translated. See scp-fs2open#1730 for more information.
This disables the old hack code if the weapon class has an alternate name which may have been translated. See scp-fs2open#1730 for more information.
This disables the old hack code if the weapon class has an alternate name which may have been translated. See scp-fs2open#1730 for more information.
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
I implemented most of the display name feature but event screen support is still missing since the same data is used by various SEXPs which use the actual ship names. |
Meaning the mission log? Yeah, that's going to be tricky. |
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
I think I managed to get the mission log working. I needed to do some changes to the log entry structure but it seems to be working fine now. |
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
This adds a mission file option for ships which allows specifying a different string which should be used for displaying the name of the ship to the user. This name will not be used in SEXPs or other ship lookup functions so it can be freely translated and two ships can also have the same display name. The new feature can be used by adding $Display name: <string> after $Name for a ship in a mission file. I think I added proper support for FRED (and qtFRED) so that this new value is properly saved but it would be great if someone could test that. This implements one of the features requested in scp-fs2open#1730.
@NovachenFS2 Now that the ship display name feature is merged, what other things are needed to fully resolve this? I know you mentioned translating wing and jump node names. Anything else? |
Pinging @NovachenFS2 again |
I'm sorry. I did not see the message. @asarium Translateable Jump Nodes and Wing names is the last feature that is missing from the list i had. What is missing apart from that... well actually it should be implemented already with #1527, but as far as i tried, i was not able to implement translateable text in script files, even i try to keep the structure that is used in the commit. |
I updated the name to make it clearer what is left at a glance for whoever might take it on. |
All that's left on this now is translatable wing names. |
Because Mantis is not used these days anymore as it seems, i think, that this is the place to post some Requests for some localization features i need or atleast want to discuss.
As you may know i am constantly working on german translations of Freespace Mods.
For a new generation of updates, i added some new translation features where i also encountered some problems so far.
In the lcl_translate_brief_icon_name_gr() segment (as well for the other languages) of the localize.cpp there are some examples which briefing icons are translated automatically, if the corresponding string occurs.
Fortunately the game only refers to the strings, that are appearing in the game, so to speak it is using only the already translated strings as a reference (if available). In the german language i actually have only problems with every briefing icon, that is labeled "Transporter" because it is nearly the same word as the english "Transport" what have to be translated by the rules of the code. If i use "Transporter" in tstrings as a translation, the game actually make it a "Transporterer" in the briefing with an additional -ER, what is totally wrong anyway.
This would not be not a big issue, if i remember to simply translate all "Transport/s" into "Transport" to let the game add the missing -ER by itself. The problem i have is, that this function drops all other characters besides the "Transport" part. If i have a label called "Shivan Transport" for example and translate it to "Shivanischer Transport/er" only the "Transporter/er" will appear. It is dropping the complete part before or after that term. I can only bypass this, if i use a lowercase t at the beginning. But i think, it would be much better to change the code, that these translation rules comes only in effect if the term is totally identical. So that the game still auto translates labels that are called "Transport/s"... but not if they are called "Shivan Transport/s" for example... or already translated terms like "Transporter".
Unfortunately $Alt Name in missions is used for an alternative name for ship classes. But actually because the original game do this with Instructors and Support ships i am asking if it would not be helpful if you can use a new entry to translate objects or wings if it is needed. Well, at least there would be even a potential for new SEXPs where you can change the ship name without any scripts.
Actually i would like to see a feature, that this setting is also affecting the message source of #Command messages... that would make it possible to create a source for messages that can be named differently in several different languages without to create missions for each language.
I think that was everything so far. I hope at least some of it is possible to implement, because that would make translations much easier and would also help that you need only one file for more than one languages in the future :)
Greetings,
Novachen
The text was updated successfully, but these errors were encountered: