Skip to content

Commit

Permalink
fix(services): i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartholomé Gili committed Oct 18, 2022
1 parent 93f7a41 commit 75e139e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const generalConfig: GeneralConfigType = {
gitRemoteRepo: 'https://github.com/barthofu/tscord',
},

automaticUploadImagesToImgur: true, // enable or not the automatic assets upload
automaticUploadImagesToImgur: false, // enable or not the automatic assets upload

devs: [], // discord IDs of the devs that are working on the bot (you don't have to put the owner's id here)

Expand Down
4 changes: 3 additions & 1 deletion src/services/PluginsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ export class PluginsManager {
let translations: { [key: string]: BaseTranslation } = {}

for (const locale of locales) {
const path = getSourceCodeLocation + "/i18n/"+locale
const path = getSourceCodeLocation() + '/i18n/' + locale
if (fs.existsSync(path)) translations[locale] = (await import(path))?.default
}

for (const plugin of this._plugins) {

for (const locale in plugin.translations) {

if (!translations[locale]) translations[locale] = {}
if (!namespaces[locale]) namespaces[locale] = []

Expand Down

0 comments on commit 75e139e

Please sign in to comment.