Skip to content

Commit

Permalink
chore: fetch dict for specific lang
Browse files Browse the repository at this point in the history
  • Loading branch information
rofe committed Jun 17, 2023
1 parent ad269e1 commit d1c2a01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/extension/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2479,12 +2479,12 @@
* Fetches the dictionary for a language.
* @private
* @param {Sidekick} sk The sidekick
* @param {string} lang The language
* @returns {Object} The dictionary
*/
async function fetchDict(sk) {
async function fetchDict(sk, lang) {
const dict = {};
const { lang } = sk.config;
const dictPath = `${sk.config.scriptRoot}/_locales/${lang}/messages.json`;
const dictPath = `${sk.config.scriptRoot}/_locales/${lang || sk.config.lang}/messages.json`;
try {
const res = await fetch(dictPath);
const messages = await res.json();
Expand Down

0 comments on commit d1c2a01

Please sign in to comment.