-
Notifications
You must be signed in to change notification settings - Fork 218
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
Display Spectators in Scoreboard #466
Conversation
} | ||
switch (numSpectators) { | ||
case 0: return; | ||
case 1: strcpy(buf, "Spectator:"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use GetTextPlural to make it more localization friendly.
EDIT: Actually there is a Macro for this: _TrN(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I'll fix that, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was about to say that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Spectator" doesn't belong in the localization lists though, it's not translated in any language.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I misinterpreted the Macro's purpose, nvm.
I'll still have to hardcode "Spectator" though, not sure how to do other localization stuff.
Edit: Nvm, figured it out :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VelocityRa
Could you please tell how you did it? I always wondered :)
My guess is update-pot.sh
EDIT: Okay, I understand now, create the string with _Tr or _TrN and xgettext will update the pot file when run as in update-pot.sh
There we go fixed. |
I think it looks nice with the colon. |
@VelocityRa I think there is something wrong with your implementation of plural forms, it always stays on the singular for translated texts for me. EDIT: Remove the image, it was useless. |
I tried to simplify the line to The .pot file was generated using The most weird part is that if |
I will double check myself too. I am almost 100% sure you did the right implementation, but I can't get it to work. Perhaps it's some dark auto-casting happening with NumSpectators |
Test it with |
I can only try a few hours from now, I will test as soon as I arrive back home. It will probably be in 3 hours. |
@VelocityRa status update: Ok, I tested and uploaded my changes to my fork of your fork. I made sure to double-check the translations and also named them them as The I also used "2" as When my However, with This is very weird, maybe a new issue about this should be opened? If you can confirm on your system too, I'd be very grateful. I am now sure this is a bug within the localization system.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The translation problem is internal, your implementation is correct :)
The issue was reported in #469.
I requested changes just in case you forget to change spectator team ID to 255 before pushing.
Yeah it's present on my system too. |
Segfault seems to occur only with the latest version of GCC or glibc. Hopefully fixes the second issue reported in yvt#434.
@yvt Rebased your commits to test the locale thing and it works now! With |
For discussion see the relevant Issue: #412.
Current look: