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

refactor(translations): front-facing message translations #605

Merged
merged 4 commits into from
Sep 26, 2019

Conversation

rumblefrog
Copy link
Member

This moves a good majority of the front-facing messages to translations.

Motivation and Context

Allow ease of translations of hard-coded values. Also closes #582

How Has This Been Tested?

This has not been tested so far.

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)

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

This is really good idea - move log messages to phrases and don't set obviously used language?
At this moment, your plugin can format log phrases on various languages if someone plugin used SetGlobalTransTarget(), and admin has translation to another languages.

@rumblefrog
Copy link
Member Author

@CrazyHackGUT Not sure if I understand the phrasing, but are you proposing that I do set global translation target.

@CrazyHackGUT
Copy link
Contributor

I propose use %T instead %t and LANG_SERVER (SourceMod define; targets to default SM locale (en; can be changed in core.cfg)) as client for log entries, for example.

@TheByKotik
Copy link
Contributor

TheByKotik commented Sep 25, 2019

I propose use %T instead %t and LANG_SERVER (SourceMod define; targets to default SM locale (en; can be changed in core.cfg)) as client for log entries, for example.

No need that.
Both functions ( LogToFile() and LogAction() ) call this on C++ side.

@rumblefrog rumblefrog merged commit 77b9427 into v1.x Sep 26, 2019
@rumblefrog rumblefrog deleted the additional-translations branch September 26, 2019 01:37
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