I haven't; I was waiting for you to ping me letting me know they were
ready to go. (One problem with Google Code is that it doesn't have the
whole "pull request" system that Github does.) Now that you have, I'll
take a look at them this evening.
> With the "easy" stuff done, now I'm ready for more bold changes. Namely,
> complete internationalization of E:S, ie, the changes necessary to make all
> strings in E:S are translatable.
-snip-
I've never been convinced (but that can of course change :) that
gettext-style localization is really that much of a win. I get
that it's easier from a programming perspective, but it's always
seemed like a nasty mash-up of "display" and "logic" that's just
never sat well with me. I don't consider it that much of a burden
(from a programming perspective) for all of the button labels, etc.
to be pointers to something in a data file rather than just spelled
out directly in the source.
One of the real problems I have with gettext-style approaches is that
it's completely beholden to the original source language. In other
words, if I want to change the in-game English text, that screws up all
the other translations until their mappings are adjusted. That bothers
me from an ethnocentric viewpoint, but maybe I'm overly sensitive to
these sorts of things.
That, plus the whole "hardcoded strings in the source file," make me
want to steer away from gettext-style solutions. For me, the optimal
result is that we have a codebase where people could change any of the
text they want--English, German, Portugese--without ever editing a
Python source file. But, like I said, I can potentially be convinced
otherwise.
> - Another problem is keyboard shortcuts: most of the hotkeys in
> data/strings_en_US.dat are not used in code, the xxx_hotkey naming scheme
> is hard to maintain, and currently many hotkeys found in
> data/locations_xx_XX.dat are broken and collide with other existing
> buttons. And having a separate entry for hotkeys is unfeasible with the
> proposed approach. So I suggest this: *to embed the hotkey info in the
> string itself! *Again, GUI/Menu-style, using "&" for hotkeys:"&LOAD GAME"
> -> L, "E&UROPE" -> U, and so on. For literal&, use&&, as in "Command&&
> Con&quer" -> q.
This embedding could be done in the current approach, it's just not the
way it's handled. I have no problem with us changing the current data
file format to do it this way rather than having a foo_hotkey = entry in
the .dat file.
[-snipped discussion of hotkey domains-]
> Wow, that was a long email... But I would love to hear your opinion,
> suggestions and feedback on all of these ideas... what do you think about
> all of this?
I think that complete localization of the game is a /very good/ goal,
and I'm happy to work with you on making that happen. I just think
we need to go about it in a way that ends up being maintainable and
doesn't offend everyone's sensibilities too much. :)
I snipped the hotkey domain stuff because I think it's a neat idea, but
it also smells of a "code black hole"--a feature whose utility is
outweighed by the maintenance burden it inflicts. It wouldn't be hard
for the hotkey-registration function on each screen to complain (perhaps
even with a dialog, so it can't be missed in the text log) when two
buttons try to register the same hotkey. That would catch the problem
quickly and with a lot less of a long term maintenance burden. If E:S
were a traditional roguelike, with a billion-zillion hot keys for doing
everything, it might be worth it... but there really just aren't that
many.
P
I've never been convinced (but that can of course change :) that
gettext-style localization is really that much of a win. I get
that it's easier from a programming perspective, but it's always
seemed like a nasty mash-up of "display" and "logic" that's just
never sat well with me. I don't consider it that much of a burden
(from a programming perspective) for all of the button labels, etc.
to be pointers to something in a data file rather than just spelled
out directly in the source.One of the real problems I have with gettext-style approaches is that
it's completely beholden to the original source language. In other
words, if I want to change the in-game English text, that screws up all
the other translations until their mappings are adjusted. That bothers
me from an ethnocentric viewpoint, but maybe I'm overly sensitive to
these sorts of things.That, plus the whole "hardcoded strings in the source file," make me
want to steer away from gettext-style solutions. For me, the optimal
result is that we have a codebase where people could change any of the
text they want--English, German, Portugese--without ever editing a
Python source file. But, like I said, I can potentially be convinced
otherwise.
> - Another problem is keyboard shortcuts: most of the hotkeys in
> data/strings_en_US.dat are not used in code, the xxx_hotkey naming scheme
> is hard to maintain, and currently many hotkeys found in
> data/locations_xx_XX.dat are broken and collide with other existing
> buttons. And having a separate entry for hotkeys is unfeasible with the
> proposed approach. So I suggest this: *to embed the hotkey info in the
> string itself! *Again, GUI/Menu-style, using "&" for hotkeys:"&LOAD GAME"
> -> L, "E&UROPE" -> U, and so on. For literal&, use&&, as in "Command&&
> Con&quer" -> q.This embedding could be done in the current approach, it's just not the
way it's handled. I have no problem with us changing the current data
file format to do it this way rather than having a foo_hotkey = entry in
the .dat file.
[-snipped discussion of hotkey domains-]
> Wow, that was a long email... But I would love to hear your opinion,
> suggestions and feedback on all of these ideas... what do you think about
> all of this?I think that complete localization of the game is a /very good/ goal,
and I'm happy to work with you on making that happen. I just think
we need to go about it in a way that ends up being maintainable and
doesn't offend everyone's sensibilities too much. :)I snipped the hotkey domain stuff because I think it's a neat idea, but
it also smells of a "code black hole"--a feature whose utility is
outweighed by the maintenance burden it inflicts. It wouldn't be hard
for the hotkey-registration function on each screen to complain (perhaps
even with a dialog, so it can't be missed in the text log) when two
buttons try to register the same hotkey. That would catch the problem
quickly and with a lot less of a long term maintenance burden. If E:S
were a traditional roguelike, with a billion-zillion hot keys for doing
everything, it might be worth it... but there really just aren't that
many.P
On 03/29/2012 10:09 AM, MestreLion wrote:
> Don't underestimate (A): it is not simply about creating an entry in
> strings_en_US.dat, one must also *name it* appropriately. For long
> sentences like "Are you sure you want to destroy this base?" this requires
> some undesirable "creativity" from the programmer.
> ("destroy_base_confirmation"? "base_delete_msg"?). And this burden is
> perhaps the (or one of the major) reason why more than a hundred strings
> are currently not only untranslated but *untranslatable* in E:S
>
> But I agree: C) and D) are huge issues, and no, you're not being
> oversensitive.
>
> So, how about this? Let's create a en_US.po too! This way we properly
> separate 2 distinct concepts: the "programmer's meaning intention for a
> string", and the "English translation of that string". Since for short
> strings like "Save Game" this ends up being called g.strings["save_game"],
> gettext approach only takes this a step further by automatically naming the
> pointers to the strings, any string. But it would still be just a pointer,
> a programmer's message to the translators indicating the intended meaning
> of that string, NOT the "official English translation" of that string. Just
> a pointer that also doubles as the last fallback.
The thing is, this is really just syntactic sugar on A). What is the
meaningful difference between having to come up with a name like
"destroy_base_confirmation" and having a line in the code that's
_("Really destroy base?") that still has to be "translated" into smooth
English?
I am curious as to what you think are currently /untranslatable/ strings
in the code. A couple of examples of "tough lines" that we can work on
hashing out will take this from theoretical to practical, which I think
would be a good thing.
> Nice! I'll change g.load_strings_defs() and load_locations_defs()
> accordinly. It will parse foo string for "&"s and auto assign foo_hotkey.
> For full backwards-compatibility, it will only auto-assign if foo_hotkey is
> currently empty, and if later there is a foo_hotkey in data file, it will
> overwrite the "&" auto assigned value.
Makes sense.
> About domains, I agree that it may be too much trouble for little gain. It
> was just an idea. Is there any way, using current E:S "technology", to list
> all the keys used in a given screen? I don't know how the button widgets
> work. Do we need to create a "hotkey registration" function, or does
> pygame/button widgets already maintain a list for each dialog? If we need
> to create one, how would it know which "screen" each hotkey belongs to? The
> domain idea was exactly a "fancy" name to list the buttons used in each
> screen. If pygame automatically provides this somehow, great! :D
It's been ages since I've looked at the interface code, and FM changed
it pretty significantly from the last time I looked at it, but hotkeys
have to be registered /somewhere/ for them to be captured by the input
loop, so there's got to be a spot where we can check for duplicates (if
it's not already being done).
> Last but not least, I'm *very* glad you think that full
> internationalization is a great goal, and I'll be honored to help make it
> work.
It is my belief that, in this day and age, an untranslatable game (or
piece of code) is a dead game.
> Eager to read your comments,
> ML
P
First, apologies: I meant to look at the Git stuff last night, and
did not. It probably won't happen tonight either, as I have a D&D
game, but it /will/ happen this weekend.
The thing is, this is really just syntactic sugar on A). What is the
meaningful difference between having to come up with a name like
"destroy_base_confirmation" and having a line in the code that's
_("Really destroy base?") that still has to be "translated" into smooth
English?
I am curious as to what you think are currently /untranslatable/ strings
in the code. A couple of examples of "tough lines" that we can work on
hashing out will take this from theoretical to practical, which I think
would be a good thing.
> About domains, I agree that it may be too much trouble for little gain. It> was just an idea. Is there any way, using current E:S "technology", to list
> all the keys used in a given screen? I don't know how the button widgets
> work. Do we need to create a "hotkey registration" function, or does
> pygame/button widgets already maintain a list for each dialog? If we need
> to create one, how would it know which "screen" each hotkey belongs to? The
> domain idea was exactly a "fancy" name to list the buttons used in each
> screen. If pygame automatically provides this somehow, great! :DIt's been ages since I've looked at the interface code, and FM changed
it pretty significantly from the last time I looked at it, but hotkeys
have to be registered /somewhere/ for them to be captured by the input
loop, so there's got to be a spot where we can check for duplicates (if
it's not already being done).
> I hope the "win-win with no cons" argument before and this one are
> suductive enough, because I'm running out of good arguments :)
I think you've convinced me. Congratulations!
This is not going to be fun work to transition to, alas.
> True. I'm not familiar with interface code either, but I'll try to
> investigate that. It will be sweet to have a "hotkey monitor" to monitor
> dupes and log them :)
Good luck. If I get a chance this weekend I'll do some digging myself.
P
I merged fix_events_translating, respect_singledir, and
translation_pt_BR. I'm still a little leery of the XDG patches,
particularly the one that does some funny things with symlinks.
Please submit a patch for AUTHORS giving yourself whatever name you
want documented there, and send me (under separate cover) the precise
Gmail account you want me to grant commit access to for the Gcode
project.
Thanks for your work!
P
On 03/29/2012 01:17 PM, MestreLion wrote:> I hope the "win-win with no cons" argument before and this one are
> suductive enough, because I'm running out of good arguments :)I think you've convinced me. Congratulations!
This is not going to be fun work to transition to, alas.
> True. I'm not familiar with interface code either, but I'll try to
> investigate that. It will be sweet to have a "hotkey monitor" to monitor
> dupes and log them :)Good luck. If I get a chance this weekend I'll do some digging myself.
P
> Thanks! And I hope you're saying that because you truly liked the points
> given, /not/ because you think that "If I don't say yes this annoying guy
> will keep arguing" :P
>
> This is a big design decision, so take you time if you want to think more
> about it.
I meant it genuinely. Damn the Internet for making dry sarcasm and
genuine belief basically indistinguishable nowadays.
P
Please submit a patch for AUTHORS giving yourself whatever name you
want documented there, and send me (under separate cover) the precise
Gmail account you want me to grant commit access to for the Gcode
project.Thanks for your work!
P
> Lets see how this "code revamp" goes, and If i succeed in this
> challenge, I will then gladly accept this generous offer.
>
> For now, an entry in Credits section of README.txt is enough. My gf will
> be thrilled :D
Fair enough. Let me know how you'd like to be credited there.
P
I haven't had time to actually test this code, but I looked at it and
it didn't seem insane. :)
The tweaks to README and the like seemed noisy without accomplishing a
lot. I suggest tossing that particular patch and I might do some
cleanup myself (Brian Reid should no longer be in AUTHORS, for example,
just in the credits, and I'm not sure why you shifted folks around).
Be Bold(tm). We have revision control for a reason. That said, I'll
try to find some time this coming week|end to look a little more
thoroughly.
P
On 05/06/2012 11:13 AM, MestreLion wrote:
> Sure, sorry for the delay. The 11th commit is ready (you can check it out in
> https://github.com/MestreLion/singularity/tree/public/welcome )
So many trees in so many places...
> But, before the merge (that I would like the honor to commit myself), I'm
> "setting the ground" for the new status. Mostly:
> - The google repository you've been pulling from so far has no reason to
> exist anymore
Assuming you don't want a public staging space on Google, yes. (I assume
you'll be using Github for that now?)
> - I'm setting up a new google account for singularity. The email will
> probably be "singularity a_t rodrigosilva.com". This will be the email I'll
> use for all singularity-related stuff. This includes commit info, mailing
> list, github, etc. Currently it's a mess: I post here as
> rodrigo.espirito...@google.com, I commit using linu...@rodrigos....com, my
> github (used so far mostly for backups and testing) used a 3rd email, and so
> on... I'm trying to fix this and unify this mess
> - I'm updating my ~/.gitconfig, /.netrc, github, google, etc, to use the new
> - can you please also add that email to the mailing lists?
Google Groups no longer does 'bulk add', as far as I can tell, so the best I
can do is "invite" that eMail address to the group. You'd still have to go
and join it manually. I suspect it's easier for you to just join the groups
via the web interfaces at:
http://groups.google.com/group/endgame-singularity-dev/
and
http://groups.google.com/group/endgame-singularity/
There shouldn't be any approval needed, but let me know when you've done it
and I'll go make the necessary tweaks.
> Also, could you please (privately if you want to) give a a little "tutorial"
> on how to manage and properly use the new access? I'm totally unfamiliar
> with administration, since so far I've only worked with that "push to
> private repo & ping the owners" workflow, so an "Admin 101" would be handy :)
I'm actually learning this as I go too; I just started working on another
project using Git where commits actually overlap occasionally (gasp!) and
it's forced me to learn quite a bit more about Git workflow.
Anyhow, feel free to start hanging out in irc.oftc.net #singularity (I just
re-added it to my join list) and we'll muddle through together :)
P