mirror of
https://github.com/discourse/discourse.git
synced 2025-04-07 20:34:25 +08:00
FIX: Use correct translation key (#20958)
The translation key is built using the name of the reviewable as it was defined in Ruby. The chat plugin uses the `Chat` namespace and defines `Chat::ReviewableMessage`. This was then transformed to `chat::reviewable_message`, but it should be `chat_reviewable_message` to resemble the other translation keys.
This commit is contained in:
parent
2386ad12f2
commit
6da2fbbf76
@ -42,9 +42,11 @@ export default Controller.extend({
|
|||||||
@discourseComputed("reviewableTypes")
|
@discourseComputed("reviewableTypes")
|
||||||
allTypes() {
|
allTypes() {
|
||||||
return (this.reviewableTypes || []).map((type) => {
|
return (this.reviewableTypes || []).map((type) => {
|
||||||
|
const translationKey = underscore(type).replace(/[^\w]+/g, "_");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: type,
|
id: type,
|
||||||
name: I18n.t(`review.types.${underscore(type)}.title`),
|
name: I18n.t(`review.types.${translationKey}.title`),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -585,9 +585,8 @@ en:
|
|||||||
transcript:
|
transcript:
|
||||||
view: "View previous messages transcript"
|
view: "View previous messages transcript"
|
||||||
types:
|
types:
|
||||||
reviewable_chat_message:
|
chat_reviewable_message:
|
||||||
title: "Flagged Chat Message"
|
title: "Flagged Chat Message"
|
||||||
flagged_by: "Flagged By"
|
|
||||||
keyboard_shortcuts_help:
|
keyboard_shortcuts_help:
|
||||||
chat:
|
chat:
|
||||||
title: "Chat"
|
title: "Chat"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user