diff --git a/apps/i18n/.env.example b/apps/i18n/.env.example new file mode 100644 index 000000000..8bdf45a64 --- /dev/null +++ b/apps/i18n/.env.example @@ -0,0 +1,4 @@ +WEBLATE_INSTANCE_URL=http://localhost +WEBLATE_COMPONENT_NAME=coolify +WEBLATE_TOKEN= +TRANSLATION_DIR= \ No newline at end of file diff --git a/apps/i18n/index.mjs b/apps/i18n/index.mjs index 50ee30543..85e146073 100644 --- a/apps/i18n/index.mjs +++ b/apps/i18n/index.mjs @@ -10,16 +10,16 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const webletInstanceURL = process.env.WEBLET_INSTANCE_URL; -const webletComponentName = process.env.WEBLET_COMPONENT_NAME -const token = process.env.WEBLET_TOKEN; +const weblateInstanceURL = process.env.WEBLATE_INSTANCE_URL; +const weblateComponentName = process.env.WEBLATE_COMPONENT_NAME +const token = process.env.WEBLATE_TOKEN; const translationsDir = process.env.TRANSLATION_DIR; const translationsPODir = './locales'; const locales = [] const domain = 'locale' -const translations = await got(`${webletInstanceURL}/api/components/${webletComponentName}/glossary/translations/?format=json`, { +const translations = await got(`${weblateInstanceURL}/api/components/${weblateComponentName}/glossary/translations/?format=json`, { headers: { "Authorization": `Token ${token}` }