Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Oct 31, 2019

@t3chguy t3chguy requested a review from a team October 31, 2019 10:51
// assume the error is a server error when the command is async
const isServerError = !!cmd.promise;
const title = isServerError ? "Server error" : "Command error";
const title = isServerError ? _td("Server error") : _td("Command error");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do you need _td for this case?

Copy link
Member Author

Choose a reason for hiding this comment

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

just to get rid of the duplication of the ternary statement with the same strings, it has to go untranslated to the Modal constructor for Telemetry/Piwik but then translated to be rendered to the user, so I do the ternary once on the marked-as-translatable-but-english-string then pass to Modal then translate it for rendering without two ternaries

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay, thanks for the explanation. I missed the analytics bit of the tangle. (Might be nice to have "Slash Commands" somewhere in the analytics data.)

@t3chguy t3chguy merged commit bc263fa into develop Oct 31, 2019
@t3chguy t3chguy deleted the t3chguy/better_slash_command_errors_unknown branch May 25, 2020 18:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants