Skip to content

fix(translations): translate the remaining messages and menus, console use of the commands - #110

Closed
Rushaway wants to merge 2 commits into
masterfrom
fix/audit-followup
Closed

Rushaway wants to merge 2 commits into
masterfrom
fix/audit-followup

Conversation

@Rushaway

@Rushaway Rushaway commented Nov 1, 2026

Copy link
Copy Markdown
Member

Fixes #109.

Stacked on #107, this plugin's translation PR: merge #107 first. GitHub then retargets this PR to master; refresh it by merging master (overlapping lines: keep this branch's side).

Changes

  • Move all the hard-coded messages, menu titles and items to allchat.phrases.txt: 131 phrases added in en, fr, ru, es, de, pt and chi, after the existing chat format phrases (kept byte for byte). The SourceMod phrases "Exit", "Player no longer available" and "Command is in-game only" are reused.
  • Menus and menu items use %T with the viewing player; the sm_msay panel is built per player for its "Exit" item. All usage lines share one "Usage: {1}" phrase, the command syntax stays untranslated. Enabled/disabled texts and admin chat labels use one phrase per case.
  • The ban notice uses one phrase per setting (tag, tag color, name color, text color) and the remaining time uses day/hour/minute/second phrases. Buffers raised for the longer texts (ban time 64 -> 128, unban list item 64 -> 128, current settings items 32/64 -> 128).
  • New PrintToChatOrReply() helper: chat for players, command reply for the server console. Used by the tag and color set functions, so the sm_force* commands work from the console and rcon.
  • sm_pstatus replies with CReplyToCommand, and the in-game-only commands reply with ReplyToCommand instead of PrintToServer.
  • The color set functions stop when SetColor() fails, so no false "Successfully set" message.
  • sm_cccimportreplacefile deletes the KeyValues handle when the file is missing.
  • The six admin commands store client ? GetClientUserId(client) : 0 like sm_cccimportreplacefile, and sm_cccban stores the issuer name with %N ("Console" for the server). The requests and callbacks treat userid 0 as the server console: they only drop a request when a real player left, the console uses retry slot 0, which SQL_BeginRequest() now resets, and the "replace list full" and "import failed" messages go to the server console.
  • Unban menu: "player no longer available" is sent to the admin's chat with CPrintToChat. The unban, reset and force tag/color menus open the admin menu only once.

Not changed

  • addons/sourcemod/scripting/CustomChatColors.sp:3936 and :4083 ("congrats you broke it"): unreachable fallback of the menu handlers, every item is handled above. Left as is.

Checks

  • Builds with spcomp 1.12 and the CI dependencies, no new warnings.
  • smtranslate check --languages en,fr,ru,es,de,pt,chi: 0 errors, 0 warnings.

Rushaway and others added 2 commits November 1, 2026 00:34
Translation audit from srcdslab/.github#5, reviewed and completed.

Co-Authored-By: WareZ57 <7504466+WareZ57@users.noreply.github.com>
…e use of the commands

Translation audit follow-up (srcdslab/.github#6).

Co-Authored-By: WareZ57 <7504466+WareZ57@users.noreply.github.com>
Base automatically changed from feat/translations to master November 2, 2026 07:52
@Rushaway

Rushaway commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Split into one PR per scope, each based on master (most of the translation work already landed with #107):

Each one bumps the patch version (8.1.1 to 8.1.6, in this order), so after each merge the next one needs its ccc.inc conflict resolved.

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.

Most messages and menus are hard-coded English, admin commands fail from the console

1 participant