Migrate more strings to translation keys (#11665)
This commit is contained in:
parent
de250df520
commit
54c88c57ed
127 changed files with 6797 additions and 5825 deletions
|
@ -83,13 +83,13 @@ export class Command {
|
|||
public run(matrixClient: MatrixClient, roomId: string, threadId: string | null, args?: string): RunResult {
|
||||
// if it has no runFn then its an ignored/nop command (autocomplete only) e.g `/me`
|
||||
if (!this.runFn) {
|
||||
return reject(new UserFriendlyError("Command error: Unable to handle slash command."));
|
||||
return reject(new UserFriendlyError("slash_command|error_invalid_runfn"));
|
||||
}
|
||||
|
||||
const renderingType = threadId ? TimelineRenderingType.Thread : TimelineRenderingType.Room;
|
||||
if (this.renderingTypes && !this.renderingTypes?.includes(renderingType)) {
|
||||
return reject(
|
||||
new UserFriendlyError("Command error: Unable to find rendering type (%(renderingType)s)", {
|
||||
new UserFriendlyError("slash_command|error_invalid_rendering_type", {
|
||||
renderingType,
|
||||
cause: undefined,
|
||||
}),
|
||||
|
|
|
@ -45,7 +45,7 @@ const updatePowerLevelHelper = (
|
|||
const room = client.getRoom(roomId);
|
||||
if (!room) {
|
||||
return reject(
|
||||
new UserFriendlyError("Command failed: Unable to find room (%(roomId)s", {
|
||||
new UserFriendlyError("slash_command|error_invalid_room", {
|
||||
roomId,
|
||||
cause: undefined,
|
||||
}),
|
||||
|
@ -53,7 +53,7 @@ const updatePowerLevelHelper = (
|
|||
}
|
||||
const member = room.getMember(userId);
|
||||
if (!member?.membership || getEffectiveMembership(member.membership) === EffectiveMembership.Leave) {
|
||||
return reject(new UserFriendlyError("Could not find user in room"));
|
||||
return reject(new UserFriendlyError("slash_command|error_invalid_user_in_room"));
|
||||
}
|
||||
|
||||
return success(updatePowerLevel(room, member, powerLevel));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue