Skip to content

Commit

Permalink
chore: move translations to shared key
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideIadeluca committed Oct 2, 2024
1 parent 3135de6 commit 710966b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions js/src/common/components/ImpersonateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ export default class ImpersonateModal extends Modal<ImpersonateModalAttrs> {
}

title(): NestedStringArray {
return app.translator.trans('fof-impersonate.forum.modal.title');
return app.translator.trans('fof-impersonate.lib.modal.title');
}

content(): Mithril.Children {
return (
<div className="Modal-body">
<div>
<p>
{app.translator.trans('fof-impersonate.forum.modal.label', {
{app.translator.trans('fof-impersonate.lib.modal.label', {
username: username(this.user),
})}
</p>
Expand All @@ -57,8 +57,8 @@ export default class ImpersonateModal extends Modal<ImpersonateModalAttrs> {
value={this.reason()}
placeholder={
this.reasonRequired
? app.translator.trans('fof-impersonate.forum.modal.placeholder_required')
: app.translator.trans('fof-impersonate.forum.modal.placeholder_optional')
? app.translator.trans('fof-impersonate.lib.modal.placeholder_required')
: app.translator.trans('fof-impersonate.lib.modal.placeholder_optional')
}
oninput={withAttr('value', this.reason)}
rows="4"
Expand All @@ -74,7 +74,7 @@ export default class ImpersonateModal extends Modal<ImpersonateModalAttrs> {
type: 'submit',
loading: this.loading,
},
app.translator.trans('fof-impersonate.forum.modal.impersonate_username', {
app.translator.trans('fof-impersonate.lib.modal.impersonate_username', {
username: username(this.user),
})
)}
Expand Down
2 changes: 1 addition & 1 deletion js/src/forum/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ app.initializers.add('fof-impersonate', () => {
});
},
},
app.translator.trans('fof-impersonate.forum.user_controls.impersonate_button')
app.translator.trans('fof-impersonate.lib.user_controls.impersonate_button')
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion resources/locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fof-impersonate:
require_reason: Require a reason to be entered before proceeding to impersonate another user.
no_settings_available: No settings are currently available. Try installing fof/moderator-notes

forum:
lib:
modal:
title: Login as another user
label: With great power comes great responsibility. By continuing, you will become {username} until you log out.
Expand Down

0 comments on commit 710966b

Please sign in to comment.