Skip to content

Commit

Permalink
ref: rename useTr to just use
Browse files Browse the repository at this point in the history
  • Loading branch information
Sv443 committed Jan 5, 2025
1 parent 0393930 commit 366579f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/VideoInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export class VideoInfoCmd extends SlashCommand {
if(!ytData)
return null;

const t = tr.useTr(locale);
const t = tr.use(locale);

//#SECTION title & thumbnail

Expand Down
2 changes: 1 addition & 1 deletion src/lib/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ const trFor = <TTrKey extends string = string>(language: string, key: TTrKey, ..

const tr = {
for: (...params: Parameters<typeof trFor<TrKeyEn>>) => trFor<TrKeyEn>(...params as Parameters<typeof trFor<TrKeyEn>>),
useTr: (...params: Parameters<typeof useTr<TrKeyEn>>) => useTr<TrKeyEn>(...params as Parameters<typeof useTr<TrKeyEn>>),
use: (...params: Parameters<typeof useTr<TrKeyEn>>) => useTr<TrKeyEn>(...params as Parameters<typeof useTr<TrKeyEn>>),
addTranslations,
setLanguage,
setFallbackLanguage,
Expand Down

0 comments on commit 366579f

Please # to comment.