diff --git a/.gitignore b/.gitignore index ceaea36..ad68522 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,4 @@ dist .yarn/install-state.gz .pnp.* +spreadsheets/ diff --git a/locales/en.yaml b/locales/en.yaml index 152de80..0e2d440 100644 --- a/locales/en.yaml +++ b/locales/en.yaml @@ -1,5 +1,5 @@ welcomeHeading: "Welcome to Machankura" -productAmountPrompt: "How much {{{bitrefillProductName]} {{{categoryType}}} to buy for {{{receipent}}}" +productAmountPrompt: "How much {{{bitrefillProductName}}} {{{categoryType}}} to buy for {{{receipent}}}" amountRangeText: "(min: {{{minimumAmount}}} {{{currencyTicker}}}, max: {{{maximumAmount}}} {{{currencyTicker}}})" inCurrencyPrompt: "(in {{{currencyTicker}}})" inputAmountOutOfRangePrompt: "You can't buy airtime out of the defined range" @@ -163,8 +163,8 @@ learnAboutBitcoin: "Learn about Bitcoin" bitcoinIsElectronicMoney: "Bitcoin is a decentralized peer to peer electronic money introduced by Satoshi Nakamoto in 2008. It's the native digital currency." thankYouForVisitingTillNextTime: "Thank you for checking out Machankura. We will be happy to be at your service on the next visit." registerAccountPrompt: "To create a Machankura account please enter a 5 digit PIN that you will use when using your account:" -youHaveGifts: "You have {{{giftCount}}} gifts waiting for you ;) (go to Menu and see account details)." -enjoySendingAndReceiving: "Enjoy sending and receiving Bitcoin. ;)" +youHaveGifts: "You have {{{giftCount}}} gifts waiting for you (go to Menu and see account details)." +enjoySendingAndReceiving: "Enjoy sending and receiving Bitcoin." accountCreated: "We have created your Manchankura account." failedToCreateUser: "Failed to create user. Please try again." englishOnly: "English is currently the only language on Machankura. We will be adding more soon." \ No newline at end of file diff --git a/scripts/spreadsheet.js b/scripts/spreadsheet.js new file mode 100644 index 0000000..e63da9e --- /dev/null +++ b/scripts/spreadsheet.js @@ -0,0 +1,25 @@ +const YAML = require("yaml") +const fs = require("fs") + +if (process.argv[2]) { + const baseLangFile = fs.readFileSync('./locales/en.yaml', 'utf8') + const baseLanguage = YAML.parse(baseLangFile) + + var output = `key;en;${process.argv[2]}\n` + + const keys = Object.keys(baseLanguage) + + for (const key in baseLanguage) { + if (Object.hasOwnProperty.call(baseLanguage, key)) { + const string = baseLanguage[key]; + + output += `${key};${string};\n` + } + } + + fs.writeFileSync(`./spreadsheets/${process.argv[2]}.csv`, output) + + +} else { + console.log("Please give use a language we should translate into") +} \ No newline at end of file