PDA

View Full Version : The best way to add strings to an existing STBL resource?


Buzzler
10th Jul 2010, 06:43 PM
Ok, all you guys who make localizable mods know the deal: You make something, spend the effort of putting all strings in an stbl file to give people the possibility of translating it, copy the stbl to the other languages, release the mod, people translate it and then you have to add strings ...

What do you do about it? What's the best way to add these strings to all the existing translations and what's the best way to make these new strings accessible to the translators of the existing stbls? "Best" as in "most convenient"?

Kolipoki
10th Jul 2010, 08:09 PM
After I have all of the strings located into an stbl file and someone gives me a translation, I use Johna's translator tool (http://www.modthesims.info/showthread.php?t=383702) to create the instance. It allows easy creation on instances and creates the proper language stbl files to show up depending on the language selected. This tool also allows you to create all of the strings that will just be in english to the other languages until such time as someone provides a translation so that it is not comming up as an empty interaction.

twallan
10th Jul 2010, 08:21 PM
I go the same approach as Pescado's Awesome translation, and use a separate text file containing the unhashed keys and the translation text.

Considerably easier to append new strings to the end of a text file than it is to the end of a STBL, and the unhashed keys provide a better context for the translation than having some numeric value.

As for making the translations available, I use a separate forum at my hosting site to store all the provided translations in their unconverted text format.

Cheers. :)

Buzzler
10th Jul 2010, 11:43 PM
This tool also allows you to create all of the strings that will just be in english to the other languages until such time as someone provides a translation so that it is not comming up as an empty interaction.Will it automatically create the missing entries in other languages without overwriting anything?

I go the same approach as Pescado's Awesome translation, and use a separate text file containing the unhashed keys and the translation text.I'm doing it the same way right now. But to add stuff you have to do a lot manually. Gets pretty confusing when you make changes to multiple languages at once.

As for making the translations available, I use a separate forum at my hosting site to store all the provided translations in their unconverted text format.So you make the changes to the text files and upload them to make them available? Or do you just change the posts of the translators with your fancy moderator rights?

Kolipoki
11th Jul 2010, 12:00 AM
Will it automatically create the missing entries in other languages without overwriting anything?

In the program you can tell it to convert english to all languages which will create all of the instances and such. I'm not sure if it overwrites anything or not as I usually only start in english and then make it go from there.

twallan
11th Jul 2010, 12:11 AM
I'm doing it the same way right now. But to add stuff you have to do a lot manually. Gets pretty confusing when you make changes to multiple languages at once.


I moved to a slower release schedule to accommodate the translations... Only changing existing translation files when I move to a new Phase for that mod, which only occurs every couple months or so.

Quickly changing mods, such as DebugEnabler, are simply left completely untranslated.


So you make the changes to the text files and upload them to make them available? Or do you just change the posts of the translators with your fancy moderator rights?

No, nothing fancy.

1) They download the file from the original post
2) Make their changes and post a new copy
3) I then download that file and add it back to the original post

Quite certain someone with greater experience than I could easily produce a more efficient approach, perhaps using an Wiki or such.

:)

Buzzler
11th Jul 2010, 12:37 AM
In the program you can tell it to convert english to all languages which will create all of the instances and such. I'm not sure if it overwrites anything or not as I usually only start in english and then make it go from there.I guess everyone starts with English and goes from there. The real issues begin when you have to add strings. Don't you ever have to do that?

I moved to a slower release schedule to accommodate the translations... Only changing existing translation files when I move to a new Phase for that mod, which only occurs every couple months or so.That probably makes sense for you since you have a couple of big mods. Would probably drive anyone nuts to make short-termed feature changes in these cases. BTW: Do you use version control software or something like that?

Quickly changing mods, such as DebugEnabler, are simply left completely untranslated.Plus, there's really no need to translate mods that aren't supposed to "fit into regular gameplay" to begin with.

1) They download the file from the original post
2) Make their changes and post a new copy
3) I then download that file and add it back to the original postStill a lot of work you need to do. I would have assumed that there's a smarter way that needs less "manual labor". And stuff like that isn't the fun type of work, more the mind-grinding opposite.

Quite certain someone with greater experience than I{...}You know that misguided humility is just a different form of lying, right? ;)

twallan
11th Jul 2010, 12:48 AM
That probably makes sense for you since you have a couple of big mods. Would probably drive anyone nuts to make short-termed feature changes in these cases.


Is true. :)


Do you use version control software or something like that?


There is only one version, haven't you learned anything from Pescado ?


Still a lot of work you need to do.


Meh. Pulling the file off the forum, running the converter program on it, and importing it into the appropriate STBL takes little to no time.

The whole approach is so simplistic, that I have never really considered a different approach to doing it.


You know that misguided humility is just a different form of lying, right? ;)

Actually, I don't have ANY experience in web development, it is not my area of expertise... There are other people in the company that handle that sort of thing.

Cheers. :)

Kolipoki
11th Jul 2010, 01:05 AM
I guess everyone starts with English and goes from there. The real issues begin when you have to add strings. Don't you ever have to do that?

I guess that is true I did have to add strings. My guess is that you might be able to do it string by string instead of reverting the whole language and replacing the text (which I found out the hard way). I haven't tried doing new strings one by one but it might be there. (it's been a while since i've used it).

desecrate
11th Jul 2010, 10:04 AM
I'm still waiting to find the perfect STBL editor... In most editors you need to select each key to edit the string (too many clicks for me), and don't allow you to just edit all the strings at once as if they were all together in plain text.

The best way I found so far was:
- Start with the english strings and use s3stblDuplicator to copy english to all other languages.
- When ppl send the translated text, I export the language STBL file and use stblizer to convert it to a text-like format (csv).
- Then I just need to paste the whole translated text on the csv, use stblizer to convert back the csv to stbl and re-import to the package.

It is still more work than I would hope for, perfect would be a tool you could open the stbl directly (ideally from s3pe) and edit the whole file contents in plain text or in grid mode (excel-like).

I also had the case where I needed to add quite a few more strings after I allready had some translations. What I did here was to add the new keys in english and copy english to other languages again with s3stblDuplicator (overwriting the contents); and then added the new strings to the exported languages csv and re-imported them.

I guess this is somewhat similar to methods used by Kolipoki and twallan, but probably using diferent tools...

Buzzler
11th Jul 2010, 10:35 AM
There is only one version, haven't you learned anything from Pescado ?Learning from Pescado is dangerous. You might end up as a misanthropist prick. ;) I didn't mean something to actually maintain multiple code versions though. More like something to keep track what has been done and what still needs doing for the next version, or phase as you call it.

Meh. Pulling the file off the forum, running the converter program on it, and importing it into the appropriate STBL takes little to no time.Depends. How often do you have to do that?

Actually, I don't have ANY experience in web development, it is not my area of expertise...Oh, so you were talking about web development. The wiki is an idea. I thought about giving the translators access to change the uploaded files in a posting. Don't know how hard that would be to implement. Both share the same potential issue: vandalism.


Judging by the things you, Kolipoki and desecrate wrote, there is no silver bullet right now. And there I was thinking I was doing it wrong. Seems like I'm going to keep doing it the same way for now, which is pretty much the same way twallan does it.

twallan
12th Jul 2010, 07:45 PM
More like something to keep track what has been done and what still needs doing for the next version, or phase as you call it.


I retain a simple list of reversion notes in a comment somewhere in the source code, one for long-term Phase changes, and the other for short-term Version changes.

I use the #if #endif extensively to keep the Phase coding separate during the interim development. :)

As to what needs to be done, there is a public List of various things that I *might* add, which I pick through depending on the time I have available.

Users request things, and if I feel it falls in my purview I add it to the List for future consideration. :)


Depends. How often do you have to do that?


Whenever a new translation is provided: Usually the translation is added that night.

There is usually a quick spurt of translations at the beginning of the Phase, and sort of falls off to one every couple weeks afterward.

Cheers. :)