Skip to content
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

CS Miscstats: Fix enemy remaining option displaying the message to the wrong team #611

Merged
merged 1 commit into from
Oct 11, 2018

Conversation

Arkshine
Copy link
Member

@Arkshine Arkshine commented Oct 1, 2018

Fixes #560.

Regression from 9e4fe0d#diff-3afb3f242934c594b97f6626a9655704L313.
The second get_players overwrites the correct list.

  • Code has been updated to be a little more understandable. Before, it was quite confusing.
  • The code related to the suicide with victim_alive check is dropped. It's not needed anymore. It was using the wrong list, the message is not going to be shown to the victim.
  • Replaced the REMAINING translation. It was translating TERRORIST/CT with/out an S separately, that's not really convenient for the user and complexifies the code for nothing. Now, the team name is replaced by "enemy", and two keys have been added: REAMAING_ENEMY and REMAINING_ENEMIES. It will be easier for to translate.

@@ -41,7 +41,8 @@ CT = CT
CTS = CTS
TERRORIST = TERRORIST
TERRORISTS = TERRORISTS
REMAINING = %d %s Remaining...
REMAINING_ENEMY = Last enemy remaining...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds weird. I would change it to "Only one enemy remaining".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rsKliPPy said it was fine, but I guess we can't trust him! 🙊

My English is horrible, so I expect people giving me the right default phrase.

Copy link
Contributor

@OciXCrom OciXCrom Oct 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never trust anyone!

Maybe it would be better if it's just "1 enemy remaining" or "%d enemy remaining" so it remains the same with its plural version "%d enemies remaining".

Copy link
Member Author

@Arkshine Arkshine Oct 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to avoid `%d' because it will be always 1, and it would be dumb to keep it. Also, it should give more freedom to translate. Like you could say either "1 enemy remaining", or someone would prefer "One enemy remaining".

@OciXCrom
Copy link
Contributor

OciXCrom commented Oct 1, 2018

Here are some more translations:

[mk]
REMAINING_ENEMY = Preostanuva ushte samo eden protivnik...
REMAINING_ENEMIES = %d preostanati protivnici...

[bg]
REMAINING_ENEMY = Ostava oshte samo edin vrag...
REMAINING_ENEMIES = %d ostanali vragove...

@@ -543,48 +537,26 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
}
}

new team = get_user_team(victim)
if (EnemyRemaining && is_user_connected(victim))
new team = get_user_team(victim);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cs_get_user_team?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually weird this native was not used from the start.

@Nextra
Copy link
Contributor

Nextra commented Oct 10, 2018

I'd consider removal of core language keys a breaking change.

@Arkshine Arkshine force-pushed the fix/enemy-remaining branch 2 times, most recently from c65435b to be84725 Compare October 11, 2018 08:49
@Arkshine
Copy link
Member Author

Original language key is back.

@Arkshine Arkshine merged commit 87b6f27 into alliedmodders:master Oct 11, 2018
@Arkshine Arkshine deleted the fix/enemy-remaining branch October 11, 2018 09:12
@OciXCrom
Copy link
Contributor

I assume this should be in 1.9 as well.

Arkshine added a commit that referenced this pull request Oct 11, 2018
Arkshine pushed a commit that referenced this pull request Oct 12, 2018
* Update miscstats.txt

#618

* Update statsx.txt

#618

* Update and rename mapchooser.txt to admincmd

* Rename admincmd to mapchooser.txt

* Update admincmd.txt

* Update common.txt

* Update multilingual.txt

* Update multilingual.txt

* Update scrollmsg.txt

* Update statscfg.txt

* Update adminchat.txt

* Update adminhelp.txt

* Update adminvote.txt

* Update cmdmenu.txt

* Update common.txt

* Update mapchooser.txt

* Update mapsmenu.txt

* Update menufront.txt

* Update miscstats.txt

* Update multilingual.txt

* Update nextmap.txt

* Update pausecfg.txt

* Update plmenu.txt

plmenu.txt adresses only the behaviour in the "Menü", not the text in the chat!

* Update restmenu.txt

* Update scrollmsg.txt

* Update stats_dod.txt

* Update statscfg.txt

* Update statsx.txt

* Update telemenu.txt

* Update timeleft.txt

* Update admincmd.txt

* Update plmenu.txt

* Update adminchat.txt

* Update admincmd.txt

* Update mapsmenu.txt

* Update miscstats.txt

added changes due to PR #611 !

* Update miscstats.txt

* Update pausecfg.txt

* Update admincmd.txt

* Update statscfg.txt
Arkshine pushed a commit that referenced this pull request Oct 13, 2018
* Update miscstats.txt

#618

* Update statsx.txt

#618

* Update and rename mapchooser.txt to admincmd

* Rename admincmd to mapchooser.txt

* Update admincmd.txt

* Update common.txt

* Update multilingual.txt

* Update multilingual.txt

* Update scrollmsg.txt

* Update statscfg.txt

* Update adminchat.txt

* Update adminhelp.txt

* Update adminvote.txt

* Update cmdmenu.txt

* Update common.txt

* Update mapchooser.txt

* Update mapsmenu.txt

* Update menufront.txt

* Update miscstats.txt

* Update multilingual.txt

* Update nextmap.txt

* Update pausecfg.txt

* Update plmenu.txt

plmenu.txt adresses only the behaviour in the "Menü", not the text in the chat!

* Update restmenu.txt

* Update scrollmsg.txt

* Update stats_dod.txt

* Update statscfg.txt

* Update statsx.txt

* Update telemenu.txt

* Update timeleft.txt

* Update admincmd.txt

* Update plmenu.txt

* Update adminchat.txt

* Update admincmd.txt

* Update mapsmenu.txt

* Update miscstats.txt

added changes due to PR #611 !

* Update miscstats.txt

* Update pausecfg.txt

* Update admincmd.txt

* Update statscfg.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants