Create spreadsheets

This commit is contained in:
kngako 2022-10-24 18:56:36 +02:00
parent 881b66d1bf
commit 9d6e61af26
3 changed files with 29 additions and 3 deletions

1
.gitignore vendored
View File

@ -130,3 +130,4 @@ dist
.yarn/install-state.gz .yarn/install-state.gz
.pnp.* .pnp.*
spreadsheets/

View File

@ -1,5 +1,5 @@
welcomeHeading: "Welcome to Machankura" 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}}})" amountRangeText: "(min: {{{minimumAmount}}} {{{currencyTicker}}}, max: {{{maximumAmount}}} {{{currencyTicker}}})"
inCurrencyPrompt: "(in {{{currencyTicker}}})" inCurrencyPrompt: "(in {{{currencyTicker}}})"
inputAmountOutOfRangePrompt: "You can't buy airtime out of the defined range" 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." 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." 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:" 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)." youHaveGifts: "You have {{{giftCount}}} gifts waiting for you (go to Menu and see account details)."
enjoySendingAndReceiving: "Enjoy sending and receiving Bitcoin. ;)" enjoySendingAndReceiving: "Enjoy sending and receiving Bitcoin."
accountCreated: "We have created your Manchankura account." accountCreated: "We have created your Manchankura account."
failedToCreateUser: "Failed to create user. Please try again." failedToCreateUser: "Failed to create user. Please try again."
englishOnly: "English is currently the only language on Machankura. We will be adding more soon." englishOnly: "English is currently the only language on Machankura. We will be adding more soon."

25
scripts/spreadsheet.js Normal file
View File

@ -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")
}