Refactor translation files and update import syntax: Converted CommonJS to ES module syntax in translate-i18n.js. Enhanced English translation file with new phrases for profile, order summary, and settings sections, while improving existing translations for clarity and consistency.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const OpenAI = require('openai');
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import OpenAI from 'openai';
|
||||
|
||||
// Configuration
|
||||
const OPENAI_API_KEY = process.env.OPENAI_API_KEY;
|
||||
@@ -366,11 +366,11 @@ async function main() {
|
||||
}
|
||||
|
||||
// Run the script
|
||||
if (require.main === module) {
|
||||
if (import.meta.url === `file://${process.argv[1]}`) {
|
||||
main();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
export {
|
||||
translateToEnglish,
|
||||
translateToOtherLanguages,
|
||||
readTranslationFile,
|
||||
|
||||
Reference in New Issue
Block a user