Skip to content

Commit

Permalink
Update activate.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Starman3787 committed Jun 22, 2024
1 parent d7c292a commit 377bae6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions activate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const fallbackLanguage = "en_us";
const baseDirectory = "bot";
const languages = require('./bot/languages.json');

const languagesLocation = path.join(process.cwd(), "language", baseDirectory);
const activeLanguagesLocation = path.join(process.cwd(), "language", "active", baseDirectory);
const languagesLocation = path.join(process.cwd(), "languages", baseDirectory);
const activeLanguagesLocation = path.join(process.cwd(), "languages", "active", baseDirectory);

// relative file path is the path after the locale directory
function loadFile(locale, relativeFilePath) {
Expand Down Expand Up @@ -75,7 +75,7 @@ function loadSubdirectory(locale, relativePath) {

function activate() {
Object.entries(languages).forEach(([key, value]) => {
const directory = path.join(process.cwd(), baseDirectory, value);
const directory = path.join(process.cwd(), "languages", baseDirectory, value);
console.log(`Processing language code ${key}...`);
if (!fs.existsSync(directory)) {
console.log(`Skipping non-existent directory: ${directory} for language code ${key}`);
Expand Down

0 comments on commit 377bae6

Please sign in to comment.