Skip to content

Commit

Permalink
Flatten translations
Browse files Browse the repository at this point in the history
  • Loading branch information
deptyped committed Jul 25, 2024
1 parent 51ea687 commit 681fdee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions locales/en.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ welcome = Welcome!
## Language Feature

language =
.select = Please, select your language
.changed = Language successfully changed!
language-select = Please, select your language
language-changed = Language successfully changed!
## Admin Feature

admin =
.commands-updated = Commands updated.
admin-commands-updated = Commands updated.
## Unhandled Feature

Expand Down
4 changes: 2 additions & 2 deletions src/bot/features/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const composer = new Composer<Context>()
const feature = composer.chatType('private')

feature.command('language', logHandle('command-language'), async (ctx) => {
return ctx.reply(ctx.t('language.select'), {
return ctx.reply(ctx.t('language-select'), {
reply_markup: await createChangeLanguageKeyboard(ctx),
})
})
Expand All @@ -26,7 +26,7 @@ feature.callbackQuery(
if (i18n.locales.includes(languageCode)) {
await ctx.i18n.setLocale(languageCode)

return ctx.editMessageText(ctx.t('language.changed'), {
return ctx.editMessageText(ctx.t('language-changed'), {
reply_markup: await createChangeLanguageKeyboard(ctx),
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/bot/handlers/commands/setcommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ export async function setCommandsHandler(ctx: CommandContext<Context>) {
},
)

return ctx.reply(ctx.t('admin.commands-updated'))
return ctx.reply(ctx.t('admin-commands-updated'))
}

0 comments on commit 681fdee

Please sign in to comment.