Skip to content

Translations for sbpp checker #525

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

Merged
merged 7 commits into from
Oct 20, 2018
Merged

Translations for sbpp checker #525

merged 7 commits into from
Oct 20, 2018

Conversation

sneak-it
Copy link
Contributor

@sneak-it sneak-it commented Oct 18, 2018

Description

I have updated sbpp_checker to utilize translations, defined a prefix as with sbpp_main & sbpp_comms, and tweaked a small bit of the language (english) to be a bit more grammatically correct. I have also updated sbpp_sleuth to utilize a prefix, to be uniform with all other plugins, just like above.

Motivation and Context

Don't think this fixes any issues or requests, but provides increased multilingual support.

How Has This Been Tested?

I have tested these changes in depth on both a private and populated public server, however additional testing certainly would not hurt!

Screenshots (if appropriate):

Screenshot

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

This will require an additional translation file for the checker. Upon next release servers will require this file, so not really breaking.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@CrazyHackGUT
Copy link
Contributor

You don't fully utilize translations.
In PrintToBanAdmins() you should move VFormat() in for block, and before calling VFormat(), call SetGlobalTransTarget().
This causes a bug when checker is utilize translations, but prints for all clients message on one language.

Copy link
Contributor

@CrazyHackGUT CrazyHackGUT left a comment

Choose a reason for hiding this comment

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

@sneak-it
Copy link
Contributor Author

Good catch! This should be fixed, thank you.

for (int i = 1; i <= MaxClients; i++)
{
SetGlobalTransTarget(i);
VFormat(msg, sizeof(msg), format, 2);
Copy link
Contributor

Choose a reason for hiding this comment

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

This two functions should be called after checking, in game client or not.

@sneak-it
Copy link
Contributor Author

Fixed, along with a mistake I made in sleuth that went unnoticed.

@sneak-it
Copy link
Contributor Author

Just saw this commit: 42e3206

@Groruk should this translation file be renamed to sbpp_checker.phrases.txt ?

@Groruk
Copy link
Member

Groruk commented Oct 18, 2018

Just saw this commit: 42e3206

@Groruk should this translation file be renamed to sbpp_checker.phrases.txt ?

yes, that would be nice. (just to be inline with plugin names)

@sneak-it
Copy link
Contributor Author

Done!

@Groruk Groruk merged commit b729ff4 into sbpp:v1.x Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants