fbef0102 / L4D2-Plugins

L4D2 enhancement, bug/glitch fixes, general purpose and freaky-fun plugins.
GNU General Public License v3.0
170 stars 79 forks source link

l4d2_item_hint: Different languanges are hinted by diffrerent players using different default languages #29

Closed deprid closed 4 months ago

deprid commented 4 months ago

For example:

Expected result:

Workaround: I removed all the lines containing zho and chi in l4d2_skill_detect.phrases, now all displayed hints are in English

In Translations (SourceMod Scripting), it mentions

As of SourceMod 1.1, there is a new preferred method of shipping translations. By default, the main translation file should only contain English phrases. Additional translations are made in separate files, under a folder named after the ISO language code in languages.cfg.

Perhaps the issue happens because the additional translations are not put in the respective folder?

fbef0102 commented 4 months ago

Workaround: I removed all the lines containing zho and chi in l4d2_skill_detect.phrases, now all displayed hints are in English

I am kind of confused, are you talking about l4d2_item_hint or l4d2_skill_detect?

For example:

  • Player A (server host) use English language in Steam, the server displays Player A hint in English
  • Player B use tchinese, the server shows Player B hint in tchinese

Expected result:

  • The server should be displaying all hints in respective language used by a client
  • In client side, the server displays all hints in English for Player A
  • In client side, the server displays all hints in tchinese for Player B

Yes. unfortunately for now. the instructor hint can not be translated into respective language. The instructor hint is l4d2 game build-in message, not the function from sourcemod.

The only solution is to display instructor hint in server language only (English) for all players.

1.

  FormatEx(sCaption, sizeof(sCaption), "%T", sItemPhrase, client);

===>

  FormatEx(sCaption, sizeof(sCaption), "%T", sItemPhrase, LANG_SERVER);

2.

  FormatEx(sCaption, sizeof(sCaption), "%T", "Spot_Maker", client, client);

===>

  FormatEx(sCaption, sizeof(sCaption), "%T", "Spot_Maker", LANG_SERVER, client);

3.

  FormatEx(sCaption, sizeof(sCaption), "%T", sItemPhrase, client);

===>

  FormatEx(sCaption, sizeof(sCaption), "%T", sItemPhrase, LANG_SERVER);

Perhaps I will update in the future.


Edit: Okay. I already update new version

// Display Instruction Hint Text in which language for all players? 0=Server Language (English), 1=Caller Language
l4d2_item_hint_instructorhint_translate "0"
deprid commented 4 months ago

I am kind of confused, are you talking about l4d2_item_hint or l4d2_skill_detect?

Oh sorry, it's l4d2_item_hint.phrases

Let me try the new version